diff options
Diffstat (limited to 'webkit/plugins')
-rw-r--r-- | webkit/plugins/ppapi/plugin_delegate.h | 3 | ||||
-rw-r--r-- | webkit/plugins/ppapi/ppb_surface_3d_impl.cc | 13 |
2 files changed, 4 insertions, 12 deletions
diff --git a/webkit/plugins/ppapi/plugin_delegate.h b/webkit/plugins/ppapi/plugin_delegate.h index 1a94ea0..869189b 100644 --- a/webkit/plugins/ppapi/plugin_delegate.h +++ b/webkit/plugins/ppapi/plugin_delegate.h @@ -151,9 +151,6 @@ class PluginDelegate { // Get the last EGL error. virtual unsigned GetError() = 0; - // Resize the backing texture used as a back buffer by OpenGL. - virtual void ResizeBackingTexture(const gfx::Size& size) = 0; - // Set an optional callback that will be invoked when the side effects of // a SwapBuffers call become visible to the compositor. Takes ownership // of the callback. diff --git a/webkit/plugins/ppapi/ppb_surface_3d_impl.cc b/webkit/plugins/ppapi/ppb_surface_3d_impl.cc index ab37013..6603abf 100644 --- a/webkit/plugins/ppapi/ppb_surface_3d_impl.cc +++ b/webkit/plugins/ppapi/ppb_surface_3d_impl.cc @@ -4,6 +4,7 @@ #include "webkit/plugins/ppapi/ppb_surface_3d_impl.h" +#include "gpu/command_buffer/client/gles2_implementation.h" #include "gpu/command_buffer/common/command_buffer.h" #include "ppapi/c/dev/ppb_graphics_3d_dev.h" #include "webkit/plugins/ppapi/common.h" @@ -105,15 +106,9 @@ 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. - context->ResizeBackingTexture(instance()->position().size()); - - // This is a temporary hack. The SwapBuffers is issued to force the resize - // to take place before any subsequent rendering. This might lead to a - // partially rendered frame being displayed. It is also not thread safe - // since the SwapBuffers is written to the command buffer and that command - // buffer might be written to by another thread. - // TODO(apatrick): Figure out the semantics of binding and resizing. - context->SwapBuffers(); + const gfx::Size& size = instance()->position().size(); + context->GetGLES2Implementation()->ResizeCHROMIUM( + size.width(), size.height()); context->SetSwapBuffersCallback( NewCallback(this, &PPB_Surface3D_Impl::OnSwapBuffers)); |