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

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

Issue 687873004: Introduce Property Trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wip-awoloszyn2
Patch Set: . Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <stack> 8 #include <stack>
9 #include <string> 9 #include <string>
10 10
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 float device_scale_factor, 1202 float device_scale_factor,
1203 const gfx::Rect& viewport, 1203 const gfx::Rect& viewport,
1204 const gfx::Transform& device_transform, 1204 const gfx::Transform& device_transform,
1205 OpacityTree* opacity_tree, 1205 OpacityTree* opacity_tree,
1206 TransformTree* transform_tree, 1206 TransformTree* transform_tree,
1207 ClipTree* clip_tree) { 1207 ClipTree* clip_tree) {
1208 std::vector<Layer*> layers_to_update; 1208 std::vector<Layer*> layers_to_update;
1209 FindLayersThatNeedVisibleRects(root_layer, &layers_to_update); 1209 FindLayersThatNeedVisibleRects(root_layer, &layers_to_update);
1210 1210
1211 if (!layers_to_update.empty()) { 1211 if (!layers_to_update.empty()) {
1212 // TODO(ajuma): Can we efficiently cache some of this rather than
1213 // starting from scratch every frame?
1214 opacity_tree->clear();
1215 transform_tree->clear();
1216 clip_tree->clear();
1217
1218 // Let's make the tiny trees! 1212 // Let's make the tiny trees!
1219 PropertyTreeBuilder::BuildPropertyTrees(root_layer, 1213 PropertyTreeBuilder::BuildPropertyTrees(root_layer,
1220 page_scale_layer, 1214 page_scale_layer,
1221 page_scale_factor, 1215 page_scale_factor,
1222 device_scale_factor, 1216 device_scale_factor,
1223 viewport, 1217 viewport,
1224 device_transform, 1218 device_transform,
1225 opacity_tree, 1219 opacity_tree,
1226 transform_tree, 1220 transform_tree,
1227 clip_tree); 1221 clip_tree);
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
1808 1802
1809 void LayerTreeHost::set_surface_id_namespace(uint32_t id_namespace) { 1803 void LayerTreeHost::set_surface_id_namespace(uint32_t id_namespace) {
1810 surface_id_namespace_ = id_namespace; 1804 surface_id_namespace_ = id_namespace;
1811 } 1805 }
1812 1806
1813 SurfaceSequence LayerTreeHost::CreateSurfaceSequence() { 1807 SurfaceSequence LayerTreeHost::CreateSurfaceSequence() {
1814 return SurfaceSequence(surface_id_namespace_, next_surface_sequence_++); 1808 return SurfaceSequence(surface_id_namespace_, next_surface_sequence_++);
1815 } 1809 }
1816 1810
1817 } // namespace cc 1811 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698