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

Unified Diff: cc/blimp/compositor_state_deserializer.cc

Issue 2456093003: Enable more layer_tree_host_unittest for LayerTreeHostRemote. (Closed)
Patch Set: Minor polish on refactored test class. Created 4 years, 1 month 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/BUILD.gn ('k') | cc/blimp/layer_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/blimp/compositor_state_deserializer.cc
diff --git a/cc/blimp/compositor_state_deserializer.cc b/cc/blimp/compositor_state_deserializer.cc
index 1c1f82fb51f6f59349733b1f3481c11d5f36634f..f83d9ef15ca997101d35330a618b8d84716f2e85 100644
--- a/cc/blimp/compositor_state_deserializer.cc
+++ b/cc/blimp/compositor_state_deserializer.cc
@@ -38,15 +38,6 @@ class DefaultLayerFactory : public LayerFactory {
ContentLayerClient* content_layer_client) override {
return PictureLayer::Create(content_layer_client);
}
-
- scoped_refptr<PictureLayer> CreateFakePictureLayer(
- int engine_layer_id,
- ContentLayerClient* content_layer_client) override {
- // We should never create fake layers in production code.
- NOTREACHED();
- return PictureLayer::Create(content_layer_client);
- }
-
scoped_refptr<SolidColorScrollbarLayer> CreateSolidColorScrollbarLayer(
int engine_layer_id,
ScrollbarOrientation orientation,
@@ -58,6 +49,19 @@ class DefaultLayerFactory : public LayerFactory {
orientation, thumb_thickness, track_start,
is_left_side_vertical_scrollbar, scroll_layer_id);
}
+ scoped_refptr<PictureLayer> CreateFakePictureLayer(
+ int engine_layer_id,
+ ContentLayerClient* content_layer_client) override {
+ // We should never create fake layers in production code.
+ NOTREACHED();
+ return PictureLayer::Create(content_layer_client);
+ }
+ scoped_refptr<Layer> CreatePushPropertiesCountingLayer(
+ int engine_layer_id) override {
+ // We should never create fake layers in production code.
+ NOTREACHED();
+ return Layer::Create();
+ }
};
} // namespace
@@ -371,6 +375,7 @@ scoped_refptr<Layer> CompositorStateDeserializer::GetLayerAndAddToNewMap(
layer_node.id(), layer_data.content_layer_client.get());
break;
case proto::LayerNode::FAKE_PICTURE_LAYER:
+ // FAKE_PICTURE_LAYER is for testing only.
layer_data.content_layer_client =
base::MakeUnique<DeserializedContentLayerClient>();
layer_data.layer = layer_factory_->CreateFakePictureLayer(
@@ -403,6 +408,12 @@ scoped_refptr<Layer> CompositorStateDeserializer::GetLayerAndAddToNewMap(
case proto::LayerNode::HEADS_UP_DISPLAY_LAYER:
// TODO(khushalsagar): Remove this from proto.
NOTREACHED();
+ break;
+ case proto::LayerNode::PUSH_PROPERTIES_COUNTING_LAYER:
+ // PUSH_PROPERTIES_COUNTING_LAYER is for testing only.
+ layer_data.layer =
+ layer_factory_->CreatePushPropertiesCountingLayer(layer_node.id());
+ break;
}
layer = layer_data.layer;
« no previous file with comments | « cc/BUILD.gn ('k') | cc/blimp/layer_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698