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

Side by Side Diff: cc/resources/tile_manager_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
« no previous file with comments | « cc/resources/tile_manager_perftest.cc ('k') | cc/resources/transferable_resource.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/tile.h" 5 #include "cc/resources/tile.h"
6 #include "cc/resources/tile_priority.h" 6 #include "cc/resources/tile_priority.h"
7 #include "cc/test/fake_output_surface.h" 7 #include "cc/test/fake_output_surface.h"
8 #include "cc/test/fake_output_surface_client.h" 8 #include "cc/test/fake_output_surface_client.h"
9 #include "cc/test/fake_picture_pile_impl.h" 9 #include "cc/test/fake_picture_pile_impl.h"
10 #include "cc/test/fake_tile_manager.h" 10 #include "cc/test/fake_tile_manager.h"
11 #include "cc/test/fake_tile_manager_client.h" 11 #include "cc/test/fake_tile_manager_client.h"
12 #include "cc/test/test_tile_priorities.h" 12 #include "cc/test/test_tile_priorities.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace cc { 15 namespace cc {
16 namespace { 16 namespace {
17 17
18 class TileManagerTest : public testing::TestWithParam<bool> { 18 class TileManagerTest : public testing::TestWithParam<bool> {
19 public: 19 public:
20 typedef std::vector<scoped_refptr<Tile> > TileVector; 20 typedef std::vector<scoped_refptr<Tile> > TileVector;
21 21
22 void Initialize(int max_tiles, 22 void Initialize(int max_tiles,
23 TileMemoryLimitPolicy memory_limit_policy, 23 TileMemoryLimitPolicy memory_limit_policy,
24 TreePriority tree_priority) { 24 TreePriority tree_priority) {
25 output_surface_ = FakeOutputSurface::Create3d(); 25 output_surface_ = FakeOutputSurface::Create3d();
26 CHECK(output_surface_->BindToClient(&output_surface_client_)); 26 CHECK(output_surface_->BindToClient(&output_surface_client_));
27 27
28 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 0); 28 resource_provider_ =
29 ResourceProvider::Create(output_surface_.get(), 0, false);
29 tile_manager_ = make_scoped_ptr( 30 tile_manager_ = make_scoped_ptr(
30 new FakeTileManager(&tile_manager_client_, resource_provider_.get())); 31 new FakeTileManager(&tile_manager_client_, resource_provider_.get()));
31 32
32 memory_limit_policy_ = memory_limit_policy; 33 memory_limit_policy_ = memory_limit_policy;
33 max_memory_tiles_ = max_tiles; 34 max_memory_tiles_ = max_tiles;
34 GlobalStateThatImpactsTilePriority state; 35 GlobalStateThatImpactsTilePriority state;
35 gfx::Size tile_size = settings_.default_tile_size; 36 gfx::Size tile_size = settings_.default_tile_size;
36 37
37 // The parametrization specifies whether the max tile limit should 38 // The parametrization specifies whether the max tile limit should
38 // be applied to RAM or to tile limit. 39 // be applied to RAM or to tile limit.
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 } 521 }
521 522
522 // If true, the max tile limit should be applied as bytes; if false, 523 // If true, the max tile limit should be applied as bytes; if false,
523 // as num_resources_limit. 524 // as num_resources_limit.
524 INSTANTIATE_TEST_CASE_P(TileManagerTests, 525 INSTANTIATE_TEST_CASE_P(TileManagerTests,
525 TileManagerTest, 526 TileManagerTest,
526 ::testing::Values(true, false)); 527 ::testing::Values(true, false));
527 528
528 } // namespace 529 } // namespace
529 } // namespace cc 530 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_manager_perftest.cc ('k') | cc/resources/transferable_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698