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

Unified Diff: webkit/plugins/ppapi/ppb_surface_3d_impl.cc

Issue 6314025: Implements PPB_Context3DTrusted_Dev. Also add CreateRaw/Initialize for proxy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 11 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 | « webkit/plugins/ppapi/ppb_context_3d_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_surface_3d_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_surface_3d_impl.cc b/webkit/plugins/ppapi/ppb_surface_3d_impl.cc
index d0c3a60774924d9308cefac60d6d2128e69dcbda..baa03ea788ddd25d6f5fe2fb64def0c00663a5b8 100644
--- a/webkit/plugins/ppapi/ppb_surface_3d_impl.cc
+++ b/webkit/plugins/ppapi/ppb_surface_3d_impl.cc
@@ -107,8 +107,11 @@ bool PPB_Surface3D_Impl::BindToContext(
if (context) {
// Resize the backing texture to the size of the instance when it is bound.
// TODO(alokp): This should be the responsibility of plugins.
- const gfx::Size& size = instance()->position().size();
- context->gles2_impl()->ResizeCHROMIUM(size.width(), size.height());
+ gpu::gles2::GLES2Implementation* impl = context->gles2_impl();
+ if (impl) {
+ const gfx::Size& size = instance()->position().size();
+ impl->ResizeCHROMIUM(size.width(), size.height());
+ }
context->platform_context()->SetSwapBuffersCallback(
NewCallback(this, &PPB_Surface3D_Impl::OnSwapBuffers));
@@ -127,7 +130,10 @@ bool PPB_Surface3D_Impl::SwapBuffers(PP_CompletionCallback callback) {
}
swap_callback_ = callback;
- context_->gles2_impl()->SwapBuffers();
+ gpu::gles2::GLES2Implementation* impl = context_->gles2_impl();
+ if (impl) {
+ context_->gles2_impl()->SwapBuffers();
+ }
return true;
}
« no previous file with comments | « webkit/plugins/ppapi/ppb_context_3d_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698