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

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

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: Clean up comments, fix mac build Created 3 years, 11 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 17 matching lines...) Expand all
28 LayerTreePixelTest::BeginTest(); 28 LayerTreePixelTest::BeginTest();
29 PostCompositeImmediatelyToMainThread(); 29 PostCompositeImmediatelyToMainThread();
30 } 30 }
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 PaintFlags 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 = PictureLayer::Create(&client); 41 scoped_refptr<PictureLayer> root = PictureLayer::Create(&client);
42 root->SetBounds(bounds); 42 root->SetBounds(bounds);
43 root->SetIsDrawable(true); 43 root->SetIsDrawable(true);
44 44
45 RunSingleThreadedPixelTest( 45 RunSingleThreadedPixelTest(
46 PIXEL_TEST_GL, root, base::FilePath(FILE_PATH_LITERAL("green.png"))); 46 PIXEL_TEST_GL, root, base::FilePath(FILE_PATH_LITERAL("green.png")));
47 } 47 }
48 48
(...skipping 10 matching lines...) Expand all
59 LayerTreePixelTest::BeginTest(); 59 LayerTreePixelTest::BeginTest();
60 PostCompositeImmediatelyToMainThread(); 60 PostCompositeImmediatelyToMainThread();
61 } 61 }
62 }; 62 };
63 63
64 TEST_F(LayerTreeHostSynchronousGPUPixelTest, OneContentLayer) { 64 TEST_F(LayerTreeHostSynchronousGPUPixelTest, OneContentLayer) {
65 gfx::Size bounds(200, 200); 65 gfx::Size bounds(200, 200);
66 66
67 FakeContentLayerClient client; 67 FakeContentLayerClient client;
68 client.set_bounds(bounds); 68 client.set_bounds(bounds);
69 SkPaint green_paint; 69 PaintFlags green_paint;
70 green_paint.setColor(SkColorSetARGB(255, 0, 255, 0)); 70 green_paint.setColor(SkColorSetARGB(255, 0, 255, 0));
71 client.add_draw_rect(gfx::Rect(bounds), green_paint); 71 client.add_draw_rect(gfx::Rect(bounds), green_paint);
72 scoped_refptr<PictureLayer> root = PictureLayer::Create(&client); 72 scoped_refptr<PictureLayer> root = PictureLayer::Create(&client);
73 root->SetBounds(bounds); 73 root->SetBounds(bounds);
74 client.set_bounds(bounds); 74 client.set_bounds(bounds);
75 root->SetIsDrawable(true); 75 root->SetIsDrawable(true);
76 76
77 RunSingleThreadedPixelTest(PIXEL_TEST_GL, root, 77 RunSingleThreadedPixelTest(PIXEL_TEST_GL, root,
78 base::FilePath(FILE_PATH_LITERAL("green.png"))); 78 base::FilePath(FILE_PATH_LITERAL("green.png")));
79 } 79 }
80 80
81 } // namespace 81 } // namespace
82 } // namespace cc 82 } // namespace cc
83 83
84 #endif // OS_ANDROID 84 #endif // OS_ANDROID
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698