| 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" |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 EXPECT_EQ(resourceId, copyQuad->resourceId()); | 246 EXPECT_EQ(resourceId, copyQuad->resourceId()); |
| 247 EXPECT_EQ(premultipliedAlpha, copyQuad->premultipliedAlpha()); | 247 EXPECT_EQ(premultipliedAlpha, copyQuad->premultipliedAlpha()); |
| 248 EXPECT_FLOAT_RECT_EQ(uvRect, copyQuad->uvRect()); | 248 EXPECT_FLOAT_RECT_EQ(uvRect, copyQuad->uvRect()); |
| 249 EXPECT_EQ(flipped, copyQuad->flipped()); | 249 EXPECT_EQ(flipped, copyQuad->flipped()); |
| 250 } | 250 } |
| 251 | 251 |
| 252 TEST(DrawQuadTest, copyTileDrawQuad) | 252 TEST(DrawQuadTest, copyTileDrawQuad) |
| 253 { | 253 { |
| 254 gfx::Rect opaqueRect(33, 44, 22, 33); | 254 gfx::Rect opaqueRect(33, 44, 22, 33); |
| 255 unsigned resourceId = 104; | 255 unsigned resourceId = 104; |
| 256 gfx::Point textureOffset(-31, 47); | 256 gfx::Vector2d textureOffset(-31, 47); |
| 257 gfx::Size textureSize(85, 32); | 257 gfx::Size textureSize(85, 32); |
| 258 GLint textureFilter = 82; | 258 GLint textureFilter = 82; |
| 259 bool swizzleContents = true; | 259 bool swizzleContents = true; |
| 260 bool leftEdgeAA = true; | 260 bool leftEdgeAA = true; |
| 261 bool topEdgeAA = true; | 261 bool topEdgeAA = true; |
| 262 bool rightEdgeAA = false; | 262 bool rightEdgeAA = false; |
| 263 bool bottomEdgeAA = true; | 263 bool bottomEdgeAA = true; |
| 264 | 264 |
| 265 CREATE_SHARED_STATE(); | 265 CREATE_SHARED_STATE(); |
| 266 CREATE_QUAD_10(TileDrawQuad, opaqueRect, resourceId, textureOffset, textureS
ize, textureFilter, swizzleContents, leftEdgeAA, topEdgeAA, rightEdgeAA, bottomE
dgeAA); | 266 CREATE_QUAD_10(TileDrawQuad, opaqueRect, resourceId, textureOffset, textureS
ize, textureFilter, swizzleContents, leftEdgeAA, topEdgeAA, rightEdgeAA, bottomE
dgeAA); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 EXPECT_EQ(uPlane.size, copyQuad->uPlane().size); | 304 EXPECT_EQ(uPlane.size, copyQuad->uPlane().size); |
| 305 EXPECT_EQ(uPlane.format, copyQuad->uPlane().format); | 305 EXPECT_EQ(uPlane.format, copyQuad->uPlane().format); |
| 306 EXPECT_EQ(uPlane.visibleSize, copyQuad->uPlane().visibleSize); | 306 EXPECT_EQ(uPlane.visibleSize, copyQuad->uPlane().visibleSize); |
| 307 EXPECT_EQ(vPlane.resourceId, copyQuad->vPlane().resourceId); | 307 EXPECT_EQ(vPlane.resourceId, copyQuad->vPlane().resourceId); |
| 308 EXPECT_EQ(vPlane.size, copyQuad->vPlane().size); | 308 EXPECT_EQ(vPlane.size, copyQuad->vPlane().size); |
| 309 EXPECT_EQ(vPlane.format, copyQuad->vPlane().format); | 309 EXPECT_EQ(vPlane.format, copyQuad->vPlane().format); |
| 310 EXPECT_EQ(vPlane.visibleSize, copyQuad->vPlane().visibleSize); | 310 EXPECT_EQ(vPlane.visibleSize, copyQuad->vPlane().visibleSize); |
| 311 } | 311 } |
| 312 | 312 |
| 313 } // namespace | 313 } // namespace |
| OLD | NEW |