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

Side by Side Diff: cc/tiles/tile_manager.h

Issue 2235623003: cc: Add gfx::ColorSpace to cc::ResourceProvider resource creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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/test/render_pass_test_utils.cc ('k') | cc/tiles/tile_manager.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 #ifndef CC_TILES_TILE_MANAGER_H_ 5 #ifndef CC_TILES_TILE_MANAGER_H_
6 #define CC_TILES_TILE_MANAGER_H_ 6 #define CC_TILES_TILE_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 const MemoryHistory::Entry& memory_stats_from_last_assign() const { 142 const MemoryHistory::Entry& memory_stats_from_last_assign() const {
143 return memory_stats_from_last_assign_; 143 return memory_stats_from_last_assign_;
144 } 144 }
145 145
146 // Public methods for testing. 146 // Public methods for testing.
147 void InitializeTilesWithResourcesForTesting(const std::vector<Tile*>& tiles) { 147 void InitializeTilesWithResourcesForTesting(const std::vector<Tile*>& tiles) {
148 for (size_t i = 0; i < tiles.size(); ++i) { 148 for (size_t i = 0; i < tiles.size(); ++i) {
149 TileDrawInfo& draw_info = tiles[i]->draw_info(); 149 TileDrawInfo& draw_info = tiles[i]->draw_info();
150 draw_info.resource_ = resource_pool_->AcquireResource( 150 draw_info.resource_ = resource_pool_->AcquireResource(
151 tiles[i]->desired_texture_size(), 151 tiles[i]->desired_texture_size(),
152 raster_buffer_provider_->GetResourceFormat(false)); 152 raster_buffer_provider_->GetResourceFormat(false), gfx::ColorSpace());
153 } 153 }
154 } 154 }
155 155
156 void ReleaseTileResourcesForTesting(const std::vector<Tile*>& tiles) { 156 void ReleaseTileResourcesForTesting(const std::vector<Tile*>& tiles) {
157 for (size_t i = 0; i < tiles.size(); ++i) { 157 for (size_t i = 0; i < tiles.size(); ++i) {
158 Tile* tile = tiles[i]; 158 Tile* tile = tiles[i];
159 FreeResourcesForTile(tile); 159 FreeResourcesForTile(tile);
160 } 160 }
161 } 161 }
162 162
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 std::vector<std::pair<DrawImage, scoped_refptr<TileTask>>> locked_images_; 342 std::vector<std::pair<DrawImage, scoped_refptr<TileTask>>> locked_images_;
343 343
344 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_; 344 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_;
345 345
346 DISALLOW_COPY_AND_ASSIGN(TileManager); 346 DISALLOW_COPY_AND_ASSIGN(TileManager);
347 }; 347 };
348 348
349 } // namespace cc 349 } // namespace cc
350 350
351 #endif // CC_TILES_TILE_MANAGER_H_ 351 #endif // CC_TILES_TILE_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/test/render_pass_test_utils.cc ('k') | cc/tiles/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698