| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/picture_layer.h" | 5 #include "cc/layers/picture_layer.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
| 9 #include "cc/layers/content_layer_client.h" | 9 #include "cc/layers/content_layer_client.h" |
| 10 #include "cc/layers/picture_layer_impl.h" | 10 #include "cc/layers/picture_layer_impl.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 if (updated) { | 129 if (updated) { |
| 130 picture_layer_inputs_.display_list = | 130 picture_layer_inputs_.display_list = |
| 131 picture_layer_inputs_.client->PaintContentsToDisplayList( | 131 picture_layer_inputs_.client->PaintContentsToDisplayList( |
| 132 ContentLayerClient::PAINTING_BEHAVIOR_NORMAL); | 132 ContentLayerClient::PAINTING_BEHAVIOR_NORMAL); |
| 133 picture_layer_inputs_.painter_reported_memory_usage = | 133 picture_layer_inputs_.painter_reported_memory_usage = |
| 134 picture_layer_inputs_.client->GetApproximateUnsharedMemoryUsage(); | 134 picture_layer_inputs_.client->GetApproximateUnsharedMemoryUsage(); |
| 135 recording_source_->UpdateDisplayItemList( | 135 recording_source_->UpdateDisplayItemList( |
| 136 picture_layer_inputs_.display_list, | 136 picture_layer_inputs_.display_list, |
| 137 picture_layer_inputs_.painter_reported_memory_usage); | 137 picture_layer_inputs_.painter_reported_memory_usage); |
| 138 recording_source_->SetRecordingScaleFactor( |
| 139 layer_tree_host()->recording_scale_factor()); |
| 140 |
| 138 SetNeedsPushProperties(); | 141 SetNeedsPushProperties(); |
| 139 } else { | 142 } else { |
| 140 // If this invalidation did not affect the recording source, then it can be | 143 // If this invalidation did not affect the recording source, then it can be |
| 141 // cleared as an optimization. | 144 // cleared as an optimization. |
| 142 last_updated_invalidation_.Clear(); | 145 last_updated_invalidation_.Clear(); |
| 143 } | 146 } |
| 144 | 147 |
| 145 return updated; | 148 return updated; |
| 146 } | 149 } |
| 147 | 150 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 return false; | 295 return false; |
| 293 | 296 |
| 294 return true; | 297 return true; |
| 295 } | 298 } |
| 296 | 299 |
| 297 const DisplayItemList* PictureLayer::GetDisplayItemList() { | 300 const DisplayItemList* PictureLayer::GetDisplayItemList() { |
| 298 return picture_layer_inputs_.display_list.get(); | 301 return picture_layer_inputs_.display_list.get(); |
| 299 } | 302 } |
| 300 | 303 |
| 301 } // namespace cc | 304 } // namespace cc |
| OLD | NEW |