WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
114412
Add platform support for -webkit-background-blend-mode to CG context with background color
https://bugs.webkit.org/show_bug.cgi?id=114412
Summary
Add platform support for -webkit-background-blend-mode to CG context with bac...
Mihai Tica
Reported
2013-04-10 23:04:35 PDT
CoreGraphics should also support -webkit-background-blend-mode for background colors. The current implementation only supports background image blending:
https://bugs.webkit.org/show_bug.cgi?id=108549
Attachments
Patch
(11.76 KB, patch)
2013-04-10 23:22 PDT
,
Mihai Tica
no flags
Details
Formatted Diff
Diff
Patch
(11.89 KB, patch)
2013-04-11 10:53 PDT
,
Mihai Tica
no flags
Details
Formatted Diff
Diff
Patch
(16.79 KB, patch)
2013-04-12 00:02 PDT
,
Mihai Tica
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Mihai Tica
Comment 1
2013-04-10 23:22:38 PDT
Created
attachment 197510
[details]
Patch
Mihai Tica
Comment 2
2013-04-11 10:53:09 PDT
Created
attachment 197641
[details]
Patch
Darin Adler
Comment 3
2013-04-11 10:59:02 PDT
Comment on
attachment 197641
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=197641&action=review
Is there measurable performance impact for the code paths that now do extra work for non-blend cases? I’m guessing no. What does this do for graphics back ends other than CG?
> Source/WebCore/ChangeLog:16 > + (GraphicsContext):
Would be nice to remove this bogus change log line and/or fix the script that added it.
> LayoutTests/css3/compositing/effect-background-blend-mode-color.html:5 > + if (window.testRunner) { > + window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "1"); > + }
Extra braces not needed here. Why test only in this mode? Don’t we want to test both modes?
Mihai Tica
Comment 4
2013-04-12 00:02:45 PDT
Created
attachment 197724
[details]
Patch
Mihai Tica
Comment 5
2013-04-12 00:05:37 PDT
Thanks for the review, (In reply to
comment #3
)
> (From update of
attachment 197641
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=197641&action=review
> > Is there measurable performance impact for the code paths that now do extra work for non-blend cases? I’m guessing no.
For non-blend cases, |fillRect| already calls the |setCompositeOperation| method with |BlendModeNormal| and this patch preserves this behaviour, so I'm guessing there shouldn't be a performance impact.
> > What does this do for graphics back ends other than CG?
These changes eventually imply calling the |setPlatformCompositeOperation| with the appropriate blend mode; for other graphics back ends, it doesn't have any effect yet, I'll add appropriate bugs for each of them, good point.
> > > Source/WebCore/ChangeLog:16 > > + (GraphicsContext): >
> Would be nice to remove this bogus change log line and/or fix the script that added it.
Agree.
> > > LayoutTests/css3/compositing/effect-background-blend-mode-color.html:5 > > + if (window.testRunner) { > > + window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "1"); > > + } > > Extra braces not needed here. Why test only in this mode? Don’t we want to test both modes?
Agreed, we should test both modes, I've added another test file with accelerated compositing disabled. Also, could you please commit this when you have some time? Thanks
Dean Jackson
Comment 6
2013-04-23 12:16:30 PDT
Comment on
attachment 197724
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=197724&action=review
> LayoutTests/css3/compositing/effect-background-blend-mode-color.html:7 > + if (window.testRunner) > + window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "1"); > + > + if (window.testRunner) > + window.testRunner.dumpAsText(true);
Make this one conditional statement.
> LayoutTests/css3/compositing/effect-background-blend-mode-color2.html:7 > + if (window.testRunner) > + window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0"); > + > + if (window.testRunner) > + window.testRunner.dumpAsText(true);
Same here.
WebKit Commit Bot
Comment 7
2013-04-23 17:52:37 PDT
Comment on
attachment 197724
[details]
Patch Clearing flags on attachment: 197724 Committed
r149010
: <
http://trac.webkit.org/changeset/149010
>
WebKit Commit Bot
Comment 8
2013-04-23 17:52:40 PDT
All reviewed patches have been landed. Closing bug.
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