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

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

Issue 1314943008: cc: Remove implicit conversions from Rect to RectF in src/cc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 19 matching lines...) Expand all
30 PostCompositeImmediatelyToMainThread(); 30 PostCompositeImmediatelyToMainThread();
31 } 31 }
32 }; 32 };
33 33
34 TEST_F(LayerTreeHostSynchronousPixelTest, OneContentLayer) { 34 TEST_F(LayerTreeHostSynchronousPixelTest, OneContentLayer) {
35 gfx::Size bounds(200, 200); 35 gfx::Size bounds(200, 200);
36 36
37 FakeContentLayerClient client; 37 FakeContentLayerClient client;
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::RectF(bounds), green_paint); 40 client.add_draw_rect(gfx::Rect(bounds), green_paint);
41 scoped_refptr<PictureLayer> root = 41 scoped_refptr<PictureLayer> root =
42 PictureLayer::Create(layer_settings(), &client); 42 PictureLayer::Create(layer_settings(), &client);
43 root->SetBounds(bounds); 43 root->SetBounds(bounds);
44 root->SetIsDrawable(true); 44 root->SetIsDrawable(true);
45 45
46 RunSingleThreadedPixelTest( 46 RunSingleThreadedPixelTest(
47 PIXEL_TEST_GL, root, base::FilePath(FILE_PATH_LITERAL("green.png"))); 47 PIXEL_TEST_GL, root, base::FilePath(FILE_PATH_LITERAL("green.png")));
48 } 48 }
49 49
50 class LayerTreeHostSynchronousGPUPixelTest : public LayerTreePixelTest { 50 class LayerTreeHostSynchronousGPUPixelTest : public LayerTreePixelTest {
(...skipping 10 matching lines...) Expand all
61 PostCompositeImmediatelyToMainThread(); 61 PostCompositeImmediatelyToMainThread();
62 } 62 }
63 }; 63 };
64 64
65 TEST_F(LayerTreeHostSynchronousGPUPixelTest, OneContentLayer) { 65 TEST_F(LayerTreeHostSynchronousGPUPixelTest, OneContentLayer) {
66 gfx::Size bounds(200, 200); 66 gfx::Size bounds(200, 200);
67 67
68 FakeContentLayerClient client; 68 FakeContentLayerClient client;
69 SkPaint green_paint; 69 SkPaint 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::RectF(bounds), green_paint); 71 client.add_draw_rect(gfx::Rect(bounds), green_paint);
72 scoped_refptr<PictureLayer> root = 72 scoped_refptr<PictureLayer> root =
73 PictureLayer::Create(layer_settings(), &client); 73 PictureLayer::Create(layer_settings(), &client);
74 root->SetBounds(bounds); 74 root->SetBounds(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