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

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: rectfconvert-cc: rebase-and-sandwich-strategy 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
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 18 matching lines...) Expand all
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 SkPaint green_paint; 37 SkPaint green_paint;
38 green_paint.setColor(SkColorSetARGB(255, 0, 255, 0)); 38 green_paint.setColor(SkColorSetARGB(255, 0, 255, 0));
39 client.add_draw_rect(gfx::RectF(bounds), green_paint); 39 client.add_draw_rect(gfx::Rect(bounds), green_paint);
40 scoped_refptr<PictureLayer> root = 40 scoped_refptr<PictureLayer> root =
41 PictureLayer::Create(layer_settings(), &client); 41 PictureLayer::Create(layer_settings(), &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
49 class LayerTreeHostSynchronousGPUPixelTest : public LayerTreePixelTest { 49 class LayerTreeHostSynchronousGPUPixelTest : public LayerTreePixelTest {
(...skipping 10 matching lines...) Expand all
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 SkPaint green_paint; 68 SkPaint green_paint;
69 green_paint.setColor(SkColorSetARGB(255, 0, 255, 0)); 69 green_paint.setColor(SkColorSetARGB(255, 0, 255, 0));
70 client.add_draw_rect(gfx::RectF(bounds), green_paint); 70 client.add_draw_rect(gfx::Rect(bounds), green_paint);
71 scoped_refptr<PictureLayer> root = 71 scoped_refptr<PictureLayer> root =
72 PictureLayer::Create(layer_settings(), &client); 72 PictureLayer::Create(layer_settings(), &client);
73 root->SetBounds(bounds); 73 root->SetBounds(bounds);
74 root->SetIsDrawable(true); 74 root->SetIsDrawable(true);
75 75
76 RunSingleThreadedPixelTest(PIXEL_TEST_GL, root, 76 RunSingleThreadedPixelTest(PIXEL_TEST_GL, root,
77 base::FilePath(FILE_PATH_LITERAL("green.png"))); 77 base::FilePath(FILE_PATH_LITERAL("green.png")));
78 } 78 }
79 79
80 } // namespace 80 } // namespace
81 } // namespace cc 81 } // namespace cc
82 82
83 #endif // OS_ANDROID 83 #endif // OS_ANDROID
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698