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 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
921 } | 921 } |
922 | 922 |
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 the renderer is re-created in | 931 // For max_texture_size. When a new output surface is received the needs |
932 // CreateAndSetRenderer, the needs update draw properties flag is set | 932 // update draw properties flag is set again. |
933 // again. | 933 if (!layer_tree_host_impl_->output_surface()) |
934 if (!layer_tree_host_impl_->renderer()) | |
935 return false; | 934 return false; |
936 | 935 |
937 // 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 |
938 // possible to hit test even without a renderer. | 937 // possible to hit test even without a renderer. |
939 render_surface_layer_list_.clear(); | 938 render_surface_layer_list_.clear(); |
940 | 939 |
941 if (layer_list_.empty()) | 940 if (layer_list_.empty()) |
942 return false; | 941 return false; |
943 | 942 |
944 { | 943 { |
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2077 | 2076 |
2078 void LayerTreeImpl::ResetAllChangeTracking() { | 2077 void LayerTreeImpl::ResetAllChangeTracking() { |
2079 layers_that_should_push_properties_.clear(); | 2078 layers_that_should_push_properties_.clear(); |
2080 // Iterate over all layers, including masks and replicas. | 2079 // Iterate over all layers, including masks and replicas. |
2081 for (auto& layer : *layers_) | 2080 for (auto& layer : *layers_) |
2082 layer->ResetChangeTracking(); | 2081 layer->ResetChangeTracking(); |
2083 property_trees_.ResetAllChangeTracking(); | 2082 property_trees_.ResetAllChangeTracking(); |
2084 } | 2083 } |
2085 | 2084 |
2086 } // namespace cc | 2085 } // namespace cc |
OLD | NEW |