WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
179598
[Cairo] Move state stack, CTM, transparency layer operations in GraphicsContextCairo to CairoOperations
https://bugs.webkit.org/show_bug.cgi?id=179598
Summary
[Cairo] Move state stack, CTM, transparency layer operations in GraphicsConte...
Zan Dobersek
Reported
2017-11-12 11:03:51 PST
[Cairo] Move state stack, CTM, transparency layer operations in GraphicsContextCairo to CairoOperations
Attachments
Patch
(7.63 KB, patch)
2017-11-12 11:06 PST
,
Zan Dobersek
no flags
Details
Formatted Diff
Diff
Patch for landing
(7.94 KB, patch)
2017-11-12 23:37 PST
,
Zan Dobersek
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Zan Dobersek
Comment 1
2017-11-12 11:06:44 PST
Created
attachment 326721
[details]
Patch
Carlos Garcia Campos
Comment 2
2017-11-12 22:35:58 PST
Comment on
attachment 326721
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=326721&action=review
> Source/WebCore/platform/graphics/cairo/CairoOperations.cpp:56 > +void save(PlatformContextCairo& platformContext) > +{ > + platformContext.save(); > +} > + > +void restore(PlatformContextCairo& platformContext) > +{ > + platformContext.restore(); > +}
What's the point of these? They don't use cairo directly, I guess caller could call save restore on platform context, no? Just consistency?
> Source/WebCore/platform/graphics/cairo/CairoOperations.cpp:90 > + cairo_paint_with_alpha(cr, platformContext.layers().last()); > + platformContext.layers().removeLast();
We could use takeLast() here.
Zan Dobersek
Comment 3
2017-11-12 23:28:31 PST
Comment on
attachment 326721
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=326721&action=review
>> Source/WebCore/platform/graphics/cairo/CairoOperations.cpp:56 >> +} > > What's the point of these? They don't use cairo directly, I guess caller could call save restore on platform context, no? Just consistency?
Yes, it's for consistency. But essentially we don't need to know about the PlatformContextCairo save() and restore() methods in the GraphicsContextCairo file, we can just pass the memory address of the given PlatformContextCairo object and isolate the PlatformContextCairo operations in CairoOperations file. In theory this is a clear-cut approach that basically isolates PlatformContextCairo usage to a single .cpp file, but this doesn't really apply anymore with the unified builds since different .cpp files are now pulled into a single source file compilation. I think it's still possible to exclude specific build targets from the unified build, that might be useful.
Zan Dobersek
Comment 4
2017-11-12 23:37:06 PST
Created
attachment 326747
[details]
Patch for landing
Zan Dobersek
Comment 5
2017-11-12 23:37:47 PST
Comment on
attachment 326747
[details]
Patch for landing Clearing flags on attachment: 326747 Committed
r224744
: <
https://trac.webkit.org/changeset/224744
>
Zan Dobersek
Comment 6
2017-11-12 23:37:51 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7
2017-11-15 09:33:40 PST
<
rdar://problem/35561948
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug