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

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

Issue 147603006: [#7] Resubmitted - Pass gfx structs by const ref (gfx::Size) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resubmit 145313006 Created 6 years, 10 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.cc ('k') | cc/resources/video_resource_updater.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"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 virtual void TearDown() OVERRIDE { 69 virtual void TearDown() OVERRIDE {
70 tile_manager_.reset(NULL); 70 tile_manager_.reset(NULL);
71 picture_pile_ = NULL; 71 picture_pile_ = NULL;
72 72
73 testing::Test::TearDown(); 73 testing::Test::TearDown();
74 } 74 }
75 75
76 TileVector CreateTilesWithSize(int count, 76 TileVector CreateTilesWithSize(int count,
77 TilePriority active_priority, 77 TilePriority active_priority,
78 TilePriority pending_priority, 78 TilePriority pending_priority,
79 gfx::Size tile_size) { 79 const gfx::Size& tile_size) {
80 TileVector tiles; 80 TileVector tiles;
81 for (int i = 0; i < count; ++i) { 81 for (int i = 0; i < count; ++i) {
82 scoped_refptr<Tile> tile = tile_manager_->CreateTile(picture_pile_.get(), 82 scoped_refptr<Tile> tile = tile_manager_->CreateTile(picture_pile_.get(),
83 tile_size, 83 tile_size,
84 gfx::Rect(), 84 gfx::Rect(),
85 gfx::Rect(), 85 gfx::Rect(),
86 1.0, 86 1.0,
87 0, 87 0,
88 0, 88 0,
89 Tile::USE_LCD_TEXT); 89 Tile::USE_LCD_TEXT);
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 } 512 }
513 513
514 // If true, the max tile limit should be applied as bytes; if false, 514 // If true, the max tile limit should be applied as bytes; if false,
515 // as num_resources_limit. 515 // as num_resources_limit.
516 INSTANTIATE_TEST_CASE_P(TileManagerTests, 516 INSTANTIATE_TEST_CASE_P(TileManagerTests,
517 TileManagerTest, 517 TileManagerTest,
518 ::testing::Values(true, false)); 518 ::testing::Values(true, false));
519 519
520 } // namespace 520 } // namespace
521 } // namespace cc 521 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_manager.cc ('k') | cc/resources/video_resource_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698