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

Side by Side Diff: cc/tiled_layer_impl_unittest.cc

Issue 11411050: cc: Make the DrawQuad subclasses into struct-like classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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
« no previous file with comments | « cc/tiled_layer_impl.cc ('k') | cc/video_layer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "cc/tiled_layer_impl.h" 5 #include "cc/tiled_layer_impl.h"
6 6
7 #include "cc/append_quads_data.h" 7 #include "cc/append_quads_data.h"
8 #include "cc/layer_tiling_data.h" 8 #include "cc/layer_tiling_data.h"
9 #include "cc/single_thread_proxy.h" 9 #include "cc/single_thread_proxy.h"
10 #include "cc/test/layer_test_common.h" 10 #include "cc/test/layer_test_common.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 TEST(TiledLayerImplTest, textureInfoForLayerNoBorders) 193 TEST(TiledLayerImplTest, textureInfoForLayerNoBorders)
194 { 194 {
195 gfx::Size tileSize(50, 50); 195 gfx::Size tileSize(50, 50);
196 gfx::Size layerSize(250, 250); 196 gfx::Size layerSize(250, 250);
197 QuadList quads; 197 QuadList quads;
198 SharedQuadStateList sharedStates; 198 SharedQuadStateList sharedStates;
199 getQuads(quads, sharedStates, tileSize, layerSize, LayerTilingData::NoBorder Texels, gfx::Rect(gfx::Point(), layerSize)); 199 getQuads(quads, sharedStates, tileSize, layerSize, LayerTilingData::NoBorder Texels, gfx::Rect(gfx::Point(), layerSize));
200 200
201 for (size_t i = 0; i < quads.size(); ++i) { 201 for (size_t i = 0; i < quads.size(); ++i) {
202 const TileDrawQuad* quad = TileDrawQuad::materialCast(quads[i]); 202 const TileDrawQuad* quad = TileDrawQuad::MaterialCast(quads[i]);
203 203
204 EXPECT_NE(quad->resourceId(), 0u) << quadString << i; 204 EXPECT_NE(0u, quad->resource_id) << quadString << i;
205 EXPECT_EQ(quad->texCoordRect(), gfx::RectF(gfx::PointF(), tileSize)) << quadString << i; 205 EXPECT_EQ(gfx::RectF(gfx::PointF(), tileSize), quad->tex_coord_rect) << quadString << i;
206 EXPECT_EQ(quad->textureSize(), tileSize) << quadString << i; 206 EXPECT_EQ(tileSize, quad->texture_size) << quadString << i;
207 EXPECT_EQ(gfx::Rect(0, 0, 1, 1), quad->opaque_rect) << quadString << i; 207 EXPECT_EQ(gfx::Rect(0, 0, 1, 1), quad->opaque_rect) << quadString << i;
208 } 208 }
209 } 209 }
210 210
211 } // namespace 211 } // namespace
212 } // namespace cc 212 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiled_layer_impl.cc ('k') | cc/video_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698