From 6ca0f0452f06325e4abd3acca40a0a2f13fb644c Mon Sep 17 00:00:00 2001 From: Derek Sollenberger Date: Fri, 17 Dec 2010 13:44:51 -0500 Subject: Add initial support for OpenGL plugins. bug: 2907737 Change-Id: I6f4f21146c834554db5ecb67fed8994f1cdc2cfe --- WebCore/plugins/PluginView.h | 2 ++ WebCore/plugins/android/PluginViewAndroid.cpp | 8 ++++++++ 2 files changed, 10 insertions(+) (limited to 'WebCore/plugins') diff --git a/WebCore/plugins/PluginView.h b/WebCore/plugins/PluginView.h index 68325cd..2ecdc51 100644 --- a/WebCore/plugins/PluginView.h +++ b/WebCore/plugins/PluginView.h @@ -276,6 +276,8 @@ namespace WebCore { #if USE(ACCELERATED_COMPOSITING) #if defined(XP_UNIX) && ENABLE(NETSCAPE_PLUGIN_API) && PLATFORM(QT) virtual PlatformLayer* platformLayer() const; +#elif ENABLE(NETSCAPE_PLUGIN_API) && defined(ANDROID_PLUGINS) + virtual PlatformLayer* platformLayer() const; #else virtual PlatformLayer* platformLayer() const { return 0; } #endif diff --git a/WebCore/plugins/android/PluginViewAndroid.cpp b/WebCore/plugins/android/PluginViewAndroid.cpp index f0890ae..68fa3d7 100644 --- a/WebCore/plugins/android/PluginViewAndroid.cpp +++ b/WebCore/plugins/android/PluginViewAndroid.cpp @@ -83,6 +83,7 @@ #include "PluginWidgetAndroid.h" #include "android_npapi.h" +#include "ANPOpenGL_npapi.h" #include "ANPSurface_npapi.h" #include "ANPSystem_npapi.h" #include "SkANP.h" @@ -104,6 +105,7 @@ extern void ANPSurfaceInterfaceV0_Init(ANPInterface* value); extern void ANPTypefaceInterfaceV0_Init(ANPInterface* value); extern void ANPWindowInterfaceV0_Init(ANPInterface* value); extern void ANPSystemInterfaceV0_Init(ANPInterface* value); +extern void ANPOpenGLInterfaceV0_Init(ANPInterface* value); struct VarProcPair { int enumValue; @@ -128,6 +130,7 @@ static const VarProcPair gVarProcs[] = { { VARPROCLINE(TypefaceInterfaceV0) }, { VARPROCLINE(WindowInterfaceV0) }, { VARPROCLINE(SystemInterfaceV0) }, + { VARPROCLINE(OpenGLInterfaceV0) }, }; /* return true if var was an interface request (error will be set accordingly) @@ -187,6 +190,11 @@ void PluginView::platformDestroy() delete m_window; } +PlatformLayer* PluginView::platformLayer() const +{ + return (PlatformLayer*) m_window->getLayer(); +} + #if ENABLE(TOUCH_EVENTS) void PluginView::handleTouchEvent(TouchEvent* event) { -- cgit v1.1