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

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

Issue 266743003: Add flag to enable rendering of text using signed distance fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix uses of ResourceProvider::Create() outside of Chrome proper. Created 6 years, 7 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
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 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 const gfx::Rect& geometry_rect) { 941 const gfx::Rect& geometry_rect) {
942 EXPECT_EQ(exists, tile != NULL) << geometry_rect.ToString(); 942 EXPECT_EQ(exists, tile != NULL) << geometry_rect.ToString();
943 } 943 }
944 944
945 TEST(PictureLayerTilingTest, TilingEvictionTileIteratorStaticViewport) { 945 TEST(PictureLayerTilingTest, TilingEvictionTileIteratorStaticViewport) {
946 FakeOutputSurfaceClient output_surface_client; 946 FakeOutputSurfaceClient output_surface_client;
947 scoped_ptr<FakeOutputSurface> output_surface = FakeOutputSurface::Create3d(); 947 scoped_ptr<FakeOutputSurface> output_surface = FakeOutputSurface::Create3d();
948 CHECK(output_surface->BindToClient(&output_surface_client)); 948 CHECK(output_surface->BindToClient(&output_surface_client));
949 TestSharedBitmapManager shared_bitmap_manager; 949 TestSharedBitmapManager shared_bitmap_manager;
950 scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create( 950 scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create(
951 output_surface.get(), &shared_bitmap_manager, 0, false, 1); 951 output_surface.get(), &shared_bitmap_manager, 0, false, 1, false);
952 952
953 FakePictureLayerTilingClient client(resource_provider.get()); 953 FakePictureLayerTilingClient client(resource_provider.get());
954 scoped_ptr<TestablePictureLayerTiling> tiling; 954 scoped_ptr<TestablePictureLayerTiling> tiling;
955 955
956 gfx::Rect viewport(50, 50, 100, 100); 956 gfx::Rect viewport(50, 50, 100, 100);
957 gfx::Size layer_bounds(200, 200); 957 gfx::Size layer_bounds(200, 200);
958 958
959 client.SetTileSize(gfx::Size(30, 30)); 959 client.SetTileSize(gfx::Size(30, 30));
960 960
961 tiling = TestablePictureLayerTiling::Create(1.0f, layer_bounds, &client); 961 tiling = TestablePictureLayerTiling::Create(1.0f, layer_bounds, &client);
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
1706 EXPECT_FLOAT_EQ(0.f, priority.distance_to_visible); 1706 EXPECT_FLOAT_EQ(0.f, priority.distance_to_visible);
1707 EXPECT_EQ(TilePriority::NOW, priority.priority_bin); 1707 EXPECT_EQ(TilePriority::NOW, priority.priority_bin);
1708 1708
1709 priority = tiling->TileAt(1, 0)->priority(ACTIVE_TREE); 1709 priority = tiling->TileAt(1, 0)->priority(ACTIVE_TREE);
1710 EXPECT_FLOAT_EQ(0.f, priority.distance_to_visible); 1710 EXPECT_FLOAT_EQ(0.f, priority.distance_to_visible);
1711 EXPECT_EQ(TilePriority::NOW, priority.priority_bin); 1711 EXPECT_EQ(TilePriority::NOW, priority.priority_bin);
1712 } 1712 }
1713 1713
1714 } // namespace 1714 } // namespace
1715 } // namespace cc 1715 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling_set_unittest.cc ('k') | cc/resources/prioritized_resource_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698