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

Side by Side Diff: cc/trees/draw_property_utils.cc

Issue 953093002: cc: Derive draw opacity from property trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make opacity tree-building optional Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/draw_property_utils.h ('k') | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/draw_property_utils.h" 5 #include "cc/trees/draw_property_utils.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 } 255 }
256 256
257 void ComputeVisibleRectsUsingPropertyTrees( 257 void ComputeVisibleRectsUsingPropertyTrees(
258 Layer* root_layer, 258 Layer* root_layer,
259 const Layer* page_scale_layer, 259 const Layer* page_scale_layer,
260 float page_scale_factor, 260 float page_scale_factor,
261 float device_scale_factor, 261 float device_scale_factor,
262 const gfx::Rect& viewport, 262 const gfx::Rect& viewport,
263 const gfx::Transform& device_transform, 263 const gfx::Transform& device_transform,
264 TransformTree* transform_tree, 264 TransformTree* transform_tree,
265 ClipTree* clip_tree) { 265 ClipTree* clip_tree,
266 OpacityTree* opacity_tree) {
266 PropertyTreeBuilder::BuildPropertyTrees( 267 PropertyTreeBuilder::BuildPropertyTrees(
267 root_layer, page_scale_layer, page_scale_factor, device_scale_factor, 268 root_layer, page_scale_layer, page_scale_factor, device_scale_factor,
268 viewport, device_transform, transform_tree, clip_tree); 269 viewport, device_transform, transform_tree, clip_tree, opacity_tree);
269 ComputeTransforms(transform_tree); 270 ComputeTransforms(transform_tree);
270 ComputeClips(clip_tree, *transform_tree); 271 ComputeClips(clip_tree, *transform_tree);
271 272
272 std::vector<Layer*> layers_to_update; 273 std::vector<Layer*> layers_to_update;
273 const bool subtree_is_visible_from_ancestor = true; 274 const bool subtree_is_visible_from_ancestor = true;
274 FindLayersThatNeedVisibleRects(root_layer, *transform_tree, 275 FindLayersThatNeedVisibleRects(root_layer, *transform_tree,
275 subtree_is_visible_from_ancestor, 276 subtree_is_visible_from_ancestor,
276 &layers_to_update); 277 &layers_to_update);
277 CalculateVisibleRects(layers_to_update, *clip_tree, *transform_tree); 278 CalculateVisibleRects(layers_to_update, *clip_tree, *transform_tree);
278 } 279 }
279 280
280 } // namespace cc 281 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/draw_property_utils.h ('k') | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698