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

Unified Diff: cc/layers/contents_scaling_layer_unittest.cc

Issue 1122393003: CC: Plumb LayerSettings parameter for cc::Layer construction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 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/layers/contents_scaling_layer.cc ('k') | cc/layers/delegated_frame_provider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/contents_scaling_layer_unittest.cc
diff --git a/cc/layers/contents_scaling_layer_unittest.cc b/cc/layers/contents_scaling_layer_unittest.cc
index 38385a06ad1160cd5689f696d34bacc3b82f616f..efad2649ec16aaf6f26bb82e36343adf40aad03b 100644
--- a/cc/layers/contents_scaling_layer_unittest.cc
+++ b/cc/layers/contents_scaling_layer_unittest.cc
@@ -15,8 +15,8 @@ namespace {
class MockContentsScalingLayer : public ContentsScalingLayer {
public:
- MockContentsScalingLayer()
- : ContentsScalingLayer() {}
+ explicit MockContentsScalingLayer(const LayerSettings& settings)
+ : ContentsScalingLayer(settings) {}
void SetNeedsDisplayRect(const gfx::Rect& dirty_rect) override {
last_needs_display_rect_ = dirty_rect;
@@ -42,13 +42,15 @@ static void CalcDrawProps(FakeLayerTreeHost* host, float device_scale_factor) {
}
TEST(ContentsScalingLayerTest, CheckContentsBounds) {
+ LayerSettings layer_settings;
+
FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D);
scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(&client);
scoped_refptr<MockContentsScalingLayer> test_layer =
- make_scoped_refptr(new MockContentsScalingLayer());
+ make_scoped_refptr(new MockContentsScalingLayer(layer_settings));
- scoped_refptr<Layer> root = Layer::Create();
+ scoped_refptr<Layer> root = Layer::Create(layer_settings);
root->AddChild(test_layer);
host->SetRootLayer(root);
« no previous file with comments | « cc/layers/contents_scaling_layer.cc ('k') | cc/layers/delegated_frame_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698