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

Side by Side Diff: cc/resources/picture_layer_tiling_unittest.cc

Issue 648293006: cc: turn on distance field text on animated layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more test :) Created 6 years, 2 months 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
« no previous file with comments | « cc/resources/picture_layer_tiling_set_unittest.cc ('k') | cc/resources/picture_pile_impl.h » ('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/resources/picture_layer_tiling.h" 5 #include "cc/resources/picture_layer_tiling.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <set> 8 #include <set>
9 9
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 static void TileExists(bool exists, Tile* tile, 1255 static void TileExists(bool exists, Tile* tile,
1256 const gfx::Rect& geometry_rect) { 1256 const gfx::Rect& geometry_rect) {
1257 EXPECT_EQ(exists, tile != NULL) << geometry_rect.ToString(); 1257 EXPECT_EQ(exists, tile != NULL) << geometry_rect.ToString();
1258 } 1258 }
1259 1259
1260 TEST(PictureLayerTilingTest, TilingEvictionTileIteratorStaticViewport) { 1260 TEST(PictureLayerTilingTest, TilingEvictionTileIteratorStaticViewport) {
1261 FakeOutputSurfaceClient output_surface_client; 1261 FakeOutputSurfaceClient output_surface_client;
1262 scoped_ptr<FakeOutputSurface> output_surface = FakeOutputSurface::Create3d(); 1262 scoped_ptr<FakeOutputSurface> output_surface = FakeOutputSurface::Create3d();
1263 CHECK(output_surface->BindToClient(&output_surface_client)); 1263 CHECK(output_surface->BindToClient(&output_surface_client));
1264 TestSharedBitmapManager shared_bitmap_manager; 1264 TestSharedBitmapManager shared_bitmap_manager;
1265 scoped_ptr<ResourceProvider> resource_provider = 1265 scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create(
1266 ResourceProvider::Create(output_surface.get(), 1266 output_surface.get(), &shared_bitmap_manager, NULL, NULL, 0, false, 1);
1267 &shared_bitmap_manager,
1268 NULL,
1269 NULL,
1270 0,
1271 false,
1272 1,
1273 false);
1274 1267
1275 FakePictureLayerTilingClient client(resource_provider.get()); 1268 FakePictureLayerTilingClient client(resource_provider.get());
1276 scoped_ptr<TestablePictureLayerTiling> tiling; 1269 scoped_ptr<TestablePictureLayerTiling> tiling;
1277 1270
1278 gfx::Rect viewport(50, 50, 100, 100); 1271 gfx::Rect viewport(50, 50, 100, 100);
1279 gfx::Size layer_bounds(2000, 2000); 1272 gfx::Size layer_bounds(2000, 2000);
1280 1273
1281 client.SetTileSize(gfx::Size(30, 30)); 1274 client.SetTileSize(gfx::Size(30, 30));
1282 client.set_tree(ACTIVE_TREE); 1275 client.set_tree(ACTIVE_TREE);
1283 1276
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
2172 EXPECT_EQ(active_tiling->TileAt(0, 0), recycle_tiling->TileAt(0, 0)); 2165 EXPECT_EQ(active_tiling->TileAt(0, 0), recycle_tiling->TileAt(0, 0));
2173 2166
2174 // Reset the active tiling. The recycle tiles should be released too. 2167 // Reset the active tiling. The recycle tiles should be released too.
2175 active_tiling->Reset(); 2168 active_tiling->Reset();
2176 EXPECT_FALSE(active_tiling->TileAt(0, 0)); 2169 EXPECT_FALSE(active_tiling->TileAt(0, 0));
2177 EXPECT_FALSE(recycle_tiling->TileAt(0, 0)); 2170 EXPECT_FALSE(recycle_tiling->TileAt(0, 0));
2178 } 2171 }
2179 2172
2180 } // namespace 2173 } // namespace
2181 } // namespace cc 2174 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling_set_unittest.cc ('k') | cc/resources/picture_pile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698