| 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 EXPECT_EQ(textureFilter, copyQuad->textureFilter()); | 272 EXPECT_EQ(textureFilter, copyQuad->textureFilter()); |
| 273 EXPECT_EQ(swizzleContents, copyQuad->swizzleContents()); | 273 EXPECT_EQ(swizzleContents, copyQuad->swizzleContents()); |
| 274 EXPECT_EQ(leftEdgeAA, copyQuad->leftEdgeAA()); | 274 EXPECT_EQ(leftEdgeAA, copyQuad->leftEdgeAA()); |
| 275 EXPECT_EQ(topEdgeAA, copyQuad->topEdgeAA()); | 275 EXPECT_EQ(topEdgeAA, copyQuad->topEdgeAA()); |
| 276 EXPECT_EQ(rightEdgeAA, copyQuad->rightEdgeAA()); | 276 EXPECT_EQ(rightEdgeAA, copyQuad->rightEdgeAA()); |
| 277 EXPECT_EQ(bottomEdgeAA, copyQuad->bottomEdgeAA()); | 277 EXPECT_EQ(bottomEdgeAA, copyQuad->bottomEdgeAA()); |
| 278 } | 278 } |
| 279 | 279 |
| 280 TEST(DrawQuadTest, copyYUVVideoDrawQuad) | 280 TEST(DrawQuadTest, copyYUVVideoDrawQuad) |
| 281 { | 281 { |
| 282 gfx::SizeF texScale(0.75, 0.5); |
| 282 VideoLayerImpl::FramePlane yPlane; | 283 VideoLayerImpl::FramePlane yPlane; |
| 283 yPlane.resourceId = 45; | 284 yPlane.resourceId = 45; |
| 284 yPlane.size = IntSize(34, 23); | 285 yPlane.size = IntSize(34, 23); |
| 285 yPlane.format = 8; | 286 yPlane.format = 8; |
| 286 yPlane.visibleSize = IntSize(623, 235); | |
| 287 VideoLayerImpl::FramePlane uPlane; | 287 VideoLayerImpl::FramePlane uPlane; |
| 288 uPlane.resourceId = 532; | 288 uPlane.resourceId = 532; |
| 289 uPlane.size = IntSize(134, 16); | 289 uPlane.size = IntSize(134, 16); |
| 290 uPlane.format = 2; | 290 uPlane.format = 2; |
| 291 uPlane.visibleSize = IntSize(126, 27); | |
| 292 VideoLayerImpl::FramePlane vPlane; | 291 VideoLayerImpl::FramePlane vPlane; |
| 293 vPlane.resourceId = 4; | 292 vPlane.resourceId = 4; |
| 294 vPlane.size = IntSize(456, 486); | 293 vPlane.size = IntSize(456, 486); |
| 295 vPlane.format = 46; | 294 vPlane.format = 46; |
| 296 vPlane.visibleSize = IntSize(19, 45); | |
| 297 | 295 |
| 298 CREATE_SHARED_STATE(); | 296 CREATE_SHARED_STATE(); |
| 299 CREATE_QUAD_3(YUVVideoDrawQuad, yPlane, uPlane, vPlane); | 297 CREATE_QUAD_4(YUVVideoDrawQuad, texScale, yPlane, uPlane, vPlane); |
| 298 EXPECT_EQ(texScale, copyQuad->texScale()); |
| 300 EXPECT_EQ(yPlane.resourceId, copyQuad->yPlane().resourceId); | 299 EXPECT_EQ(yPlane.resourceId, copyQuad->yPlane().resourceId); |
| 301 EXPECT_EQ(yPlane.size, copyQuad->yPlane().size); | 300 EXPECT_EQ(yPlane.size, copyQuad->yPlane().size); |
| 302 EXPECT_EQ(yPlane.format, copyQuad->yPlane().format); | 301 EXPECT_EQ(yPlane.format, copyQuad->yPlane().format); |
| 303 EXPECT_EQ(yPlane.visibleSize, copyQuad->yPlane().visibleSize); | |
| 304 EXPECT_EQ(uPlane.resourceId, copyQuad->uPlane().resourceId); | 302 EXPECT_EQ(uPlane.resourceId, copyQuad->uPlane().resourceId); |
| 305 EXPECT_EQ(uPlane.size, copyQuad->uPlane().size); | 303 EXPECT_EQ(uPlane.size, copyQuad->uPlane().size); |
| 306 EXPECT_EQ(uPlane.format, copyQuad->uPlane().format); | 304 EXPECT_EQ(uPlane.format, copyQuad->uPlane().format); |
| 307 EXPECT_EQ(uPlane.visibleSize, copyQuad->uPlane().visibleSize); | |
| 308 EXPECT_EQ(vPlane.resourceId, copyQuad->vPlane().resourceId); | 305 EXPECT_EQ(vPlane.resourceId, copyQuad->vPlane().resourceId); |
| 309 EXPECT_EQ(vPlane.size, copyQuad->vPlane().size); | 306 EXPECT_EQ(vPlane.size, copyQuad->vPlane().size); |
| 310 EXPECT_EQ(vPlane.format, copyQuad->vPlane().format); | 307 EXPECT_EQ(vPlane.format, copyQuad->vPlane().format); |
| 311 EXPECT_EQ(vPlane.visibleSize, copyQuad->vPlane().visibleSize); | |
| 312 } | 308 } |
| 313 | 309 |
| 314 } // namespace | 310 } // namespace |
| OLD | NEW |