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

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

Issue 2375363002: cc/blimp: Set up the framework for state serialization. (Closed)
Patch Set: test update Created 4 years, 2 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 | « cc/layers/picture_layer.h ('k') | cc/layers/picture_layer_unittest.cc » ('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/blimp/client_picture_cache.h" 9 #include "cc/blimp/client_picture_cache.h"
10 #include "cc/blimp/engine_picture_cache.h" 10 #include "cc/blimp/engine_picture_cache.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 199 }
200 200
201 bool PictureLayer::HasDrawableContent() const { 201 bool PictureLayer::HasDrawableContent() const {
202 return picture_layer_inputs_.client && Layer::HasDrawableContent(); 202 return picture_layer_inputs_.client && Layer::HasDrawableContent();
203 } 203 }
204 204
205 void PictureLayer::SetTypeForProtoSerialization(proto::LayerNode* proto) const { 205 void PictureLayer::SetTypeForProtoSerialization(proto::LayerNode* proto) const {
206 proto->set_type(proto::LayerNode::PICTURE_LAYER); 206 proto->set_type(proto::LayerNode::PICTURE_LAYER);
207 } 207 }
208 208
209 void PictureLayer::LayerSpecificPropertiesToProto( 209 void PictureLayer::LayerSpecificPropertiesToProto(proto::LayerProperties* proto,
210 proto::LayerProperties* proto) { 210 bool inputs_only) {
211 Layer::LayerSpecificPropertiesToProto(proto); 211 Layer::LayerSpecificPropertiesToProto(proto, inputs_only);
212 DropRecordingSourceContentIfInvalid(); 212 DropRecordingSourceContentIfInvalid();
213 213
214 proto::PictureLayerProperties* picture = proto->mutable_picture(); 214 proto::PictureLayerProperties* picture = proto->mutable_picture();
215 recording_source_->ToProtobuf(picture->mutable_recording_source()); 215 recording_source_->ToProtobuf(picture->mutable_recording_source());
216 216
217 RectToProto(picture_layer_inputs_.recorded_viewport, 217 RectToProto(picture_layer_inputs_.recorded_viewport,
218 picture->mutable_recorded_viewport()); 218 picture->mutable_recorded_viewport());
219 if (picture_layer_inputs_.display_list) { 219 if (picture_layer_inputs_.display_list) {
220 picture_layer_inputs_.display_list->ToProtobuf( 220 picture_layer_inputs_.display_list->ToProtobuf(
221 picture->mutable_display_list()); 221 picture->mutable_display_list());
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 picture_layer_inputs_.display_list = nullptr; 311 picture_layer_inputs_.display_list = nullptr;
312 picture_layer_inputs_.painter_reported_memory_usage = 0; 312 picture_layer_inputs_.painter_reported_memory_usage = 0;
313 } 313 }
314 } 314 }
315 315
316 const DisplayItemList* PictureLayer::GetDisplayItemList() { 316 const DisplayItemList* PictureLayer::GetDisplayItemList() {
317 return picture_layer_inputs_.display_list.get(); 317 return picture_layer_inputs_.display_list.get();
318 } 318 }
319 319
320 } // namespace cc 320 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer.h ('k') | cc/layers/picture_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698