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

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

Issue 8676042: Remove Context3D/Surface3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style Created 9 years, 1 month 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/ppapi_plugin_instance.h ('k') | webkit/plugins/ppapi/ppb_context_3d_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppapi_plugin_instance.cc
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index ba7e44ee98982743cfd9f070fb598137713de1a0..894a7cc2011147e116623805ff58d35f1f381bb5 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -72,7 +72,6 @@
#include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h"
#include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h"
#include "webkit/plugins/ppapi/ppb_image_data_impl.h"
-#include "webkit/plugins/ppapi/ppb_surface_3d_impl.h"
#include "webkit/plugins/ppapi/ppb_url_loader_impl.h"
#include "webkit/plugins/ppapi/ppb_url_request_info_impl.h"
#include "webkit/plugins/ppapi/ppp_pdf.h"
@@ -111,7 +110,6 @@ using ppapi::thunk::PPB_Graphics2D_API;
using ppapi::thunk::PPB_Graphics3D_API;
using ppapi::thunk::PPB_ImageData_API;
using ppapi::thunk::PPB_Instance_FunctionAPI;
-using ppapi::thunk::PPB_Surface3D_API;
using ppapi::Var;
using WebKit::WebBindings;
using WebKit::WebCanvas;
@@ -409,8 +407,6 @@ void PluginInstance::ScrollRect(int dx, int dy, const gfx::Rect& rect) {
unsigned PluginInstance::GetBackingTextureId() {
if (GetBoundGraphics3D())
return GetBoundGraphics3D()->GetBackingTextureId();
- else if (GetBoundSurface3D())
- return GetBoundSurface3D()->GetBackingTextureId();
return 0;
}
@@ -803,8 +799,6 @@ void PluginInstance::ViewInitiatedPaint() {
GetBoundGraphics2D()->ViewInitiatedPaint();
else if (GetBoundGraphics3D())
GetBoundGraphics3D()->ViewInitiatedPaint();
- else if (GetBoundSurface3D())
- GetBoundSurface3D()->ViewInitiatedPaint();
}
void PluginInstance::ViewFlushedPaint() {
@@ -814,8 +808,6 @@ void PluginInstance::ViewFlushedPaint() {
GetBoundGraphics2D()->ViewFlushedPaint();
else if (GetBoundGraphics3D())
GetBoundGraphics3D()->ViewFlushedPaint();
- else if (GetBoundSurface3D())
- GetBoundSurface3D()->ViewFlushedPaint();
}
bool PluginInstance::GetBitmapForOptimizedPluginPaint(
@@ -1544,15 +1536,6 @@ PPB_Graphics3D_Impl* PluginInstance::GetBoundGraphics3D() const {
return NULL;
}
-PPB_Surface3D_Impl* PluginInstance::GetBoundSurface3D() const {
- if (bound_graphics_.get() == NULL)
- return NULL;
-
- if (bound_graphics_->AsPPB_Surface3D_API())
- return static_cast<PPB_Surface3D_Impl*>(bound_graphics_.get());
- return NULL;
-}
-
void PluginInstance::setBackingTextureId(unsigned int id) {
// If we have a fullscreen_container_ (under PPB_FlashFullscreen)
// or desired_fullscreen_state is true (under PPB_Fullscreen),
@@ -1630,8 +1613,6 @@ PP_Bool PluginInstance::BindGraphics(PP_Instance instance,
GetBoundGraphics2D()->BindToInstance(NULL);
} else if (GetBoundGraphics3D()) {
GetBoundGraphics3D()->BindToInstance(false);
- } else if (GetBoundSurface3D()) {
- GetBoundSurface3D()->BindToInstance(false);
}
bound_graphics_ = NULL;
}
@@ -1655,9 +1636,6 @@ PP_Bool PluginInstance::BindGraphics(PP_Instance instance,
EnterResourceNoLock<PPB_Graphics3D_API> enter_3d(device, false);
PPB_Graphics3D_Impl* graphics_3d = enter_3d.succeeded() ?
static_cast<PPB_Graphics3D_Impl*>(enter_3d.object()) : NULL;
- EnterResourceNoLock<PPB_Surface3D_API> enter_surface_3d(device, false);
- PPB_Surface3D_Impl* surface_3d = enter_surface_3d.succeeded() ?
- static_cast<PPB_Surface3D_Impl*>(enter_surface_3d.object()) : NULL;
if (graphics_2d) {
if (graphics_2d->pp_instance() != pp_instance())
@@ -1678,16 +1656,6 @@ PP_Bool PluginInstance::BindGraphics(PP_Instance instance,
bound_graphics_ = graphics_3d;
setBackingTextureId(graphics_3d->GetBackingTextureId());
- } else if (surface_3d) {
- // Make sure graphics can only be bound to the instance it is
- // associated with.
- if (surface_3d->pp_instance() != pp_instance())
- return PP_FALSE;
- if (!surface_3d->BindToInstance(true))
- return PP_FALSE;
-
- bound_graphics_ = surface_3d;
- setBackingTextureId(surface_3d->GetBackingTextureId());
} else {
// The device is not a valid resource type.
return PP_FALSE;
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.h ('k') | webkit/plugins/ppapi/ppb_context_3d_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698