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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 1951193002: cc: Add mailbox support to ResourceProvider write locks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@worker_context_stream
Patch Set: ericrk's review Created 4 years, 6 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
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 f1ef243b83c595dcbfda11fe6afb26488f1a3c20..2e890cdef0f632d592433f06d4ba33fcd6373630 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -62,7 +62,6 @@
#include "cc/quads/texture_draw_quad.h"
#include "cc/raster/bitmap_raster_buffer_provider.h"
#include "cc/raster/gpu_raster_buffer_provider.h"
-#include "cc/raster/gpu_rasterizer.h"
#include "cc/raster/one_copy_raster_buffer_provider.h"
#include "cc/raster/raster_buffer_provider.h"
#include "cc/raster/synchronous_task_graph_runner.h"
@@ -2176,8 +2175,7 @@ void LayerTreeHostImpl::CreateAndSetRenderer() {
}
void LayerTreeHostImpl::CreateTileManagerResources() {
- std::unique_ptr<RasterBufferProvider> raster_buffer_provider;
- CreateResourceAndRasterBufferProvider(&raster_buffer_provider,
+ CreateResourceAndRasterBufferProvider(&raster_buffer_provider_,
&resource_pool_);
if (use_gpu_rasterization_) {
@@ -2202,13 +2200,12 @@ void LayerTreeHostImpl::CreateTileManagerResources() {
task_graph_runner = single_thread_synchronous_task_graph_runner_.get();
}
- tile_task_manager_ = TileTaskManagerImpl::Create(
- std::move(raster_buffer_provider), task_graph_runner);
+ tile_task_manager_ = TileTaskManagerImpl::Create(task_graph_runner);
// TODO(vmpstr): Initialize tile task limit at ctor time.
tile_manager_.SetResources(
resource_pool_.get(), image_decode_controller_.get(),
- tile_task_manager_.get(),
+ tile_task_manager_.get(), raster_buffer_provider_.get(),
is_synchronous_single_threaded_ ? std::numeric_limits<size_t>::max()
: settings_.scheduled_raster_task_limit,
use_gpu_rasterization_);
@@ -2247,7 +2244,7 @@ void LayerTreeHostImpl::CreateResourceAndRasterBufferProvider(
*raster_buffer_provider = base::MakeUnique<GpuRasterBufferProvider>(
compositor_context_provider, worker_context_provider,
resource_provider_.get(), settings_.use_distance_field_text,
- msaa_sample_count);
+ msaa_sample_count, settings_.async_worker_context_enabled);
return;
}
@@ -2283,7 +2280,8 @@ void LayerTreeHostImpl::CreateResourceAndRasterBufferProvider(
GetTaskRunner(), compositor_context_provider, worker_context_provider,
resource_provider_.get(), max_copy_texture_chromium_size,
settings_.use_partial_raster, settings_.max_staging_buffer_usage_in_bytes,
- settings_.renderer_settings.preferred_tile_format);
+ settings_.renderer_settings.preferred_tile_format,
+ settings_.async_worker_context_enabled);
}
void LayerTreeHostImpl::SetLayerTreeMutator(

Powered by Google App Engine
This is Rietveld 408576698