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

Unified Diff: cc/trees/draw_property_utils.cc

Issue 1413153014: Add a flag for enabling compositor property trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: cc/trees/draw_property_utils.cc
diff --git a/cc/trees/draw_property_utils.cc b/cc/trees/draw_property_utils.cc
index c7cb5631fa39c661da64b6bf634bce8a2723b3c5..afed9fefe58286506a327e21c91414bb0cedb210 100644
--- a/cc/trees/draw_property_utils.cc
+++ b/cc/trees/draw_property_utils.cc
@@ -588,7 +588,8 @@ void ComputeVisibleRectsUsingPropertyTreesInternal(
LayerType* root_layer,
PropertyTrees* property_trees,
bool can_render_to_separate_surface,
- typename LayerType::LayerListType* update_layer_list) {
+ typename LayerType::LayerListType* update_layer_list,
+ std::vector<LayerType*>* visible_layer_list) {
if (property_trees->non_root_surfaces_enabled !=
can_render_to_separate_surface) {
property_trees->non_root_surfaces_enabled = can_render_to_separate_surface;
@@ -602,12 +603,11 @@ void ComputeVisibleRectsUsingPropertyTreesInternal(
ComputeOpacities(&property_trees->effect_tree);
const bool subtree_is_visible_from_ancestor = true;
- std::vector<LayerType*> visible_layer_list;
FindLayersThatNeedUpdates(root_layer, property_trees->transform_tree,
subtree_is_visible_from_ancestor, update_layer_list,
- &visible_layer_list);
+ visible_layer_list);
CalculateVisibleRects<LayerType>(
- visible_layer_list, property_trees->clip_tree,
+ *visible_layer_list, property_trees->clip_tree,
property_trees->transform_tree, can_render_to_separate_surface);
}
@@ -643,32 +643,34 @@ void BuildPropertyTreesAndComputeVisibleRects(
const gfx::Transform& device_transform,
bool can_render_to_separate_surface,
PropertyTrees* property_trees,
- LayerImplList* update_layer_list) {
+ LayerImplList* visible_layer_list) {
PropertyTreeBuilder::BuildPropertyTrees(
root_layer, page_scale_layer, inner_viewport_scroll_layer,
outer_viewport_scroll_layer, page_scale_factor, device_scale_factor,
viewport, device_transform, property_trees);
ComputeVisibleRectsUsingPropertyTrees(root_layer, property_trees,
can_render_to_separate_surface,
- update_layer_list);
+ visible_layer_list);
}
void ComputeVisibleRectsUsingPropertyTrees(Layer* root_layer,
PropertyTrees* property_trees,
bool can_render_to_separate_surface,
LayerList* update_layer_list) {
- ComputeVisibleRectsUsingPropertyTreesInternal(root_layer, property_trees,
- can_render_to_separate_surface,
- update_layer_list);
+ std::vector<Layer*> visible_layer_list;
+ ComputeVisibleRectsUsingPropertyTreesInternal(
+ root_layer, property_trees, can_render_to_separate_surface,
+ update_layer_list, &visible_layer_list);
}
void ComputeVisibleRectsUsingPropertyTrees(LayerImpl* root_layer,
PropertyTrees* property_trees,
bool can_render_to_separate_surface,
- LayerImplList* update_layer_list) {
- ComputeVisibleRectsUsingPropertyTreesInternal(root_layer, property_trees,
- can_render_to_separate_surface,
- update_layer_list);
+ LayerImplList* visible_layer_list) {
+ LayerImplList update_layer_list;
+ ComputeVisibleRectsUsingPropertyTreesInternal(
+ root_layer, property_trees, can_render_to_separate_surface,
+ &update_layer_list, visible_layer_list);
}
template <typename LayerType>

Powered by Google App Engine
This is Rietveld 408576698