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

Unified Diff: content/common/gpu/client/context_provider_command_buffer.cc

Issue 2286873003: Provide TaskRunner to ContextCacheController (Closed)
Patch Set: feedback Created 4 years, 3 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: content/common/gpu/client/context_provider_command_buffer.cc
diff --git a/content/common/gpu/client/context_provider_command_buffer.cc b/content/common/gpu/client/context_provider_command_buffer.cc
index 45c890854e095360e825875d8d6e93fb2f3c3847..0a6770415584f897786603e69dc4788471fb0738 100644
--- a/content/common/gpu/client/context_provider_command_buffer.cc
+++ b/content/common/gpu/client/context_provider_command_buffer.cc
@@ -158,7 +158,7 @@ bool ContextProviderCommandBuffer::BindToCurrentThread() {
task_runner = base::ThreadTaskRunnerHandle::Get();
command_buffer_ = gpu::CommandBufferProxyImpl::Create(
std::move(channel_), surface_handle_, shared_command_buffer, stream_id_,
- stream_priority_, attributes_, active_url_, std::move(task_runner));
+ stream_priority_, attributes_, active_url_, task_runner);
if (!command_buffer_) {
DLOG(ERROR) << "GpuChannelHost failed to create command buffer.";
command_buffer_metrics::UmaRecordContextInitFailed(context_type_);
@@ -216,6 +216,9 @@ bool ContextProviderCommandBuffer::BindToCurrentThread() {
return false;
shared_providers_->list.push_back(this);
+
+ cache_controller_.reset(new cc::ContextCacheController(
+ gles2_impl_.get(), std::move(task_runner)));
}
set_bind_failed.Reset();
bind_succeeded_ = true;
@@ -226,8 +229,6 @@ bool ContextProviderCommandBuffer::BindToCurrentThread() {
// callback.
base::Unretained(this)));
- cache_controller_.reset(new cc::ContextCacheController(gles2_impl_.get()));
-
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableGpuClientTracing)) {
// This wraps the real GLES2Implementation and we should always use this
« no previous file with comments | « components/display_compositor/yuv_readback_unittest.cc ('k') | gpu/command_buffer/client/gl_in_process_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698