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

Unified Diff: content/renderer/gpu/renderer_gl_context.cc

Issue 7860028: Retry 3 to split WebGraphicsContext3DCommandBufferImpl::initialize() into two stages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fold thread fixes into this patch. Created 9 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
« no previous file with comments | « content/renderer/gpu/gpu_channel_host.cc ('k') | content/renderer/gpu/transport_texture_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/renderer_gl_context.cc
diff --git a/content/renderer/gpu/renderer_gl_context.cc b/content/renderer/gpu/renderer_gl_context.cc
index 6320c80b9bb4aaaea7461b0da175ccc143393a93..255bd13f708cd3f29eae525f7d14bab37e6e5693 100644
--- a/content/renderer/gpu/renderer_gl_context.cc
+++ b/content/renderer/gpu/renderer_gl_context.cc
@@ -199,6 +199,7 @@ void RendererGLContext::SetContextLostCallback(
bool RendererGLContext::MakeCurrent(RendererGLContext* context) {
if (context) {
+ DCHECK(context->CalledOnValidThread());
gles2::SetGLContext(context->gles2_implementation_);
// Don't request latest error status from service. Just use the locally
@@ -290,6 +291,7 @@ bool RendererGLContext::Initialize(bool onscreen,
const char* allowed_extensions,
const int32* attrib_list,
const GURL& active_url) {
+ DCHECK(CalledOnValidThread());
DCHECK(size.width() >= 0 && size.height() >= 0);
TRACE_EVENT2("gpu", "RendererGLContext::Initialize",
"on_screen", onscreen, "num_pixels", size.GetArea());
@@ -413,6 +415,7 @@ bool RendererGLContext::Initialize(bool onscreen,
void RendererGLContext::Destroy() {
TRACE_EVENT0("gpu", "RendererGLContext::Destroy");
+ DCHECK(CalledOnValidThread());
SetParent(NULL);
if (gles2_implementation_) {
« no previous file with comments | « content/renderer/gpu/gpu_channel_host.cc ('k') | content/renderer/gpu/transport_texture_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698