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_host.h" | 5 #include "cc/trees/layer_tree_host.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 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1063 base::AutoReset<bool> painting(&in_paint_layer_contents_, true); | 1063 base::AutoReset<bool> painting(&in_paint_layer_contents_, true); |
1064 bool did_paint_content = false; | 1064 bool did_paint_content = false; |
1065 for (const auto& layer : update_layer_list) { | 1065 for (const auto& layer : update_layer_list) { |
1066 did_paint_content |= layer->Update(); | 1066 did_paint_content |= layer->Update(); |
1067 *content_is_suitable_for_gpu &= layer->IsSuitableForGpuRasterization(); | 1067 *content_is_suitable_for_gpu &= layer->IsSuitableForGpuRasterization(); |
1068 } | 1068 } |
1069 return did_paint_content; | 1069 return did_paint_content; |
1070 } | 1070 } |
1071 | 1071 |
1072 void LayerTreeHost::AddLayerShouldPushProperties(Layer* layer) { | 1072 void LayerTreeHost::AddLayerShouldPushProperties(Layer* layer) { |
1073 if (layer->is_hidden()) | |
enne (OOO)
2017/05/01 20:15:09
This is a little awkward, here. I think what you
jaydasika
2017/05/01 23:41:39
Yes, what we want to say is if a layer is hidden,
enne (OOO)
2017/05/02 01:46:01
That sounds good!
jaydasika
2017/05/19 19:08:59
Done.
| |
1074 return; | |
1073 layers_that_should_push_properties_.insert(layer); | 1075 layers_that_should_push_properties_.insert(layer); |
1074 } | 1076 } |
1075 | 1077 |
1076 void LayerTreeHost::RemoveLayerShouldPushProperties(Layer* layer) { | 1078 void LayerTreeHost::RemoveLayerShouldPushProperties(Layer* layer) { |
1077 layers_that_should_push_properties_.erase(layer); | 1079 layers_that_should_push_properties_.erase(layer); |
1078 } | 1080 } |
1079 | 1081 |
1080 std::unordered_set<Layer*>& LayerTreeHost::LayersThatShouldPushProperties() { | 1082 std::unordered_set<Layer*>& LayerTreeHost::LayersThatShouldPushProperties() { |
1081 return layers_that_should_push_properties_; | 1083 return layers_that_should_push_properties_; |
1082 } | 1084 } |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1439 void LayerTreeHost::SetNeedsDisplayOnAllLayers() { | 1441 void LayerTreeHost::SetNeedsDisplayOnAllLayers() { |
1440 for (auto* layer : *this) | 1442 for (auto* layer : *this) |
1441 layer->SetNeedsDisplay(); | 1443 layer->SetNeedsDisplay(); |
1442 } | 1444 } |
1443 | 1445 |
1444 void LayerTreeHost::SetHasCopyRequest(bool has_copy_request) { | 1446 void LayerTreeHost::SetHasCopyRequest(bool has_copy_request) { |
1445 has_copy_request_ = has_copy_request; | 1447 has_copy_request_ = has_copy_request; |
1446 } | 1448 } |
1447 | 1449 |
1448 } // namespace cc | 1450 } // namespace cc |
OLD | NEW |