Bug 938411 - Check for lost context in PresentScreenBuffer. r=jgilbert, a=lsblakk
authorBenoit Jacob <bjacob@mozilla.com>
Sat, 23 Nov 2013 21:21:45 -0500
changeset 166598 6c018c4f2eaedec9601ce9244d868b28a6b1e646
parent 166597 938330ba178666a2826104ed18043548386a12ce
child 166599 b241eaa5d3b83f6c0f30f699ba1f5be0d6acf902
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert, lsblakk
bugs938411
milestone27.0a2
Bug 938411 - Check for lost context in PresentScreenBuffer. r=jgilbert, a=lsblakk
content/canvas/src/WebGLContext.cpp
--- a/content/canvas/src/WebGLContext.cpp
+++ b/content/canvas/src/WebGLContext.cpp
@@ -1166,16 +1166,20 @@ WebGLContext::ForceClearFramebufferWithD
     }
 }
 
 // For an overview of how WebGL compositing works, see:
 // https://wiki.mozilla.org/Platform/GFX/WebGL/Compositing
 bool
 WebGLContext::PresentScreenBuffer()
 {
+    if (IsContextLost()) {
+        return false;
+    }
+
     if (!mShouldPresent) {
         return false;
     }
 
     gl->MakeCurrent();
     if (!gl->PublishFrame()) {
         this->ForceLoseContext();
         return false;