OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "cc/draw_quad.h" | 7 #include "cc/draw_quad.h" |
8 | 8 |
9 #include "cc/checkerboard_draw_quad.h" | 9 #include "cc/checkerboard_draw_quad.h" |
10 #include "cc/debug_border_draw_quad.h" | 10 #include "cc/debug_border_draw_quad.h" |
11 #include "cc/io_surface_draw_quad.h" | 11 #include "cc/io_surface_draw_quad.h" |
12 #include "cc/render_pass_draw_quad.h" | 12 #include "cc/render_pass_draw_quad.h" |
13 #include "cc/solid_color_draw_quad.h" | 13 #include "cc/solid_color_draw_quad.h" |
14 #include "cc/stream_video_draw_quad.h" | 14 #include "cc/stream_video_draw_quad.h" |
15 #include "cc/test/geometry_test_utils.h" | 15 #include "cc/test/geometry_test_utils.h" |
16 #include "cc/texture_draw_quad.h" | 16 #include "cc/texture_draw_quad.h" |
17 #include "cc/tile_draw_quad.h" | 17 #include "cc/tile_draw_quad.h" |
18 #include "cc/yuv_video_draw_quad.h" | 18 #include "cc/yuv_video_draw_quad.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 #include <public/WebTransformationMatrix.h> | 20 #include <public/WebTransformationMatrix.h> |
21 | 21 |
22 using WebKit::WebTransformationMatrix; | 22 using WebKit::WebTransformationMatrix; |
23 | 23 |
24 using namespace cc; | 24 namespace cc { |
25 | |
26 namespace { | 25 namespace { |
27 | 26 |
28 TEST(DrawQuadTest, copySharedQuadState) | 27 TEST(DrawQuadTest, copySharedQuadState) |
29 { | 28 { |
30 WebTransformationMatrix quadTransform(1, 0.5, 0, 1, 0.5, 0); | 29 WebTransformationMatrix quadTransform(1, 0.5, 0, 1, 0.5, 0); |
31 gfx::Rect visibleContentRect(10, 12, 14, 16); | 30 gfx::Rect visibleContentRect(10, 12, 14, 16); |
32 gfx::Rect clippedRectInTarget(19, 21, 23, 25); | 31 gfx::Rect clippedRectInTarget(19, 21, 23, 25); |
33 float opacity = 0.25; | 32 float opacity = 0.25; |
34 bool opaque = true; | 33 bool opaque = true; |
35 int id = 3; | 34 int id = 3; |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 EXPECT_EQ(uPlane.resourceId, copyQuad->uPlane().resourceId); | 302 EXPECT_EQ(uPlane.resourceId, copyQuad->uPlane().resourceId); |
304 EXPECT_EQ(uPlane.size, copyQuad->uPlane().size); | 303 EXPECT_EQ(uPlane.size, copyQuad->uPlane().size); |
305 EXPECT_EQ(uPlane.format, copyQuad->uPlane().format); | 304 EXPECT_EQ(uPlane.format, copyQuad->uPlane().format); |
306 EXPECT_EQ(uPlane.visibleSize, copyQuad->uPlane().visibleSize); | 305 EXPECT_EQ(uPlane.visibleSize, copyQuad->uPlane().visibleSize); |
307 EXPECT_EQ(vPlane.resourceId, copyQuad->vPlane().resourceId); | 306 EXPECT_EQ(vPlane.resourceId, copyQuad->vPlane().resourceId); |
308 EXPECT_EQ(vPlane.size, copyQuad->vPlane().size); | 307 EXPECT_EQ(vPlane.size, copyQuad->vPlane().size); |
309 EXPECT_EQ(vPlane.format, copyQuad->vPlane().format); | 308 EXPECT_EQ(vPlane.format, copyQuad->vPlane().format); |
310 EXPECT_EQ(vPlane.visibleSize, copyQuad->vPlane().visibleSize); | 309 EXPECT_EQ(vPlane.visibleSize, copyQuad->vPlane().visibleSize); |
311 } | 310 } |
312 | 311 |
313 } // anonymous namespace | 312 } // namespace |
| 313 } // namespace cc |
OLD | NEW |