Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Issue 1866623002: Hook up CSSPaintValue::image to CSS Paint API callback. (Closed)

Created:
4 years, 8 months ago by ikilpatrick
Modified:
4 years, 7 months ago
CC:
ajuma+watch-canvas_chromium.org, darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dglazkov+blink, dshwang, drott+blinkwatch_chromium.org, krit, f(malita), haraken, jbroman, Justin Novosad, kinuko+watch, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Hook up CSSPaintValue::image to CSS Paint API callback. This introduces the plumbing required for custom paint. PaintGeneratedImage - Holds onto a SkPicture for painting. This is produced as the result of custom paint. CSSPaintImageGeneratorImpl - Generates a PaintGeneratedImage based on a LayoutObject and size. Invokes the custom paint callback inside CSSPaintDefinition. BUG=578252 Committed: https://crrev.com/065941e38a7ec787b7c1e13e50128816e1d422eb Cr-Commit-Position: refs/heads/master@{#389838}

Patch Set 1 #

Total comments: 10

Patch Set 2 : addressed comments #

Total comments: 14

Patch Set 3 : addressed comments. #

Total comments: 21

Patch Set 4 : . #

Total comments: 4

Patch Set 5 : .. #

Patch Set 6 : CORE_EXPORT V8ObjectConstructor #

Patch Set 7 : rebase #

Patch Set 8 : Remove unaccelerated image buffer factory. #

Patch Set 9 : add MODULES_EXPORT to Worklet #

Patch Set 10 : remove some includes. #

Patch Set 11 : fix build. #

Total comments: 10

Patch Set 12 : addressed comments + rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1624 lines, -23 lines) Patch
A third_party/WebKit/LayoutTests/csspaint/background-image-multiple.html View 1 1 chunk +34 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/background-image-multiple-expected.html View 1 chunk +16 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/background-image-tiled.html View 1 1 chunk +48 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/background-image-tiled-expected.html View 1 chunk +35 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/geometry-background-image.html View 1 chunk +42 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/geometry-background-image-expected.txt View 1 chunk +9 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/geometry-background-image-tiled.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +42 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/geometry-background-image-tiled-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +9 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/geometry-border-image.html View 1 chunk +68 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/geometry-border-image-expected.txt View 1 chunk +15 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/invalid-image-constructor-error.html View 1 1 chunk +33 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/invalid-image-constructor-error-expected.html View 1 chunk +6 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/invalid-image-paint-error.html View 1 1 chunk +32 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/invalid-image-paint-error-expected.html View 1 chunk +6 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/invalid-image-pending-script.html View 1 chunk +16 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/invalid-image-pending-script-expected.html View 1 chunk +6 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/overdraw.html View 1 1 chunk +31 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/overdraw-expected.html View 1 chunk +6 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/paint2d-composite.html View 1 1 chunk +74 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/paint2d-composite-expected.html View 1 chunk +50 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/paint2d-gradient.html View 1 1 chunk +41 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/paint2d-gradient-expected.html View 1 chunk +24 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/paint2d-paths.html View 1 1 chunk +49 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/csspaint/paint2d-paths-expected.html View 3 chunks +7 lines, -7 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/paint2d-rects.html View 1 1 chunk +37 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/paint2d-rects-expected.html View 1 chunk +19 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/paint2d-shadows.html View 1 1 chunk +40 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/paint2d-shadows-expected.html View 1 chunk +23 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/paint2d-transform.html View 1 1 chunk +39 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/paint2d-transform-expected.html View 1 chunk +22 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/resources/paint-logging-green.js View 1 chunk +10 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/resources/test-runner-geometry-logging.js View 1 chunk +43 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/resources/test-runner-paint-worklet.js View 1 1 chunk +20 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/valid-image-after-load.html View 1 chunk +42 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/valid-image-after-load-expected.html View 1 chunk +6 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/valid-image-before-load.html View 1 chunk +43 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/csspaint/valid-image-before-load-expected.html View 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/worklet/webexposed/global-interface-listing-paint-worklet-expected.txt View 1 2 3 4 5 6 7 8 9 10 2 chunks +16 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8ObjectConstructor.h View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/css/CSSPaintImageGenerator.h View 1 2 1 chunk +47 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp View 1 chunk +33 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSPaintValue.h View 1 2 2 chunks +25 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSPaintValue.cpp View 1 2 3 4 4 chunks +21 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/ModulesInitializer.cpp View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/Path2D.idl View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.h View 1 2 3 4 2 chunks +23 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +67 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/csspaint/CSSPaintImageGeneratorImpl.h View 1 2 1 chunk +43 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/csspaint/CSSPaintImageGeneratorImpl.cpp View 1 2 1 chunk +68 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/csspaint/Geometry.h View 1 chunk +32 lines, -0 lines 0 comments Download
A + third_party/WebKit/Source/modules/csspaint/Geometry.idl View 1 2 3 4 5 6 1 chunk +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/csspaint/PaintWorklet.h View 1 chunk +10 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/csspaint/PaintWorklet.cpp View 1 chunk +15 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.h View 1 2 3 chunks +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.cpp View 1 2 3 chunks +21 lines, -1 line 0 comments Download
A third_party/WebKit/Source/modules/csspaint/README.md View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +55 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/modules.gypi View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/worklet/Worklet.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/blink_platform.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageBuffer.h View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/graphics/PaintGeneratedImage.h View 1 chunk +37 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/graphics/PaintGeneratedImage.cpp View 1 chunk +29 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (6 generated)
ikilpatrick
Justin, Chris sending this to you first for reviewing paint&graphics related changes. Justin - I've ...
4 years, 8 months ago (2016-04-06 04:44:38 UTC) #2
Justin Novosad
platform/graphics and modules/canvas2d lgtm I really like the test design too. https://codereview.chromium.org/1866623002/diff/1/third_party/WebKit/LayoutTests/csspaint/resources/test-runner-simple-paint-worklet.js File third_party/WebKit/LayoutTests/csspaint/resources/test-runner-simple-paint-worklet.js (right): ...
4 years, 8 months ago (2016-04-06 15:52:45 UTC) #3
chrishtr
https://codereview.chromium.org/1866623002/diff/1/third_party/WebKit/Source/core/css/CSSPaintImageGenerator.h File third_party/WebKit/Source/core/css/CSSPaintImageGenerator.h (right): https://codereview.chromium.org/1866623002/diff/1/third_party/WebKit/Source/core/css/CSSPaintImageGenerator.h#newcode17 third_party/WebKit/Source/core/css/CSSPaintImageGenerator.h:17: class CORE_EXPORT CSSPaintImageGenerator : public GarbageCollectedFinalized<CSSPaintImageGenerator> { Why do ...
4 years, 8 months ago (2016-04-06 18:55:20 UTC) #4
ikilpatrick
+haraken for bindings. https://codereview.chromium.org/1866623002/diff/1/third_party/WebKit/LayoutTests/csspaint/resources/test-runner-simple-paint-worklet.js File third_party/WebKit/LayoutTests/csspaint/resources/test-runner-simple-paint-worklet.js (right): https://codereview.chromium.org/1866623002/diff/1/third_party/WebKit/LayoutTests/csspaint/resources/test-runner-simple-paint-worklet.js#newcode16 third_party/WebKit/LayoutTests/csspaint/resources/test-runner-simple-paint-worklet.js:16: testRunner.notifyDone(); On 2016/04/06 15:52:45, Justin Novosad ...
4 years, 8 months ago (2016-04-07 23:03:00 UTC) #6
haraken
https://codereview.chromium.org/1866623002/diff/20001/third_party/WebKit/Source/core/css/CSSPaintValue.h File third_party/WebKit/Source/core/css/CSSPaintValue.h (right): https://codereview.chromium.org/1866623002/diff/20001/third_party/WebKit/Source/core/css/CSSPaintValue.h#newcode66 third_party/WebKit/Source/core/css/CSSPaintValue.h:66: Observer m_paintImageGeneratorObserver; How about just making CSSPaintValue CSSPaintImageGenerator::Observer instead ...
4 years, 8 months ago (2016-04-08 04:31:19 UTC) #7
ikilpatrick
https://codereview.chromium.org/1866623002/diff/20001/third_party/WebKit/Source/core/css/CSSPaintValue.h File third_party/WebKit/Source/core/css/CSSPaintValue.h (right): https://codereview.chromium.org/1866623002/diff/20001/third_party/WebKit/Source/core/css/CSSPaintValue.h#newcode66 third_party/WebKit/Source/core/css/CSSPaintValue.h:66: Observer m_paintImageGeneratorObserver; On 2016/04/08 04:31:19, haraken wrote: > > ...
4 years, 8 months ago (2016-04-08 18:43:21 UTC) #8
haraken
https://codereview.chromium.org/1866623002/diff/40001/third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp File third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp (right): https://codereview.chromium.org/1866623002/diff/40001/third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp#newcode19 third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp:19: s_createFunction = createFunction; It's a bit nasty to bypass ...
4 years, 8 months ago (2016-04-11 02:18:15 UTC) #9
ikilpatrick
https://codereview.chromium.org/1866623002/diff/40001/third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp File third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp (right): https://codereview.chromium.org/1866623002/diff/40001/third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp#newcode19 third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp:19: s_createFunction = createFunction; On 2016/04/11 02:18:14, haraken wrote: > ...
4 years, 8 months ago (2016-04-11 22:34:24 UTC) #10
haraken
LGTM https://codereview.chromium.org/1866623002/diff/40001/third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp File third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp (right): https://codereview.chromium.org/1866623002/diff/40001/third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp#newcode19 third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp:19: s_createFunction = createFunction; On 2016/04/11 22:34:23, ikilpatrick wrote: ...
4 years, 8 months ago (2016-04-12 00:44:20 UTC) #11
ikilpatrick
+tim for style changes. https://codereview.chromium.org/1866623002/diff/40001/third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp File third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp (right): https://codereview.chromium.org/1866623002/diff/40001/third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp#newcode19 third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp:19: s_createFunction = createFunction; On 2016/04/12 ...
4 years, 8 months ago (2016-04-12 03:08:09 UTC) #13
haraken
https://codereview.chromium.org/1866623002/diff/40001/third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp File third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp (right): https://codereview.chromium.org/1866623002/diff/40001/third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp#newcode19 third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp:19: s_createFunction = createFunction; On 2016/04/12 03:08:09, ikilpatrick wrote: > ...
4 years, 8 months ago (2016-04-12 04:02:43 UTC) #14
Timothy Loh
lgtm
4 years, 8 months ago (2016-04-21 03:43:50 UTC) #15
chrishtr
Some nits below while reading the documentation. (Thanks for adding it.) https://codereview.chromium.org/1866623002/diff/200001/third_party/WebKit/Source/modules/csspaint/README.md File third_party/WebKit/Source/modules/csspaint/README.md (right): ...
4 years, 8 months ago (2016-04-25 23:07:19 UTC) #16
chrishtr
lgtm Looks good after nits. Thanks for the very thorough patch and well-written tests, and ...
4 years, 8 months ago (2016-04-26 01:13:42 UTC) #17
ikilpatrick
Thanks for reviewing! https://codereview.chromium.org/1866623002/diff/200001/third_party/WebKit/LayoutTests/csspaint/geometry-background-image-tiled.html File third_party/WebKit/LayoutTests/csspaint/geometry-background-image-tiled.html (right): https://codereview.chromium.org/1866623002/diff/200001/third_party/WebKit/LayoutTests/csspaint/geometry-background-image-tiled.html#newcode22 third_party/WebKit/LayoutTests/csspaint/geometry-background-image-tiled.html:22: el.style.width = '200px'; On 2016/04/26 01:13:42, ...
4 years, 7 months ago (2016-04-26 16:57:41 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1866623002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1866623002/220001
4 years, 7 months ago (2016-04-26 18:21:11 UTC) #21
commit-bot: I haz the power
Committed patchset #12 (id:220001)
4 years, 7 months ago (2016-04-26 19:11:09 UTC) #22
commit-bot: I haz the power
4 years, 7 months ago (2016-04-26 19:13:09 UTC) #24
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/065941e38a7ec787b7c1e13e50128816e1d422eb
Cr-Commit-Position: refs/heads/master@{#389838}

Powered by Google App Engine
This is Rietveld 408576698