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

Side by Side Diff: cc/resources/picture_layer_tiling_set_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
« no previous file with comments | « cc/output/software_renderer_unittest.cc ('k') | cc/resources/picture_layer_tiling_unittest.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/resources/picture_layer_tiling_set.h" 5 #include "cc/resources/picture_layer_tiling_set.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "cc/resources/resource_pool.h" 10 #include "cc/resources/resource_pool.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 float ideal_contents_scale, 62 float ideal_contents_scale,
63 float expected_scale) { 63 float expected_scale) {
64 FakeOutputSurfaceClient output_surface_client; 64 FakeOutputSurfaceClient output_surface_client;
65 scoped_ptr<FakeOutputSurface> output_surface = 65 scoped_ptr<FakeOutputSurface> output_surface =
66 FakeOutputSurface::Create3d(); 66 FakeOutputSurface::Create3d();
67 CHECK(output_surface->BindToClient(&output_surface_client)); 67 CHECK(output_surface->BindToClient(&output_surface_client));
68 68
69 scoped_ptr<SharedBitmapManager> shared_bitmap_manager( 69 scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
70 new TestSharedBitmapManager()); 70 new TestSharedBitmapManager());
71 scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create( 71 scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create(
72 output_surface.get(), shared_bitmap_manager.get(), 0, false, 1); 72 output_surface.get(), shared_bitmap_manager.get(), 0, false, 1, false);
73 73
74 FakePictureLayerTilingClient client(resource_provider.get()); 74 FakePictureLayerTilingClient client(resource_provider.get());
75 client.SetTileSize(gfx::Size(256, 256)); 75 client.SetTileSize(gfx::Size(256, 256));
76 gfx::Size layer_bounds(1000, 800); 76 gfx::Size layer_bounds(1000, 800);
77 PictureLayerTilingSet set(&client, layer_bounds); 77 PictureLayerTilingSet set(&client, layer_bounds);
78 78
79 float scale = min_scale; 79 float scale = min_scale;
80 for (int i = 0; i < num_tilings; ++i, scale += scale_increment) { 80 for (int i = 0; i < num_tilings; ++i, scale += scale_increment) {
81 PictureLayerTiling* tiling = set.AddTiling(scale); 81 PictureLayerTiling* tiling = set.AddTiling(scale);
82 tiling->CreateAllTilesForTesting(); 82 tiling->CreateAllTilesForTesting();
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 std::vector<Tile*> new_tiles = target_->tiling_at(0)->AllTilesForTesting(); 409 std::vector<Tile*> new_tiles = target_->tiling_at(0)->AllTilesForTesting();
410 for (size_t i = 0; i < original_tiles.size(); ++i) { 410 for (size_t i = 0; i < original_tiles.size(); ++i) {
411 std::vector<Tile*>::iterator find = 411 std::vector<Tile*>::iterator find =
412 std::find(new_tiles.begin(), new_tiles.end(), original_tiles[i]); 412 std::find(new_tiles.begin(), new_tiles.end(), original_tiles[i]);
413 EXPECT_TRUE(find == new_tiles.end()); 413 EXPECT_TRUE(find == new_tiles.end());
414 } 414 }
415 } 415 }
416 416
417 } // namespace 417 } // namespace
418 } // namespace cc 418 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/software_renderer_unittest.cc ('k') | cc/resources/picture_layer_tiling_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698