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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 228173002: cc: Separate RasterWorkerPool interface from implementation details. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review feedback Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 96d05363617bb8094c43e5b43e16b27bfaff0cd6..5be44c4b9627adcf6e1e62788183111f2e931ff0 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -49,6 +49,7 @@
#include "cc/resources/picture_layer_tiling.h"
#include "cc/resources/pixel_buffer_raster_worker_pool.h"
#include "cc/resources/prioritized_resource_manager.h"
+#include "cc/resources/raster_worker_pool.h"
#include "cc/resources/texture_mailbox_deleter.h"
#include "cc/resources/ui_resource_bitmap.h"
#include "cc/scheduler/delay_based_time_source.h"
@@ -306,8 +307,7 @@ LayerTreeHostImpl::~LayerTreeHostImpl() {
pending_tree_.reset();
active_tree_.reset();
tile_manager_.reset();
- image_raster_worker_pool_.reset();
- pixel_buffer_raster_worker_pool_.reset();
+ raster_worker_pool_.reset();
direct_raster_worker_pool_.reset();
}
@@ -1796,27 +1796,26 @@ void LayerTreeHostImpl::CreateAndSetTileManager(
DCHECK(resource_provider);
DCHECK(proxy_->ImplThreadTaskRunner());
- RasterWorkerPool* default_raster_worker_pool = NULL;
if (using_map_image) {
- image_raster_worker_pool_ = ImageRasterWorkerPool::Create(
+ raster_worker_pool_ = ImageRasterWorkerPool::Create(
proxy_->ImplThreadTaskRunner(),
+ RasterWorkerPool::GetTaskGraphRunner(),
resource_provider,
GetMapImageTextureTarget(context_provider));
- default_raster_worker_pool = image_raster_worker_pool_.get();
} else {
- pixel_buffer_raster_worker_pool_ = PixelBufferRasterWorkerPool::Create(
+ raster_worker_pool_ = PixelBufferRasterWorkerPool::Create(
proxy_->ImplThreadTaskRunner(),
+ RasterWorkerPool::GetTaskGraphRunner(),
resource_provider,
GetMaxTransferBufferUsageBytes(context_provider));
- default_raster_worker_pool = pixel_buffer_raster_worker_pool_.get();
}
direct_raster_worker_pool_ = DirectRasterWorkerPool::Create(
proxy_->ImplThreadTaskRunner(), resource_provider, context_provider);
tile_manager_ =
TileManager::Create(this,
resource_provider,
- default_raster_worker_pool,
- direct_raster_worker_pool_.get(),
+ raster_worker_pool_->AsRasterizer(),
+ direct_raster_worker_pool_->AsRasterizer(),
GetMaxRasterTasksUsageBytes(context_provider),
allow_rasterize_on_demand,
rendering_stats_instrumentation_);
@@ -1843,8 +1842,7 @@ bool LayerTreeHostImpl::InitializeRenderer(
// Note: order is important here.
renderer_.reset();
tile_manager_.reset();
- image_raster_worker_pool_.reset();
- pixel_buffer_raster_worker_pool_.reset();
+ raster_worker_pool_.reset();
direct_raster_worker_pool_.reset();
resource_provider_.reset();
output_surface_.reset();
@@ -1971,8 +1969,7 @@ void LayerTreeHostImpl::ReleaseGL() {
ReleaseTreeResources();
renderer_.reset();
tile_manager_.reset();
- image_raster_worker_pool_.reset();
- pixel_buffer_raster_worker_pool_.reset();
+ raster_worker_pool_.reset();
direct_raster_worker_pool_.reset();
resource_provider_->InitializeSoftware();
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698