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

Side by Side Diff: cc/tile_manager.cc

Issue 11578019: Remove the pools from the ResourceProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-resolve against HEAD Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « cc/software_renderer_unittest.cc ('k') | cc/tiled_layer_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/tile_manager.h" 5 #include "cc/tile_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 ManagedTileState::~ManagedTileState() { 129 ManagedTileState::~ManagedTileState() {
130 DCHECK(!resource); 130 DCHECK(!resource);
131 DCHECK(!resource_is_being_initialized); 131 DCHECK(!resource_is_being_initialized);
132 } 132 }
133 133
134 TileManager::TileManager( 134 TileManager::TileManager(
135 TileManagerClient* client, 135 TileManagerClient* client,
136 ResourceProvider* resource_provider, 136 ResourceProvider* resource_provider,
137 size_t num_raster_threads) 137 size_t num_raster_threads)
138 : client_(client), 138 : client_(client),
139 resource_pool_(ResourcePool::Create(resource_provider, 139 resource_pool_(ResourcePool::Create(resource_provider)),
140 Renderer::ImplPool)),
141 manage_tiles_pending_(false), 140 manage_tiles_pending_(false),
142 check_for_completed_set_pixels_pending_(false) { 141 check_for_completed_set_pixels_pending_(false) {
143 // Initialize all threads. 142 // Initialize all threads.
144 const std::string thread_name_prefix = kRasterThreadNamePrefix; 143 const std::string thread_name_prefix = kRasterThreadNamePrefix;
145 while (raster_threads_.size() < num_raster_threads) { 144 while (raster_threads_.size() < num_raster_threads) {
146 int thread_number = raster_threads_.size() + 1; 145 int thread_number = raster_threads_.size() + 1;
147 scoped_ptr<RasterThread> thread = make_scoped_ptr( 146 scoped_ptr<RasterThread> thread = make_scoped_ptr(
148 new RasterThread(thread_name_prefix + 147 new RasterThread(thread_name_prefix +
149 StringPrintf("Worker%d", thread_number).c_str())); 148 StringPrintf("Worker%d", thread_number).c_str()));
150 raster_threads_.append(thread.Pass()); 149 raster_threads_.append(thread.Pass());
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 } 635 }
637 636
638 void TileManager::DidFinishTileInitialization(Tile* tile) { 637 void TileManager::DidFinishTileInitialization(Tile* tile) {
639 ManagedTileState& managed_tile_state = tile->managed_state(); 638 ManagedTileState& managed_tile_state = tile->managed_state();
640 DCHECK(managed_tile_state.resource); 639 DCHECK(managed_tile_state.resource);
641 managed_tile_state.resource_is_being_initialized = false; 640 managed_tile_state.resource_is_being_initialized = false;
642 managed_tile_state.can_be_freed = true; 641 managed_tile_state.can_be_freed = true;
643 } 642 }
644 643
645 } 644 }
OLDNEW
« no previous file with comments | « cc/software_renderer_unittest.cc ('k') | cc/tiled_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698