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

Side by Side Diff: cc/trees/layer_tree_host_pixeltest_synchronous.cc

Issue 1783613004: CC Animation: Erase cc::LayerSettings everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eraseandroid
Patch Set: Rebase. Created 4 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "build/build_config.h" 5 #include "build/build_config.h"
6 #include "cc/layers/content_layer_client.h" 6 #include "cc/layers/content_layer_client.h"
7 #include "cc/layers/picture_image_layer.h" 7 #include "cc/layers/picture_image_layer.h"
8 #include "cc/layers/picture_layer.h" 8 #include "cc/layers/picture_layer.h"
9 #include "cc/layers/solid_color_layer.h" 9 #include "cc/layers/solid_color_layer.h"
10 #include "cc/test/fake_content_layer_client.h" 10 #include "cc/test/fake_content_layer_client.h"
(...skipping 20 matching lines...) Expand all
31 }; 31 };
32 32
33 TEST_F(LayerTreeHostSynchronousPixelTest, OneContentLayer) { 33 TEST_F(LayerTreeHostSynchronousPixelTest, OneContentLayer) {
34 gfx::Size bounds(200, 200); 34 gfx::Size bounds(200, 200);
35 35
36 FakeContentLayerClient client; 36 FakeContentLayerClient client;
37 client.set_bounds(bounds); 37 client.set_bounds(bounds);
38 SkPaint green_paint; 38 SkPaint green_paint;
39 green_paint.setColor(SkColorSetARGB(255, 0, 255, 0)); 39 green_paint.setColor(SkColorSetARGB(255, 0, 255, 0));
40 client.add_draw_rect(gfx::Rect(bounds), green_paint); 40 client.add_draw_rect(gfx::Rect(bounds), green_paint);
41 scoped_refptr<PictureLayer> root = 41 scoped_refptr<PictureLayer> root = PictureLayer::Create(&client);
42 PictureLayer::Create(layer_settings(), &client);
43 root->SetBounds(bounds); 42 root->SetBounds(bounds);
44 root->SetIsDrawable(true); 43 root->SetIsDrawable(true);
45 44
46 RunSingleThreadedPixelTest( 45 RunSingleThreadedPixelTest(
47 PIXEL_TEST_GL, root, base::FilePath(FILE_PATH_LITERAL("green.png"))); 46 PIXEL_TEST_GL, root, base::FilePath(FILE_PATH_LITERAL("green.png")));
48 } 47 }
49 48
50 class LayerTreeHostSynchronousGPUPixelTest : public LayerTreePixelTest { 49 class LayerTreeHostSynchronousGPUPixelTest : public LayerTreePixelTest {
51 public: 50 public:
52 void InitializeSettings(LayerTreeSettings* settings) override { 51 void InitializeSettings(LayerTreeSettings* settings) override {
(...skipping 10 matching lines...) Expand all
63 }; 62 };
64 63
65 TEST_F(LayerTreeHostSynchronousGPUPixelTest, OneContentLayer) { 64 TEST_F(LayerTreeHostSynchronousGPUPixelTest, OneContentLayer) {
66 gfx::Size bounds(200, 200); 65 gfx::Size bounds(200, 200);
67 66
68 FakeContentLayerClient client; 67 FakeContentLayerClient client;
69 client.set_bounds(bounds); 68 client.set_bounds(bounds);
70 SkPaint green_paint; 69 SkPaint green_paint;
71 green_paint.setColor(SkColorSetARGB(255, 0, 255, 0)); 70 green_paint.setColor(SkColorSetARGB(255, 0, 255, 0));
72 client.add_draw_rect(gfx::Rect(bounds), green_paint); 71 client.add_draw_rect(gfx::Rect(bounds), green_paint);
73 scoped_refptr<PictureLayer> root = 72 scoped_refptr<PictureLayer> root = PictureLayer::Create(&client);
74 PictureLayer::Create(layer_settings(), &client);
75 root->SetBounds(bounds); 73 root->SetBounds(bounds);
76 client.set_bounds(bounds); 74 client.set_bounds(bounds);
77 root->SetIsDrawable(true); 75 root->SetIsDrawable(true);
78 76
79 RunSingleThreadedPixelTest(PIXEL_TEST_GL, root, 77 RunSingleThreadedPixelTest(PIXEL_TEST_GL, root,
80 base::FilePath(FILE_PATH_LITERAL("green.png"))); 78 base::FilePath(FILE_PATH_LITERAL("green.png")));
81 } 79 }
82 80
83 } // namespace 81 } // namespace
84 } // namespace cc 82 } // namespace cc
85 83
86 #endif // OS_ANDROID 84 #endif // OS_ANDROID
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_pixeltest_readback.cc ('k') | cc/trees/layer_tree_host_pixeltest_tiles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698