OLD | NEW |
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_impl.h" | 5 #include "cc/trees/layer_tree_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
923 bool LayerTreeImpl::UpdateDrawProperties(bool update_lcd_text) { | 923 bool LayerTreeImpl::UpdateDrawProperties(bool update_lcd_text) { |
924 if (!needs_update_draw_properties_) | 924 if (!needs_update_draw_properties_) |
925 return true; | 925 return true; |
926 | 926 |
927 // Calling UpdateDrawProperties must clear this flag, so there can be no | 927 // Calling UpdateDrawProperties must clear this flag, so there can be no |
928 // early outs before this. | 928 // early outs before this. |
929 needs_update_draw_properties_ = false; | 929 needs_update_draw_properties_ = false; |
930 | 930 |
931 // For max_texture_size. When a new output surface is received the needs | 931 // For max_texture_size. When a new output surface is received the needs |
932 // update draw properties flag is set again. | 932 // update draw properties flag is set again. |
933 if (!layer_tree_host_impl_->output_surface()) | 933 if (!layer_tree_host_impl_->compositor_frame_sink()) |
934 return false; | 934 return false; |
935 | 935 |
936 // Clear this after the renderer early out, as it should still be | 936 // Clear this after the renderer early out, as it should still be |
937 // possible to hit test even without a renderer. | 937 // possible to hit test even without a renderer. |
938 render_surface_layer_list_.clear(); | 938 render_surface_layer_list_.clear(); |
939 | 939 |
940 if (layer_list_.empty()) | 940 if (layer_list_.empty()) |
941 return false; | 941 return false; |
942 | 942 |
943 { | 943 { |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1260 | 1260 |
1261 const LayerTreeSettings& LayerTreeImpl::settings() const { | 1261 const LayerTreeSettings& LayerTreeImpl::settings() const { |
1262 return layer_tree_host_impl_->settings(); | 1262 return layer_tree_host_impl_->settings(); |
1263 } | 1263 } |
1264 | 1264 |
1265 const LayerTreeDebugState& LayerTreeImpl::debug_state() const { | 1265 const LayerTreeDebugState& LayerTreeImpl::debug_state() const { |
1266 return layer_tree_host_impl_->debug_state(); | 1266 return layer_tree_host_impl_->debug_state(); |
1267 } | 1267 } |
1268 | 1268 |
1269 ContextProvider* LayerTreeImpl::context_provider() const { | 1269 ContextProvider* LayerTreeImpl::context_provider() const { |
1270 return output_surface()->context_provider(); | 1270 return layer_tree_host_impl_->compositor_frame_sink()->context_provider(); |
1271 } | |
1272 | |
1273 OutputSurface* LayerTreeImpl::output_surface() const { | |
1274 return layer_tree_host_impl_->output_surface(); | |
1275 } | 1271 } |
1276 | 1272 |
1277 ResourceProvider* LayerTreeImpl::resource_provider() const { | 1273 ResourceProvider* LayerTreeImpl::resource_provider() const { |
1278 return layer_tree_host_impl_->resource_provider(); | 1274 return layer_tree_host_impl_->resource_provider(); |
1279 } | 1275 } |
1280 | 1276 |
1281 TileManager* LayerTreeImpl::tile_manager() const { | 1277 TileManager* LayerTreeImpl::tile_manager() const { |
1282 return layer_tree_host_impl_->tile_manager(); | 1278 return layer_tree_host_impl_->tile_manager(); |
1283 } | 1279 } |
1284 | 1280 |
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2076 | 2072 |
2077 void LayerTreeImpl::ResetAllChangeTracking() { | 2073 void LayerTreeImpl::ResetAllChangeTracking() { |
2078 layers_that_should_push_properties_.clear(); | 2074 layers_that_should_push_properties_.clear(); |
2079 // Iterate over all layers, including masks and replicas. | 2075 // Iterate over all layers, including masks and replicas. |
2080 for (auto& layer : *layers_) | 2076 for (auto& layer : *layers_) |
2081 layer->ResetChangeTracking(); | 2077 layer->ResetChangeTracking(); |
2082 property_trees_.ResetAllChangeTracking(); | 2078 property_trees_.ResetAllChangeTracking(); |
2083 } | 2079 } |
2084 | 2080 |
2085 } // namespace cc | 2081 } // namespace cc |
OLD | NEW |