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

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

Issue 2286873003: Provide TaskRunner to ContextCacheController (Closed)
Patch Set: 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 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..cd8e38cfaa45075b4400d6850cca115d1f09062c 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_);
@@ -199,6 +199,9 @@ bool ContextProviderCommandBuffer::BindToCurrentThread() {
return false;
}
+ cache_controller_.reset(new cc::ContextCacheController(
+ gles2_impl_.get(), std::move(task_runner)));
+
// If any context in the share group has been lost, then abort and don't
// continue since we need to go back to the caller of the constructor to
// find the correct share group.
@@ -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

Powered by Google App Engine
This is Rietveld 408576698