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

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

Issue 485043003: cc: Use correct message loop proxy in BlockingTaskRunner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments. Created 6 years, 3 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 | 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 "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 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 const gfx::Rect& geometry_rect) { 1055 const gfx::Rect& geometry_rect) {
1056 EXPECT_EQ(exists, tile != NULL) << geometry_rect.ToString(); 1056 EXPECT_EQ(exists, tile != NULL) << geometry_rect.ToString();
1057 } 1057 }
1058 1058
1059 TEST(PictureLayerTilingTest, TilingEvictionTileIteratorStaticViewport) { 1059 TEST(PictureLayerTilingTest, TilingEvictionTileIteratorStaticViewport) {
1060 FakeOutputSurfaceClient output_surface_client; 1060 FakeOutputSurfaceClient output_surface_client;
1061 scoped_ptr<FakeOutputSurface> output_surface = FakeOutputSurface::Create3d(); 1061 scoped_ptr<FakeOutputSurface> output_surface = FakeOutputSurface::Create3d();
1062 CHECK(output_surface->BindToClient(&output_surface_client)); 1062 CHECK(output_surface->BindToClient(&output_surface_client));
1063 TestSharedBitmapManager shared_bitmap_manager; 1063 TestSharedBitmapManager shared_bitmap_manager;
1064 scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create( 1064 scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create(
1065 output_surface.get(), &shared_bitmap_manager, 0, false, 1, false); 1065 output_surface.get(), &shared_bitmap_manager, NULL, 0, false, 1, false);
1066 1066
1067 FakePictureLayerTilingClient client(resource_provider.get()); 1067 FakePictureLayerTilingClient client(resource_provider.get());
1068 scoped_ptr<TestablePictureLayerTiling> tiling; 1068 scoped_ptr<TestablePictureLayerTiling> tiling;
1069 1069
1070 gfx::Rect viewport(50, 50, 100, 100); 1070 gfx::Rect viewport(50, 50, 100, 100);
1071 gfx::Size layer_bounds(2000, 2000); 1071 gfx::Size layer_bounds(2000, 2000);
1072 1072
1073 client.SetTileSize(gfx::Size(30, 30)); 1073 client.SetTileSize(gfx::Size(30, 30));
1074 client.set_tree(ACTIVE_TREE); 1074 client.set_tree(ACTIVE_TREE);
1075 1075
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
2082 EXPECT_EQ(active_tiling->TileAt(0, 0), recycle_tiling->TileAt(0, 0)); 2082 EXPECT_EQ(active_tiling->TileAt(0, 0), recycle_tiling->TileAt(0, 0));
2083 2083
2084 // Reset the active tiling. The recycle tiles should be released too. 2084 // Reset the active tiling. The recycle tiles should be released too.
2085 active_tiling->Reset(); 2085 active_tiling->Reset();
2086 EXPECT_FALSE(active_tiling->TileAt(0, 0)); 2086 EXPECT_FALSE(active_tiling->TileAt(0, 0));
2087 EXPECT_FALSE(recycle_tiling->TileAt(0, 0)); 2087 EXPECT_FALSE(recycle_tiling->TileAt(0, 0));
2088 } 2088 }
2089 2089
2090 } // namespace 2090 } // namespace
2091 } // namespace cc 2091 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698