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

Unified Diff: gpu/pgl/pgl.cc

Issue 1529005: New experimental Pepper device API.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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: gpu/pgl/pgl.cc
===================================================================
--- gpu/pgl/pgl.cc (revision 44555)
+++ gpu/pgl/pgl.cc (working copy)
@@ -123,8 +123,13 @@
// TODO(apatrick): I'm not sure if this should actually change the
// current context if it fails. For now it gets changed even if it fails
// becuase making GL calls with a NULL context crashes.
+#if defined(ENABLE_NEW_NPDEVICE_API)
+ if (pgl_context->command_buffer_->GetCachedError() != gpu::error::kNoError)
+ return PGL_FALSE;
+#else
if (pgl_context->device_context_->error != NPDeviceContext3DError_NoError)
return PGL_FALSE;
+#endif
}
else {
gles2::SetGLContext(NULL);
@@ -136,8 +141,13 @@
PGLBoolean PGLContextImpl::SwapBuffers() {
// Don't request latest error status from service. Just use the locally cached
// information from the last flush.
+#if defined(ENABLE_NEW_NPDEVICE_API)
+ if (command_buffer_->GetCachedError() != gpu::error::kNoError)
+ return PGL_FALSE;
+#else
if (device_context_->error != NPDeviceContext3DError_NoError)
return PGL_FALSE;
+#endif
gles2_implementation_->SwapBuffers();
return PGL_TRUE;

Powered by Google App Engine
This is Rietveld 408576698