Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(380)

Side by Side Diff: cc/layers/picture_layer.cc

Issue 2877483003: Implements core logic for Pixel Canvas (Closed)
Patch Set: Sync with ToT Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/wm/drag_window_controller.cc ('k') | cc/layers/recording_source.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/wm/drag_window_controller.cc ('k') | cc/layers/recording_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698