summaryrefslogtreecommitdiffstats
path: root/cc/layers/picture_layer.h
diff options
context:
space:
mode:
authordtrainor <dtrainor@chromium.org>2016-01-04 01:53:05 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-04 09:54:21 +0000
commit8e9da48fa5086b27e076b21f729254cc8451c923 (patch)
treee9dce6ef8014c4a59ad12d3fdcf66f675e9424fe /cc/layers/picture_layer.h
parent5b06f2d1b704eec621a691f55fd16db08a5e6554 (diff)
downloadchromium_src-8e9da48fa5086b27e076b21f729254cc8451c923.zip
chromium_src-8e9da48fa5086b27e076b21f729254cc8451c923.tar.gz
chromium_src-8e9da48fa5086b27e076b21f729254cc8451c923.tar.bz2
Serialize PictureLayer properties.
Serialize the properties specific to the PictureLayer subclass. This required a few slight changes: - Don't query LayerImpl::bounds() in PictureLayer::PushPropertiesTo(). Instead rely on either Layer::bounds() or Layer::paint_properties().bounds depending on the source_frame_number. Since LayerImpl's bounds are set by Layer::PushPropertiesTo() right before this check, this should result in the same behavior. - Create an EmptyContentLayerClient to be used by all PictureLayer instances created by LayerProtoConverter::FindOrAllocateAndConstruct(). BUG=538710 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1527863002 Cr-Commit-Position: refs/heads/master@{#367300}
Diffstat (limited to 'cc/layers/picture_layer.h')
-rw-r--r--cc/layers/picture_layer.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/cc/layers/picture_layer.h b/cc/layers/picture_layer.h
index 7f1345e..b7e7152 100644
--- a/cc/layers/picture_layer.h
+++ b/cc/layers/picture_layer.h
@@ -53,10 +53,18 @@ class CC_EXPORT PictureLayer : public Layer {
~PictureLayer() override;
bool HasDrawableContent() const override;
+ void SetTypeForProtoSerialization(proto::LayerNode* proto) const override;
+ void LayerSpecificPropertiesToProto(proto::LayerProperties* proto) override;
+ void FromLayerSpecificPropertiesProto(
+ const proto::LayerProperties& proto) override;
bool is_mask() const { return is_mask_; }
private:
+ friend class TestSerializationPictureLayer;
+
+ void DropRecordingSourceContentIfInvalid();
+
ContentLayerClient* client_;
scoped_ptr<DisplayListRecordingSource> recording_source_;
devtools_instrumentation::