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

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

Issue 6293023: PPAPI: move GLES2Implementation to PPAPI glue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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_surface_3d_impl.h ('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 6603abf92fbab7485338f077f723d8d33b395cdb..d0c3a60774924d9308cefac60d6d2128e69dcbda 100644
--- a/webkit/plugins/ppapi/ppb_surface_3d_impl.cc
+++ b/webkit/plugins/ppapi/ppb_surface_3d_impl.cc
@@ -9,6 +9,7 @@
#include "ppapi/c/dev/ppb_graphics_3d_dev.h"
#include "webkit/plugins/ppapi/common.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
+#include "webkit/plugins/ppapi/ppb_context_3d_impl.h"
namespace webkit {
namespace ppapi {
@@ -95,22 +96,21 @@ bool PPB_Surface3D_Impl::BindToInstance(bool bind) {
}
bool PPB_Surface3D_Impl::BindToContext(
- PluginDelegate::PlatformContext3D* context) {
+ PPB_Context3D_Impl* context) {
if (context == context_)
return true;
// Unbind from the current context.
if (context_) {
- context_->SetSwapBuffersCallback(NULL);
+ context_->platform_context()->SetSwapBuffersCallback(NULL);
}
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->GetGLES2Implementation()->ResizeCHROMIUM(
- size.width(), size.height());
+ context->gles2_impl()->ResizeCHROMIUM(size.width(), size.height());
- context->SetSwapBuffersCallback(
+ context->platform_context()->SetSwapBuffersCallback(
NewCallback(this, &PPB_Surface3D_Impl::OnSwapBuffers));
}
context_ = context;
@@ -127,7 +127,8 @@ bool PPB_Surface3D_Impl::SwapBuffers(PP_CompletionCallback callback) {
}
swap_callback_ = callback;
- return context_->SwapBuffers();
+ context_->gles2_impl()->SwapBuffers();
+ return true;
}
void PPB_Surface3D_Impl::ViewInitiatedPaint() {
@@ -149,7 +150,7 @@ void PPB_Surface3D_Impl::ViewFlushedPaint() {
}
unsigned int PPB_Surface3D_Impl::GetBackingTextureId() {
- return context_ ? context_->GetBackingTextureId() : 0;
+ return context_ ? context_->platform_context()->GetBackingTextureId() : 0;
}
void PPB_Surface3D_Impl::OnSwapBuffers() {
« no previous file with comments | « webkit/plugins/ppapi/ppb_surface_3d_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698