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

Issue 1190123003: Decouple Canvas from DisplayList and map Picture and PictureRecorder more directly to their Skia co… (Closed)

Created:
5 years, 6 months ago by iansf
Modified:
5 years, 6 months ago
CC:
abarth-chromium, gregsimon, jackson_old, mojo-reviews_chromium.org, qsr+mojo_chromium.org
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Decouple Canvas from DisplayList and map Picture and PictureRecorder more directly to their Skia counterparts. Also changes the framework dart code to use the refactored APIs and fixes the various examples and tests. R=abarth@chromium.org, ianh@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/ef31fdcc6fd53f71abda8fb960fff447114ca9aa

Patch Set 1 #

Total comments: 16

Patch Set 2 : Changes after rebasing on master #

Patch Set 3 : Rework the API a bit #

Total comments: 12

Patch Set 4 : Hopefully final patch set, including test changes and results #

Patch Set 5 : j/k -- this one should actually be fully merged and testable #

Total comments: 42

Patch Set 6 : Fixes from prior reviews and conversations around exceptions #

Patch Set 7 : Rebased version of previous patch #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+647 lines, -631 lines) Patch
M sky/engine/bindings/exception_state.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M sky/engine/bindings/scripts/templates/methods_cpp.template View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M sky/engine/core/core.gni View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M sky/engine/core/dom/Document.cpp View 1 chunk +0 lines, -2 lines 0 comments Download
M sky/engine/core/dom/Element.cpp View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M sky/engine/core/dom/Element.idl View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M sky/engine/core/painting/Canvas.h View 1 2 3 4 5 3 chunks +37 lines, -12 lines 0 comments Download
M sky/engine/core/painting/Canvas.cpp View 1 2 21 chunks +2 lines, -33 lines 0 comments Download
M sky/engine/core/painting/Canvas.idl View 1 2 3 4 5 1 chunk +4 lines, -6 lines 0 comments Download
M sky/engine/core/painting/LayoutRoot.cpp View 1 2 2 chunks +2 lines, -1 line 0 comments Download
D sky/engine/core/painting/PaintingCallback.idl View 1 2 1 chunk +0 lines, -7 lines 0 comments Download
M sky/engine/core/painting/PaintingContext.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M sky/engine/core/painting/PaintingContext.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
D sky/engine/core/painting/PaintingContext.idl View 1 2 1 chunk +0 lines, -7 lines 0 comments Download
M sky/engine/core/painting/Picture.h View 2 chunks +5 lines, -6 lines 0 comments Download
M sky/engine/core/painting/Picture.cpp View 1 chunk +5 lines, -5 lines 0 comments Download
M sky/engine/core/painting/PictureRecorder.h View 1 2 3 4 5 1 chunk +22 lines, -5 lines 2 comments Download
M sky/engine/core/painting/PictureRecorder.cpp View 1 2 3 4 5 1 chunk +17 lines, -6 lines 1 comment Download
M sky/engine/core/painting/PictureRecorder.idl View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M sky/examples/game/lib/game_demo.dart View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M sky/examples/game/lib/game_demo_world.dart View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M sky/examples/game/lib/node.dart View 1 2 3 5 chunks +6 lines, -6 lines 0 comments Download
M sky/examples/game/lib/node_with_size.dart View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M sky/examples/game/lib/sprite.dart View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M sky/examples/game/lib/sprite_box.dart View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M sky/examples/raw/hello_world.dart View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M sky/examples/raw/launcher.dart View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M sky/examples/raw/painting.dart View 1 2 3 4 5 3 chunks +17 lines, -16 lines 0 comments Download
M sky/examples/raw/shadow.dart View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M sky/examples/raw/spinning_arabic.dart View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M sky/examples/raw/spinning_image.dart View 1 2 3 4 5 2 chunks +4 lines, -2 lines 0 comments Download
M sky/examples/raw/spinning_square.dart View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M sky/examples/rendering/sector_layout.dart View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M sky/examples/rendering/touch_demo.dart View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M sky/sdk/lib/rendering/README.md View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M sky/sdk/lib/rendering/block.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M sky/sdk/lib/rendering/box.dart View 1 2 3 4 5 14 chunks +16 lines, -15 lines 0 comments Download
M sky/sdk/lib/rendering/flex.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M sky/sdk/lib/rendering/object.dart View 1 2 3 2 chunks +3 lines, -4 lines 0 comments Download
M sky/sdk/lib/rendering/paragraph.dart View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M sky/sdk/lib/rendering/stack.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M sky/sdk/lib/widgets/ink_well.dart View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M sky/sdk/lib/widgets/scaffold.dart View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M sky/tests/examples/sector-expected.txt View 1 2 3 1 chunk +278 lines, -278 lines 0 comments Download
M sky/tests/examples/stocks-expected.txt View 1 2 3 4 3 chunks +35 lines, -35 lines 0 comments Download
M sky/tests/examples/styled_text-expected.txt View 1 2 3 1 chunk +32 lines, -32 lines 0 comments Download
M sky/tests/raw/box_layout-expected.txt View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M sky/tests/raw/padding_deflate-expected.txt View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M sky/tests/raw/render_box-expected.txt View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M sky/tests/raw/render_flex-expected.txt View 1 2 3 1 chunk +11 lines, -11 lines 0 comments Download
M sky/tests/raw/sector_layout-expected.txt View 1 2 3 1 chunk +9 lines, -9 lines 0 comments Download
M sky/tests/resources/display_list.dart View 1 2 3 4 5 5 chunks +13 lines, -10 lines 0 comments Download
M sky/tests/widgets/buttons-expected.txt View 1 2 3 4 5 6 1 chunk +17 lines, -17 lines 0 comments Download
M sky/tests/widgets/dialog-expected.txt View 1 2 3 4 5 6 1 chunk +13 lines, -13 lines 0 comments Download
M sky/tests/widgets/syncs1-expected.txt View 1 2 3 1 chunk +43 lines, -43 lines 0 comments Download

Messages

Total messages: 18 (2 generated)
iansf
This is still technically in-progress while I fix the expected output from the tests. Also, ...
5 years, 6 months ago (2015-06-17 23:37:08 UTC) #1
abarth-chromium
This looks great. I'll give it another look once you've rebased. https://codereview.chromium.org/1190123003/diff/1/sky/engine/core/painting/Canvas.cpp File sky/engine/core/painting/Canvas.cpp (right): ...
5 years, 6 months ago (2015-06-18 00:03:53 UTC) #2
Hixie
overall looks good to me, but this isn't my area of expertise https://codereview.chromium.org/1190123003/diff/1/sky/sdk/lib/framework/rendering/object.dart File sky/sdk/lib/framework/rendering/object.dart ...
5 years, 6 months ago (2015-06-18 00:07:10 UTC) #4
iansf
Changes for rebasing, in case you're curious. Doesn't address any of the prior comments yet.
5 years, 6 months ago (2015-06-18 18:17:12 UTC) #5
iansf
Changes for rebasing, in case you're curious. Doesn't address any of the prior comments yet.
5 years, 6 months ago (2015-06-18 18:17:15 UTC) #6
iansf
New version is here. The test part still isn't done, though. https://codereview.chromium.org/1190123003/diff/1/sky/engine/core/painting/Canvas.cpp File sky/engine/core/painting/Canvas.cpp (right): ...
5 years, 6 months ago (2015-06-20 00:02:40 UTC) #7
Hixie
https://codereview.chromium.org/1190123003/diff/40001/sky/engine/core/painting/PictureRecorder.idl File sky/engine/core/painting/PictureRecorder.idl (right): https://codereview.chromium.org/1190123003/diff/40001/sky/engine/core/painting/PictureRecorder.idl#newcode10 sky/engine/core/painting/PictureRecorder.idl:10: void setCanvas(Canvas canvas); Exposing setCanvas() to dart seems really ...
5 years, 6 months ago (2015-06-20 00:44:53 UTC) #8
abarth-chromium
https://codereview.chromium.org/1190123003/diff/40001/sky/engine/core/painting/Canvas.h File sky/engine/core/painting/Canvas.h (right): https://codereview.chromium.org/1190123003/diff/40001/sky/engine/core/painting/Canvas.h#newcode66 sky/engine/core/painting/Canvas.h:66: void clearSkCanvas() { m_canvas = nullptr; } How does ...
5 years, 6 months ago (2015-06-20 00:50:29 UTC) #9
iansf
Ok -- hopefully this patch set addresses the remaining issues. Thanks for the reviews!
5 years, 6 months ago (2015-06-23 00:27:00 UTC) #11
eseidel
This isn't actually too huge, but I'll need to take another pass through, probably in ...
5 years, 6 months ago (2015-06-23 00:41:32 UTC) #12
abarth-chromium
LGTM Please address Eric's feedback as well as mine before landing. https://codereview.chromium.org/1190123003/diff/80001/sky/engine/core/painting/Canvas.h File sky/engine/core/painting/Canvas.h (right): ...
5 years, 6 months ago (2015-06-23 02:28:45 UTC) #13
Hixie
https://codereview.chromium.org/1190123003/diff/80001/sky/examples/raw/painting.dart File sky/examples/raw/painting.dart (right): https://codereview.chromium.org/1190123003/diff/80001/sky/examples/raw/painting.dart#newcode9 sky/examples/raw/painting.dart:9: import 'package:sky/rendering/object.dart'; On 2015/06/23 at 02:28:45, abarth wrote: > ...
5 years, 6 months ago (2015-06-23 16:36:49 UTC) #14
iansf
One more CL incoming. https://codereview.chromium.org/1190123003/diff/80001/sky/engine/core/painting/Canvas.h File sky/engine/core/painting/Canvas.h (right): https://codereview.chromium.org/1190123003/diff/80001/sky/engine/core/painting/Canvas.h#newcode32 sky/engine/core/painting/Canvas.h:32: static PassRefPtr<Canvas> create(PassRefPtr<PictureRecorder> recorder, On ...
5 years, 6 months ago (2015-06-23 22:46:10 UTC) #15
iansf
Hopefully final set of changes for this patch.
5 years, 6 months ago (2015-06-23 22:56:03 UTC) #16
abarth-chromium
LGTM Ship it! :) https://codereview.chromium.org/1190123003/diff/120001/sky/engine/core/painting/PictureRecorder.cpp File sky/engine/core/painting/PictureRecorder.cpp (right): https://codereview.chromium.org/1190123003/diff/120001/sky/engine/core/painting/PictureRecorder.cpp#newcode42 sky/engine/core/painting/PictureRecorder.cpp:42: void PictureRecorder::set_canvas(PassRefPtr<Canvas> canvas) { m_canvas ...
5 years, 6 months ago (2015-06-24 01:29:34 UTC) #17
iansf
5 years, 6 months ago (2015-06-24 17:21:54 UTC) #18
Message was sent while issue was closed.
Committed patchset #7 (id:120001) manually as
ef31fdcc6fd53f71abda8fb960fff447114ca9aa (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698