| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 EXPECT_EQ(leftEdgeAA, copyQuad->leftEdgeAA()); | 273 EXPECT_EQ(leftEdgeAA, copyQuad->leftEdgeAA()); |
| 274 EXPECT_EQ(topEdgeAA, copyQuad->topEdgeAA()); | 274 EXPECT_EQ(topEdgeAA, copyQuad->topEdgeAA()); |
| 275 EXPECT_EQ(rightEdgeAA, copyQuad->rightEdgeAA()); | 275 EXPECT_EQ(rightEdgeAA, copyQuad->rightEdgeAA()); |
| 276 EXPECT_EQ(bottomEdgeAA, copyQuad->bottomEdgeAA()); | 276 EXPECT_EQ(bottomEdgeAA, copyQuad->bottomEdgeAA()); |
| 277 } | 277 } |
| 278 | 278 |
| 279 TEST(DrawQuadTest, copyYUVVideoDrawQuad) | 279 TEST(DrawQuadTest, copyYUVVideoDrawQuad) |
| 280 { | 280 { |
| 281 VideoLayerImpl::FramePlane yPlane; | 281 VideoLayerImpl::FramePlane yPlane; |
| 282 yPlane.resourceId = 45; | 282 yPlane.resourceId = 45; |
| 283 yPlane.size = IntSize(34, 23); | 283 yPlane.size = gfx::Size(34, 23); |
| 284 yPlane.format = 8; | 284 yPlane.format = 8; |
| 285 yPlane.visibleSize = IntSize(623, 235); | 285 yPlane.visibleSize = gfx::Size(623, 235); |
| 286 VideoLayerImpl::FramePlane uPlane; | 286 VideoLayerImpl::FramePlane uPlane; |
| 287 uPlane.resourceId = 532; | 287 uPlane.resourceId = 532; |
| 288 uPlane.size = IntSize(134, 16); | 288 uPlane.size = gfx::Size(134, 16); |
| 289 uPlane.format = 2; | 289 uPlane.format = 2; |
| 290 uPlane.visibleSize = IntSize(126, 27); | 290 uPlane.visibleSize = gfx::Size(126, 27); |
| 291 VideoLayerImpl::FramePlane vPlane; | 291 VideoLayerImpl::FramePlane vPlane; |
| 292 vPlane.resourceId = 4; | 292 vPlane.resourceId = 4; |
| 293 vPlane.size = IntSize(456, 486); | 293 vPlane.size = gfx::Size(456, 486); |
| 294 vPlane.format = 46; | 294 vPlane.format = 46; |
| 295 vPlane.visibleSize = IntSize(19, 45); | 295 vPlane.visibleSize = gfx::Size(19, 45); |
| 296 | 296 |
| 297 CREATE_SHARED_STATE(); | 297 CREATE_SHARED_STATE(); |
| 298 CREATE_QUAD_3(YUVVideoDrawQuad, yPlane, uPlane, vPlane); | 298 CREATE_QUAD_3(YUVVideoDrawQuad, yPlane, uPlane, vPlane); |
| 299 EXPECT_EQ(yPlane.resourceId, copyQuad->yPlane().resourceId); | 299 EXPECT_EQ(yPlane.resourceId, copyQuad->yPlane().resourceId); |
| 300 EXPECT_EQ(yPlane.size, copyQuad->yPlane().size); | 300 EXPECT_EQ(yPlane.size, copyQuad->yPlane().size); |
| 301 EXPECT_EQ(yPlane.format, copyQuad->yPlane().format); | 301 EXPECT_EQ(yPlane.format, copyQuad->yPlane().format); |
| 302 EXPECT_EQ(yPlane.visibleSize, copyQuad->yPlane().visibleSize); | 302 EXPECT_EQ(yPlane.visibleSize, copyQuad->yPlane().visibleSize); |
| 303 EXPECT_EQ(uPlane.resourceId, copyQuad->uPlane().resourceId); | 303 EXPECT_EQ(uPlane.resourceId, copyQuad->uPlane().resourceId); |
| 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 |