Bug 108550 - Add support for -webkit-background-blend-mode to chromium
Summary: Add support for -webkit-background-blend-mode to chromium
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 108547 111818 113394
Blocks: 108546
  Show dependency treegraph
 
Reported: 2013-01-31 16:53 PST by Rik Cabanier
Modified: 2013-04-08 17:56 PDT (History)
6 users (show)

See Also:


Attachments
Patch (503.50 KB, patch)
2013-04-02 02:37 PDT, Horia Olaru
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rik Cabanier 2013-01-31 16:53:02 PST
Add support for -webkit-background-blend-mode to chromium
Comment 1 Horia Olaru 2013-04-02 02:37:09 PDT
Created attachment 196107 [details]
Patch
Comment 2 Horia Olaru 2013-04-02 06:20:00 PDT
I have taken the Skia blend mode enabling code from the latest patches in bug 100071, so one could say they are partially reviewed. Therefore, I'm not sure how we should go about this code.

What is added on top of that is changes to ImageSkia to take into account the blend mode, and a new test that goes through Image::drawPattern (which did not get called otherwise).

I also have a question. Skia relies on the SkPaint object to pass and read the blend/composite mode (setXfermodeMode). However, I noticed that the Image::draw* functions also receive a GraphicsContext object, which also has a reference to a PlatformGraphicsContext (returned by platformContext). For Skia, this is a PlatformContextSkia object. The GraphicsContext object has a setCompositeOperation function, which ultimately ends up calling the PlatformContextSkia::setXfermodeMode. However, I'm not sure if this xfer mode is ever actually read or used from somewhere, since the SkPaint object seems to be enough to pass in this mode to Skia.

I feel like I should call setCompositeOperation, so that the Skia graphics context it is in sync with the SkPaint mode, in case someone reads it in the future, but I would like another opinion on it. Is this API only there to conform to the GraphicsContext API? Because setCompositeOperation seems to be redundant (at least for Skia), so I might be missing something.
Comment 3 Rik Cabanier 2013-04-02 10:55:39 PDT
(In reply to comment #2)
> I have taken the Skia blend mode enabling code from the latest patches in bug 100071, so one could say they are partially reviewed. Therefore, I'm not sure how we should go about this code.

Since this is a patch for chromium and is blocked by 113394, you should add test results for that platform too.
Comment 4 Darin Adler 2013-04-08 17:56:55 PDT
Comment on attachment 196107 [details]
Patch

Clearing flag for a Chromium-specific patch.