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

Unified Diff: cc/test/fake_picture_layer.cc

Issue 2451913002: Add serialization/deserialization for FakePictureLayer for testing. (Closed)
Patch Set: Revert change from another CL, that I cl patch this one to that one. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/fake_picture_layer.h ('k') | cc/test/remote_client_layer_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_picture_layer.cc
diff --git a/cc/test/fake_picture_layer.cc b/cc/test/fake_picture_layer.cc
index 4ab5a024755e753ffb910e2aa03167051d740de5..264d41bdd9ff39b34d909b815a63ea0c3ba588f3 100644
--- a/cc/test/fake_picture_layer.cc
+++ b/cc/test/fake_picture_layer.cc
@@ -4,6 +4,7 @@
#include "cc/test/fake_picture_layer.h"
+#include "cc/proto/layer.pb.h"
#include "cc/test/fake_picture_layer_impl.h"
namespace cc {
@@ -11,7 +12,6 @@ namespace cc {
FakePictureLayer::FakePictureLayer(ContentLayerClient* client)
: PictureLayer(client),
update_count_(0),
- push_properties_count_(0),
always_update_resources_(false),
force_unsuitable_for_gpu_rasterization_(false) {
SetBounds(gfx::Size(1, 1));
@@ -22,7 +22,6 @@ FakePictureLayer::FakePictureLayer(ContentLayerClient* client,
std::unique_ptr<RecordingSource> source)
: PictureLayer(client, std::move(source)),
update_count_(0),
- push_properties_count_(0),
always_update_resources_(false),
force_unsuitable_for_gpu_rasterization_(false) {
SetBounds(gfx::Size(1, 1));
@@ -44,15 +43,15 @@ bool FakePictureLayer::Update() {
return updated || always_update_resources_;
}
-void FakePictureLayer::PushPropertiesTo(LayerImpl* layer) {
- PictureLayer::PushPropertiesTo(layer);
- push_properties_count_++;
-}
-
bool FakePictureLayer::IsSuitableForGpuRasterization() const {
if (force_unsuitable_for_gpu_rasterization_)
return false;
return PictureLayer::IsSuitableForGpuRasterization();
}
+void FakePictureLayer::SetTypeForProtoSerialization(
+ proto::LayerNode* proto) const {
+ proto->set_type(proto::LayerNode::FAKE_PICTURE_LAYER);
+}
+
} // namespace cc
« no previous file with comments | « cc/test/fake_picture_layer.h ('k') | cc/test/remote_client_layer_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698