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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 476193002: gpu: ContextProvider::BindToCurrentThread() should be called one time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 3975856b9b0a14cfd62120fd9ddbb8ec296a849c..930d476afda8fa9d79d03ba4ba7c59b357e7f8dc 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1177,10 +1177,10 @@ RenderThreadImpl::SharedMainThreadContextProvider() {
shared_main_thread_contexts_ = ContextProviderCommandBuffer::Create(
CreateOffscreenContext3d(), "Offscreen-MainThread");
}
+ if (shared_main_thread_contexts_ &&
danakj 2014/08/15 16:23:54 it's never null here right?
dshwang 2014/08/15 16:50:16 No, above factory method can return NULL.
danakj 2014/08/15 16:52:35 But ContextProviderCommandBuffer::Create won't if
dshwang 2014/08/15 17:28:39 IMO CreateOffscreenContext3d() can return NULL. Fo
danakj 2014/08/15 17:30:43 Ah okay ya, I had to go one deeper. LGTM
+ !shared_main_thread_contexts_->BindToCurrentThread())
+ shared_main_thread_contexts_ = NULL;
}
- if (shared_main_thread_contexts_ &&
- !shared_main_thread_contexts_->BindToCurrentThread())
- shared_main_thread_contexts_ = NULL;
return shared_main_thread_contexts_;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698