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

Issue 1008173003: Move SkPaint mangement for 2D canvas into CanvasRenderingContext2DState (Closed)

Created:
5 years, 9 months ago by Justin Novosad
Modified:
5 years, 9 months ago
Reviewers:
Stephen White
CC:
blink-reviews, krit, dshwang, Dominik Röttsches, blink-reviews-style_chromium.org, blink-reviews-html_chromium.org, pdr+graphicswatchlist_chromium.org, jbroman, danakj, dglazkov+blink, Rik, f(malita), Stephen Chennney, aandrey+blink_chromium.org, rwlbuis
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Move SkPaint mangement for 2D canvas into CanvasRenderingContext2DState With this change CanvasRenderingContext2DState now has the ability to generate the SkPaint objects required draw canvas primitives directly to an SkCanvas, without using blink::GraphicsContext. This change migrates the fillRect and strokeRect methods to use the new code path thus making them completely independent of GraphicsContext BUG=453113 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=192449

Patch Set 1 #

Total comments: 7

Patch Set 2 : fixup #

Patch Set 3 : fixup2 #

Total comments: 20

Patch Set 4 : another try #

Patch Set 5 : applied review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+439 lines, -114 lines) Patch
M Source/core/html/canvas/CanvasRenderingContext2D.h View 1 2 3 4 4 chunks +3 lines, -3 lines 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext2D.cpp View 1 2 3 4 9 chunks +61 lines, -35 lines 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext2DState.h View 1 2 3 4 6 chunks +59 lines, -33 lines 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext2DState.cpp View 1 2 3 4 7 chunks +270 lines, -28 lines 0 comments Download
M Source/core/html/canvas/CanvasStyle.h View 2 chunks +6 lines, -2 lines 0 comments Download
M Source/core/html/canvas/CanvasStyle.cpp View 1 1 chunk +23 lines, -0 lines 0 comments Download
M Source/platform/graphics/DrawLooperBuilder.cpp View 1 2 3 3 chunks +2 lines, -8 lines 0 comments Download
M Source/platform/graphics/GraphicsTypes.h View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M Source/platform/graphics/ImageBufferSurface.h View 1 2 3 4 1 chunk +0 lines, -5 lines 0 comments Download
M Source/platform/graphics/skia/SkiaUtils.h View 1 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (2 generated)
Justin Novosad
PTAL
5 years, 9 months ago (2015-03-18 21:32:18 UTC) #2
Stephen White
Looks like a great start. I like the direction here. https://codereview.chromium.org/1008173003/diff/1/Source/core/html/canvas/CanvasRenderingContext2D.cpp File Source/core/html/canvas/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/1008173003/diff/1/Source/core/html/canvas/CanvasRenderingContext2D.cpp#newcode1193 ...
5 years, 9 months ago (2015-03-18 22:09:35 UTC) #3
Justin Novosad
https://codereview.chromium.org/1008173003/diff/1/Source/core/html/canvas/CanvasRenderingContext2D.cpp File Source/core/html/canvas/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/1008173003/diff/1/Source/core/html/canvas/CanvasRenderingContext2D.cpp#newcode1193 Source/core/html/canvas/CanvasRenderingContext2D.cpp:1193: // FIXME(crbug.com/425531): Funtional.h cannot handle override function signature. On ...
5 years, 9 months ago (2015-03-19 14:32:21 UTC) #4
Stephen White
On 2015/03/19 14:32:21, junov wrote: > https://codereview.chromium.org/1008173003/diff/1/Source/core/html/canvas/CanvasRenderingContext2D.cpp > File Source/core/html/canvas/CanvasRenderingContext2D.cpp (right): > > https://codereview.chromium.org/1008173003/diff/1/Source/core/html/canvas/CanvasRenderingContext2D.cpp#newcode1193 > ...
5 years, 9 months ago (2015-03-19 14:34:37 UTC) #5
Justin Novosad
new patch
5 years, 9 months ago (2015-03-19 19:42:09 UTC) #6
Justin Novosad
https://codereview.chromium.org/1008173003/diff/40001/Source/core/html/canvas/CanvasRenderingContext2D.cpp File Source/core/html/canvas/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/1008173003/diff/40001/Source/core/html/canvas/CanvasRenderingContext2D.cpp#newcode1193 Source/core/html/canvas/CanvasRenderingContext2D.cpp:1193: static void drawRectOnCanvas(const FloatRect& rect, SkCanvas* canvas, const SkPaint* ...
5 years, 9 months ago (2015-03-19 19:45:30 UTC) #7
Stephen White
https://codereview.chromium.org/1008173003/diff/40001/Source/core/html/canvas/CanvasRenderingContext2D.cpp File Source/core/html/canvas/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/1008173003/diff/40001/Source/core/html/canvas/CanvasRenderingContext2D.cpp#newcode1195 Source/core/html/canvas/CanvasRenderingContext2D.cpp:1195: if (paint->getStyle() == SkPaint::kStroke_Style && ((rect.width() > 0) ^ ...
5 years, 9 months ago (2015-03-19 20:35:17 UTC) #8
Justin Novosad
https://codereview.chromium.org/1008173003/diff/40001/Source/core/html/canvas/CanvasRenderingContext2D.cpp File Source/core/html/canvas/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/1008173003/diff/40001/Source/core/html/canvas/CanvasRenderingContext2D.cpp#newcode1195 Source/core/html/canvas/CanvasRenderingContext2D.cpp:1195: if (paint->getStyle() == SkPaint::kStroke_Style && ((rect.width() > 0) ^ ...
5 years, 9 months ago (2015-03-19 21:03:36 UTC) #9
Justin Novosad
new patch
5 years, 9 months ago (2015-03-19 21:13:31 UTC) #10
Stephen White
https://codereview.chromium.org/1008173003/diff/40001/Source/platform/graphics/GraphicsTypes.h File Source/platform/graphics/GraphicsTypes.h (right): https://codereview.chromium.org/1008173003/diff/40001/Source/platform/graphics/GraphicsTypes.h#newcode79 Source/platform/graphics/GraphicsTypes.h:79: enum CanvasPaintType { On 2015/03/19 21:03:36, junov wrote: > ...
5 years, 9 months ago (2015-03-19 22:37:26 UTC) #11
Stephen White
https://codereview.chromium.org/1008173003/diff/40001/Source/core/html/canvas/CanvasRenderingContext2D.cpp File Source/core/html/canvas/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/1008173003/diff/40001/Source/core/html/canvas/CanvasRenderingContext2D.cpp#newcode1502 Source/core/html/canvas/CanvasRenderingContext2D.cpp:1502: void CanvasRenderingContext2D::fullCanvasCompositedDraw(PassOwnPtr<Function<void(SkCanvas*, const SkPaint*)>> draw, CanvasPaintType paintType, CanvasShadowStrategy shadowStrategy) ...
5 years, 9 months ago (2015-03-19 22:47:54 UTC) #12
Justin Novosad
On 2015/03/19 22:37:26, Stephen White wrote: > https://codereview.chromium.org/1008173003/diff/40001/Source/platform/graphics/GraphicsTypes.h > File Source/platform/graphics/GraphicsTypes.h (right): > > https://codereview.chromium.org/1008173003/diff/40001/Source/platform/graphics/GraphicsTypes.h#newcode79 ...
5 years, 9 months ago (2015-03-23 18:19:41 UTC) #13
Justin Novosad
On 2015/03/19 22:47:54, Stephen White wrote: > > The idea was to hide the looper/imagefilter ...
5 years, 9 months ago (2015-03-23 18:20:58 UTC) #14
Justin Novosad
Ping.
5 years, 9 months ago (2015-03-24 15:48:14 UTC) #15
Stephen White
LGTM https://codereview.chromium.org/1008173003/diff/40001/Source/core/html/canvas/CanvasRenderingContext2D.h File Source/core/html/canvas/CanvasRenderingContext2D.h (right): https://codereview.chromium.org/1008173003/diff/40001/Source/core/html/canvas/CanvasRenderingContext2D.h#newcode263 Source/core/html/canvas/CanvasRenderingContext2D.h:263: void fullCanvasCompositedDraw(PassOwnPtr<Closure> draw); // deprecated On 2015/03/19 21:03:36, ...
5 years, 9 months ago (2015-03-24 15:52:06 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1008173003/80001
5 years, 9 months ago (2015-03-24 16:00:50 UTC) #18
commit-bot: I haz the power
5 years, 9 months ago (2015-03-24 17:12:41 UTC) #19
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=192449

Powered by Google App Engine
This is Rietveld 408576698