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

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

Issue 21159007: cc: Adding support for RGBA_4444 tile textures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed a signed vs. unsigned comparison in video_resource_updater.cc Created 7 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
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 float min_scale, 59 float min_scale,
60 float scale_increment, 60 float scale_increment,
61 float ideal_contents_scale, 61 float ideal_contents_scale,
62 float expected_scale) { 62 float expected_scale) {
63 FakeOutputSurfaceClient output_surface_client; 63 FakeOutputSurfaceClient output_surface_client;
64 scoped_ptr<FakeOutputSurface> output_surface = 64 scoped_ptr<FakeOutputSurface> output_surface =
65 FakeOutputSurface::Create3d(); 65 FakeOutputSurface::Create3d();
66 CHECK(output_surface->BindToClient(&output_surface_client)); 66 CHECK(output_surface->BindToClient(&output_surface_client));
67 67
68 scoped_ptr<ResourceProvider> resource_provider = 68 scoped_ptr<ResourceProvider> resource_provider =
69 ResourceProvider::Create(output_surface.get(), 0); 69 ResourceProvider::Create(output_surface.get(), 0, false);
70 70
71 FakePictureLayerTilingClient client; 71 FakePictureLayerTilingClient client;
72 client.SetTileSize(gfx::Size(256, 256)); 72 client.SetTileSize(gfx::Size(256, 256));
73 gfx::Size layer_bounds(1000, 800); 73 gfx::Size layer_bounds(1000, 800);
74 PictureLayerTilingSet set(&client, layer_bounds); 74 PictureLayerTilingSet set(&client, layer_bounds);
75 75
76 float scale = min_scale; 76 float scale = min_scale;
77 for (int i = 0; i < num_tilings; ++i, scale += scale_increment) { 77 for (int i = 0; i < num_tilings; ++i, scale += scale_increment) {
78 PictureLayerTiling* tiling = set.AddTiling(scale); 78 PictureLayerTiling* tiling = set.AddTiling(scale);
79 tiling->CreateAllTilesForTesting(); 79 tiling->CreateAllTilesForTesting();
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 std::vector<Tile*> new_tiles = target_->tiling_at(0)->AllTilesForTesting(); 407 std::vector<Tile*> new_tiles = target_->tiling_at(0)->AllTilesForTesting();
408 for (size_t i = 0; i < original_tiles.size(); ++i) { 408 for (size_t i = 0; i < original_tiles.size(); ++i) {
409 std::vector<Tile*>::iterator find = 409 std::vector<Tile*>::iterator find =
410 std::find(new_tiles.begin(), new_tiles.end(), original_tiles[i]); 410 std::find(new_tiles.begin(), new_tiles.end(), original_tiles[i]);
411 EXPECT_TRUE(find == new_tiles.end()); 411 EXPECT_TRUE(find == new_tiles.end());
412 } 412 }
413 } 413 }
414 414
415 } // namespace 415 } // namespace
416 } // namespace cc 416 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/image_raster_worker_pool.cc ('k') | cc/resources/pixel_buffer_raster_worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698