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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 123 |
124 if (updated) { | 124 if (updated) { |
125 picture_layer_inputs_.display_list = | 125 picture_layer_inputs_.display_list = |
126 picture_layer_inputs_.client->PaintContentsToDisplayList( | 126 picture_layer_inputs_.client->PaintContentsToDisplayList( |
127 ContentLayerClient::PAINTING_BEHAVIOR_NORMAL); | 127 ContentLayerClient::PAINTING_BEHAVIOR_NORMAL); |
128 picture_layer_inputs_.painter_reported_memory_usage = | 128 picture_layer_inputs_.painter_reported_memory_usage = |
129 picture_layer_inputs_.client->GetApproximateUnsharedMemoryUsage(); | 129 picture_layer_inputs_.client->GetApproximateUnsharedMemoryUsage(); |
130 recording_source_->UpdateDisplayItemList( | 130 recording_source_->UpdateDisplayItemList( |
131 picture_layer_inputs_.display_list, | 131 picture_layer_inputs_.display_list, |
132 picture_layer_inputs_.painter_reported_memory_usage); | 132 picture_layer_inputs_.painter_reported_memory_usage); |
| 133 recording_source_->SetRecordingScaleFactor( |
| 134 layer_tree_host()->recording_scale_factor()); |
| 135 |
133 SetNeedsPushProperties(); | 136 SetNeedsPushProperties(); |
134 } else { | 137 } else { |
135 // If this invalidation did not affect the recording source, then it can be | 138 // If this invalidation did not affect the recording source, then it can be |
136 // cleared as an optimization. | 139 // cleared as an optimization. |
137 last_updated_invalidation_.Clear(); | 140 last_updated_invalidation_.Clear(); |
138 } | 141 } |
139 | 142 |
140 return updated; | 143 return updated; |
141 } | 144 } |
142 | 145 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 return false; | 289 return false; |
287 | 290 |
288 return true; | 291 return true; |
289 } | 292 } |
290 | 293 |
291 const DisplayItemList* PictureLayer::GetDisplayItemList() { | 294 const DisplayItemList* PictureLayer::GetDisplayItemList() { |
292 return picture_layer_inputs_.display_list.get(); | 295 return picture_layer_inputs_.display_list.get(); |
293 } | 296 } |
294 | 297 |
295 } // namespace cc | 298 } // namespace cc |
OLD | NEW |