Open Bug 929998 Opened 12 years ago Updated 3 years ago

Always use Cairo via Moz2D

Categories

(Core :: Graphics, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: gal, Unassigned)

Details

Code going via gfxContext often checks IsCairo() and then directly fiddles with cairo. I think we do this to avoid round-tripping gfxContext -> Azure -> azure-cairo-backend when we use Cairo anyway. I think its time to stop that and always go the Azure indirection since we are getting rid of cairo anyway. We should default IsCairo() to false and force the Azure path and start removing all the direct cairo use.
Summary: Always use Cairo via Azure → Always use Cairo via Moz2D
Yes we should, but not quite yet :) IsCairo() should only return true if we don't actually have an azure object (mDT) for this context. We now have azure/moz2d enabled for all systems (on m-c), but this only covers gfxContexts created by layers, or widget (and even then it's possible that some of these have slipped through the cracks). There are still a *huge* number of callers that create gfxContext's that aren't backed by a DrawTarget - I've started work on killing these in bug 922942. For this train at least, we still want to maintain dual paths for all of these gfxContext creations, so that we have the ability to pref moz2d off on aurora/beta if necessary. For now we should continue to add moz2d conditional branches to everywhere that creates a gfxContext, and fix any bugs that show up as a result of this. Once we branch next, it's probably ok to start removing the non-azure branches for all these creation sites. We probably should make a formal decision on this though, will try get that confirmed as part of the work week. In the meantime, any additional patches of similar nature to the ones in bug 922942 would be awesome. (I'm looking at converting SurfaceFromElement right now in between work week talks).
We're spending a lot of time planning the path for Moz2D and the rest - we will record the results of those conversations and plans in this bug. If you don't know how to join the conversations, please contact me, but otherwise, let's please not use this bug to design or plan the work.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.