Open
Bug 891660
Opened 11 years ago
Updated 2 years ago
Azure OMTC Mac
Categories
(Core :: Graphics, defect)
Tracking
()
NEW
People
(Reporter: jrmuizel, Unassigned)
References
Details
Attachments
(1 file)
10.30 KB,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
Not the most beautiful way to hook this up. But it does work and should have minimal casualties.
Attachment #773002 -
Flags: review?(matt.woodrow)
Comment 1•11 years ago
|
||
Comment on attachment 773002 [details] [diff] [review] Azure OMTC Mac Review of attachment 773002 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/2d/DrawTargetCG.cpp @@ +1034,5 @@ > // CGContext's default to have the origin at the bottom left > // so flip it to the top left > CGContextTranslateCTM(mCg, 0, mSize.height); > CGContextScaleCTM(mCg, 1, -1); > +#endif Assuming that there are no other callers for this function, can we just get rid of this entirely and add a comment about why we don't need to do it. ::: gfx/2d/Factory.cpp @@ +507,5 @@ > +Factory::CreateDrawTargetForCG(CGContextRef cg, const IntSize& aSize) > +{ > + RefPtr<DrawTarget> retVal; > + > +#ifdef XP_MACOSX I think we should move these outside the function and only define it on OSX. This is what the other platform specific factory functions seem to do. ::: gfx/thebes/gfxPlatform.cpp @@ +553,5 @@ > +#ifdef XP_MACOSX > + if (aSurface->GetType() == gfxASurface::SurfaceTypeQuartz) { > + RefPtr<DrawTarget> drawTarget = Factory::CreateDrawTargetForCG(static_cast<gfxQuartzSurface*>(aSurface)->GetCGContext(), aSize); > + aSurface->AddRef(); > + drawTarget->AddUserData(&kSurface, aSurface, SurfaceDestroy); We don't need to hold a reference to the gfxQuartzSurface, our DrawTargetQuartz will hold a reference to the CGContext. Let's just move this into its own function since it has different semantics. @@ +556,5 @@ > + aSurface->AddRef(); > + drawTarget->AddUserData(&kSurface, aSurface, SurfaceDestroy); > + return drawTarget; > + } > +#endif Add a gfxPlatformMac override of this function so we can avoid the #ifdefs
Updated•11 years ago
|
Attachment #773002 -
Flags: review?(matt.woodrow) → review+
Comment 2•11 years ago
|
||
(In reply to Jeff Muizelaar [:jrmuizel] from comment #0) > Created attachment 773002 [details] [diff] [review] > Azure OMTC Mac > > Not the most beautiful way to hook this up. But it does work and should have > minimal casualties. The dual target bits feel like a separate bug, or at least a separate patch?
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•