| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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/layers/content_layer.h" | 5 #include "cc/layers/content_layer.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "cc/layers/content_layer_client.h" | 10 #include "cc/layers/content_layer_client.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 void ContentLayer::SetTexturePriorities( | 82 void ContentLayer::SetTexturePriorities( |
| 83 const PriorityCalculator& priority_calc) { | 83 const PriorityCalculator& priority_calc) { |
| 84 // Update the tile data before creating all the layer's tiles. | 84 // Update the tile data before creating all the layer's tiles. |
| 85 UpdateTileSizeAndTilingOption(); | 85 UpdateTileSizeAndTilingOption(); |
| 86 | 86 |
| 87 TiledLayer::SetTexturePriorities(priority_calc); | 87 TiledLayer::SetTexturePriorities(priority_calc); |
| 88 } | 88 } |
| 89 | 89 |
| 90 bool ContentLayer::Update(ResourceUpdateQueue* queue, | 90 bool ContentLayer::Update(ResourceUpdateQueue* queue, |
| 91 const OcclusionTracker* occlusion) { | 91 const OcclusionTracker<Layer>* occlusion) { |
| 92 { | 92 { |
| 93 base::AutoReset<bool> ignore_set_needs_commit(&ignore_set_needs_commit_, | 93 base::AutoReset<bool> ignore_set_needs_commit(&ignore_set_needs_commit_, |
| 94 true); | 94 true); |
| 95 | 95 |
| 96 CreateUpdaterIfNeeded(); | 96 CreateUpdaterIfNeeded(); |
| 97 UpdateCanUseLCDText(); | 97 UpdateCanUseLCDText(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 bool updated = TiledLayer::Update(queue, occlusion); | 100 bool updated = TiledLayer::Update(queue, occlusion); |
| 101 return updated; | 101 return updated; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 return picture; | 165 return picture; |
| 166 } | 166 } |
| 167 | 167 |
| 168 void ContentLayer::OnOutputSurfaceCreated() { | 168 void ContentLayer::OnOutputSurfaceCreated() { |
| 169 SetTextureFormat( | 169 SetTextureFormat( |
| 170 layer_tree_host()->GetRendererCapabilities().best_texture_format); | 170 layer_tree_host()->GetRendererCapabilities().best_texture_format); |
| 171 TiledLayer::OnOutputSurfaceCreated(); | 171 TiledLayer::OnOutputSurfaceCreated(); |
| 172 } | 172 } |
| 173 | 173 |
| 174 } // namespace cc | 174 } // namespace cc |
| OLD | NEW |