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

Issue 2087963003: cc: Stop creating unused 0 property tree nodes other than transform

Created:
4 years, 6 months ago by weiliangc
Modified:
4 years, 5 months ago
Reviewers:
ajuma, jbroman
CC:
chromium-reviews, cc-bugs_chromium.org, jaydasika, enne (OOO), Ian Vollick, sunxd
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Stop creating unused 0 property tree nodes other than transform Other than transform trees, all other types of property trees don't need a 0 node, thus remove them. Transform tree uses the 0 node as device space. Also use contants with names instead of raw numbers. R=jbroman, ajuma BUG=620322 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Patch Set 1 #

Total comments: 13

Patch Set 2 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+291 lines, -253 lines) Patch
M cc/layers/layer_impl.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M cc/layers/render_surface_impl.cc View 1 2 chunks +2 lines, -8 lines 0 comments Download
M cc/trees/draw_property_utils.cc View 1 7 chunks +16 lines, -12 lines 0 comments Download
M cc/trees/layer_tree_host_common.cc View 1 2 chunks +4 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_common_unittest.cc View 1 7 chunks +25 lines, -38 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M cc/trees/layer_tree_impl.cc View 1 5 chunks +9 lines, -6 lines 0 comments Download
M cc/trees/property_tree.h View 1 4 chunks +19 lines, -2 lines 0 comments Download
M cc/trees/property_tree.cc View 1 25 chunks +50 lines, -42 lines 0 comments Download
M cc/trees/property_tree_builder.cc View 1 7 chunks +20 lines, -19 lines 0 comments Download
M cc/trees/property_tree_unittest.cc View 1 24 chunks +142 lines, -119 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
weiliangc
Stop the evil that is raw int in code! (which is at least half my ...
4 years, 6 months ago (2016-06-21 20:55:33 UTC) #2
weiliangc
On 2016/06/21 20:55:33, weiliangc wrote: > Stop the evil that is raw int in code! ...
4 years, 6 months ago (2016-06-21 21:18:45 UTC) #3
ajuma
Removing the dummy node in TransformTree as well would be really nice, if we can ...
4 years, 6 months ago (2016-06-22 13:29:51 UTC) #4
ajuma
4 years, 6 months ago (2016-06-22 17:06:57 UTC) #5
Noticed a few more ints:

https://codereview.chromium.org/2087963003/diff/1/cc/trees/draw_property_util...
File cc/trees/draw_property_utils.cc (right):

https://codereview.chromium.org/2087963003/diff/1/cc/trees/draw_property_util...
cc/trees/draw_property_utils.cc:787: for (int i = 2; i <
static_cast<int>(effect_tree->size()); ++i) {
Should this be kRootNodeId+1 instead of 2?

https://codereview.chromium.org/2087963003/diff/1/cc/trees/property_tree.cc
File cc/trees/property_tree.cc (right):

https://codereview.chromium.org/2087963003/diff/1/cc/trees/property_tree.cc#n...
cc/trees/property_tree.cc:1603: DCHECK_EQ(0, destination_id);
TransformTree::kDeviceNodeId

https://codereview.chromium.org/2087963003/diff/1/cc/trees/property_tree.cc#n...
cc/trees/property_tree.cc:1604: source_id = 1;
TransformTree::kRootNodeId

https://codereview.chromium.org/2087963003/diff/1/cc/trees/property_tree.cc#n...
cc/trees/property_tree.cc:1662: if (size() < 2)
I think this should be 1 now that the viewport has shifted to node 0.

https://codereview.chromium.org/2087963003/diff/1/cc/trees/property_tree.cc#n...
cc/trees/property_tree.cc:1673: DCHECK_GT(size(), min_size);
And this should be a DCHECK_GE now.

Powered by Google App Engine
This is Rietveld 408576698