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

Side by Side Diff: cc/draw_quad_unittest.cc

Issue 11264056: cc: Use gfx:: Geometry types for positions, bounds, and related things. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: some missed intstuff Created 8 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 EXPECT_EQ(resourceId, copyQuad->resourceId()); 247 EXPECT_EQ(resourceId, copyQuad->resourceId());
248 EXPECT_EQ(premultipliedAlpha, copyQuad->premultipliedAlpha()); 248 EXPECT_EQ(premultipliedAlpha, copyQuad->premultipliedAlpha());
249 EXPECT_FLOAT_RECT_EQ(uvRect, copyQuad->uvRect()); 249 EXPECT_FLOAT_RECT_EQ(uvRect, copyQuad->uvRect());
250 EXPECT_EQ(flipped, copyQuad->flipped()); 250 EXPECT_EQ(flipped, copyQuad->flipped());
251 } 251 }
252 252
253 TEST(DrawQuadTest, copyTileDrawQuad) 253 TEST(DrawQuadTest, copyTileDrawQuad)
254 { 254 {
255 gfx::Rect opaqueRect(33, 44, 22, 33); 255 gfx::Rect opaqueRect(33, 44, 22, 33);
256 unsigned resourceId = 104; 256 unsigned resourceId = 104;
257 gfx::Point textureOffset(-31, 47); 257 gfx::Vector2d textureOffset(-31, 47);
258 gfx::Size textureSize(85, 32); 258 gfx::Size textureSize(85, 32);
259 GLint textureFilter = 82; 259 GLint textureFilter = 82;
260 bool swizzleContents = true; 260 bool swizzleContents = true;
261 bool leftEdgeAA = true; 261 bool leftEdgeAA = true;
262 bool topEdgeAA = true; 262 bool topEdgeAA = true;
263 bool rightEdgeAA = false; 263 bool rightEdgeAA = false;
264 bool bottomEdgeAA = true; 264 bool bottomEdgeAA = true;
265 265
266 CREATE_SHARED_STATE(); 266 CREATE_SHARED_STATE();
267 CREATE_QUAD_10(TileDrawQuad, opaqueRect, resourceId, textureOffset, textureS ize, textureFilter, swizzleContents, leftEdgeAA, topEdgeAA, rightEdgeAA, bottomE dgeAA); 267 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
305 EXPECT_EQ(uPlane.size, copyQuad->uPlane().size); 305 EXPECT_EQ(uPlane.size, copyQuad->uPlane().size);
306 EXPECT_EQ(uPlane.format, copyQuad->uPlane().format); 306 EXPECT_EQ(uPlane.format, copyQuad->uPlane().format);
307 EXPECT_EQ(uPlane.visibleSize, copyQuad->uPlane().visibleSize); 307 EXPECT_EQ(uPlane.visibleSize, copyQuad->uPlane().visibleSize);
308 EXPECT_EQ(vPlane.resourceId, copyQuad->vPlane().resourceId); 308 EXPECT_EQ(vPlane.resourceId, copyQuad->vPlane().resourceId);
309 EXPECT_EQ(vPlane.size, copyQuad->vPlane().size); 309 EXPECT_EQ(vPlane.size, copyQuad->vPlane().size);
310 EXPECT_EQ(vPlane.format, copyQuad->vPlane().format); 310 EXPECT_EQ(vPlane.format, copyQuad->vPlane().format);
311 EXPECT_EQ(vPlane.visibleSize, copyQuad->vPlane().visibleSize); 311 EXPECT_EQ(vPlane.visibleSize, copyQuad->vPlane().visibleSize);
312 } 312 }
313 313
314 } // namespace 314 } // namespace
OLDNEW
« no previous file with comments | « cc/delegated_renderer_layer_impl_unittest.cc ('k') | cc/font_atlas.h » ('j') | cc/layer_quad.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698