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

Issue 1209413004: Instead of applying a transform for every RenderObject, pass down an Offset for where to paint. (Closed)

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

Description

Instead of applying a transform for every RenderObject, pass down an Offset for where to paint. This should be a perf win, but I haven't tested it. Also adds an operator overloading such that Offset + Size -> Rect. Also adds Rect.fromLTWH(). R=abarth@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/136e0d4da5c8cfb802c7b77fb811a5b5d1293003

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+634 lines, -508 lines) Patch
M sky/engine/core/painting/Offset.dart View 1 chunk +7 lines, -1 line 1 comment Download
M sky/engine/core/painting/Rect.dart View 1 chunk +8 lines, -0 lines 0 comments Download
M sky/sdk/lib/example/game/lib/sprite_box.dart View 1 chunk +2 lines, -1 line 0 comments Download
M sky/sdk/lib/example/raw/spinning_image.dart View 1 chunk +2 lines, -1 line 0 comments Download
M sky/sdk/lib/example/rendering/borders.dart View 1 chunk +0 lines, -1 line 0 comments Download
M sky/sdk/lib/example/rendering/interactive_flex.dart View 1 chunk +0 lines, -2 lines 0 comments Download
M sky/sdk/lib/example/rendering/sector_layout.dart View 5 chunks +16 lines, -16 lines 0 comments Download
M sky/sdk/lib/example/rendering/spinning_flex.dart View 1 chunk +0 lines, -1 line 0 comments Download
M sky/sdk/lib/example/rendering/touch_demo.dart View 2 chunks +7 lines, -6 lines 0 comments Download
M sky/sdk/lib/example/widgets/spinning_mixed.dart View 3 chunks +1 line, -4 lines 0 comments Download
M sky/sdk/lib/rendering/block.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M sky/sdk/lib/rendering/box.dart View 16 chunks +39 lines, -33 lines 2 comments Download
M sky/sdk/lib/rendering/flex.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M sky/sdk/lib/rendering/object.dart View 2 chunks +3 lines, -5 lines 0 comments Download
M sky/sdk/lib/rendering/paragraph.dart View 2 chunks +3 lines, -1 line 1 comment Download
M sky/sdk/lib/rendering/stack.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M sky/sdk/lib/widgets/ink_well.dart View 1 chunk +3 lines, -2 lines 0 comments Download
M sky/sdk/lib/widgets/scaffold.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M sky/sdk/lib/widgets/tabs.dart View 2 chunks +8 lines, -7 lines 0 comments Download
M sky/tests/examples/sector-expected.txt View 13 chunks +291 lines, -249 lines 0 comments Download
M sky/tests/examples/stocks-expected.txt View 4 chunks +34 lines, -28 lines 0 comments Download
M sky/tests/examples/styled_text-expected.txt View 1 chunk +44 lines, -26 lines 0 comments Download
M sky/tests/examples/tabs-expected.txt View 1 chunk +70 lines, -52 lines 0 comments Download
M sky/tests/raw/box_layout-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M sky/tests/raw/render_flex-expected.txt View 1 chunk +12 lines, -12 lines 0 comments Download
M sky/tests/raw/sector_layout-expected.txt View 1 chunk +6 lines, -6 lines 0 comments Download
M sky/tests/resources/display_list.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M sky/tests/widgets/buttons-expected.txt View 3 chunks +15 lines, -9 lines 0 comments Download
M sky/tests/widgets/dialog-expected.txt View 1 chunk +13 lines, -7 lines 0 comments Download
M sky/tests/widgets/syncs1-expected.txt View 3 chunks +39 lines, -27 lines 0 comments Download

Messages

Total messages: 3 (1 generated)
abarth-chromium
LGTM. Much cleaner than I was expecting. https://codereview.chromium.org/1209413004/diff/1/sky/engine/core/painting/Offset.dart File sky/engine/core/painting/Offset.dart (right): https://codereview.chromium.org/1209413004/diff/1/sky/engine/core/painting/Offset.dart#newcode27 sky/engine/core/painting/Offset.dart:27: return new ...
5 years, 6 months ago (2015-06-27 00:39:38 UTC) #2
Hixie
5 years, 5 months ago (2015-06-29 16:07:17 UTC) #3
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
136e0d4da5c8cfb802c7b77fb811a5b5d1293003 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698