summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-12 16:45:33 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-12 16:45:33 +0000
commit44ce0b1adb867c77d02c45c2eb2a6c7ee3471167 (patch)
tree44e85d5ce38d7c5f15381c0bce2ba42dbd2715e9
parentc1aeaac2015e93e1168453d4de29619c43fda669 (diff)
downloadchromium_src-44ce0b1adb867c77d02c45c2eb2a6c7ee3471167.zip
chromium_src-44ce0b1adb867c77d02c45c2eb2a6c7ee3471167.tar.gz
chromium_src-44ce0b1adb867c77d02c45c2eb2a6c7ee3471167.tar.bz2
Rename uses of GPUPlugin in class names and IPC to AcceleratedSurface.
BUG=none TEST=Purely cleanup, no functional changes. Review URL: http://codereview.chromium.org/855003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41435 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/renderer_host/accelerated_surface_container_mac.cc (renamed from chrome/browser/renderer_host/gpu_plugin_container_mac.cc)28
-rw-r--r--chrome/browser/renderer_host/accelerated_surface_container_mac.h (renamed from chrome/browser/renderer_host/gpu_plugin_container_mac.h)39
-rw-r--r--chrome/browser/renderer_host/accelerated_surface_container_manager_mac.cc (renamed from chrome/browser/renderer_host/gpu_plugin_container_manager_mac.cc)40
-rw-r--r--chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h (renamed from chrome/browser/renderer_host/gpu_plugin_container_manager_mac.h)18
-rw-r--r--chrome/browser/renderer_host/render_widget_host.cc33
-rw-r--r--chrome/browser/renderer_host/render_widget_host.h19
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view.h27
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_mac.h31
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_mac.mm15
-rw-r--r--chrome/browser/renderer_host/test/test_render_view_host.cc9
-rw-r--r--chrome/browser/renderer_host/test/test_render_view_host.h21
-rwxr-xr-xchrome/chrome_browser.gypi8
-rw-r--r--chrome/common/plugin_messages_internal.h38
-rw-r--r--chrome/common/render_messages_internal.h26
-rw-r--r--chrome/plugin/command_buffer_stub.cc26
-rw-r--r--chrome/plugin/webplugin_delegate_stub.cc6
-rw-r--r--chrome/plugin/webplugin_delegate_stub.h6
-rw-r--r--chrome/plugin/webplugin_proxy.cc7
-rw-r--r--chrome/renderer/render_view.cc31
-rw-r--r--chrome/renderer/render_view.h22
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.cc44
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.h24
22 files changed, 263 insertions, 255 deletions
diff --git a/chrome/browser/renderer_host/gpu_plugin_container_mac.cc b/chrome/browser/renderer_host/accelerated_surface_container_mac.cc
index a2b69f4..66e8b4c 100644
--- a/chrome/browser/renderer_host/gpu_plugin_container_mac.cc
+++ b/chrome/browser/renderer_host/accelerated_surface_container_mac.cc
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/renderer_host/gpu_plugin_container_mac.h"
+#include "chrome/browser/renderer_host/accelerated_surface_container_mac.h"
#include "base/logging.h"
-#include "chrome/browser/renderer_host/gpu_plugin_container_manager_mac.h"
-#include "chrome/common/io_surface_support_mac.h"
#include "webkit/glue/webplugin.h"
+#include "chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h"
+#include "chrome/common/io_surface_support_mac.h"
-MacGPUPluginContainer::MacGPUPluginContainer()
+AcceleratedSurfaceContainerMac::AcceleratedSurfaceContainerMac()
: x_(0),
y_(0),
surface_(NULL),
@@ -18,22 +18,22 @@ MacGPUPluginContainer::MacGPUPluginContainer()
texture_(0) {
}
-MacGPUPluginContainer::~MacGPUPluginContainer() {
+AcceleratedSurfaceContainerMac::~AcceleratedSurfaceContainerMac() {
ReleaseIOSurface();
}
-void MacGPUPluginContainer::ReleaseIOSurface() {
+void AcceleratedSurfaceContainerMac::ReleaseIOSurface() {
if (surface_) {
CFRelease(surface_);
surface_ = NULL;
}
}
-void MacGPUPluginContainer::SetSizeAndIOSurface(
+void AcceleratedSurfaceContainerMac::SetSizeAndIOSurface(
int32 width,
int32 height,
uint64 io_surface_identifier,
- MacGPUPluginContainerManager* manager) {
+ AcceleratedSurfaceContainerManagerMac* manager) {
ReleaseIOSurface();
IOSurfaceSupport* io_surface_support = IOSurfaceSupport::Initialize();
if (io_surface_support) {
@@ -45,11 +45,11 @@ void MacGPUPluginContainer::SetSizeAndIOSurface(
}
}
-void MacGPUPluginContainer::SetSizeAndTransportDIB(
+void AcceleratedSurfaceContainerMac::SetSizeAndTransportDIB(
int32 width,
int32 height,
TransportDIB::Handle transport_dib,
- MacGPUPluginContainerManager* manager) {
+ AcceleratedSurfaceContainerManagerMac* manager) {
if (TransportDIB::is_valid(transport_dib)) {
transport_dib_.reset(TransportDIB::Map(transport_dib));
EnqueueTextureForDeletion(manager);
@@ -58,7 +58,7 @@ void MacGPUPluginContainer::SetSizeAndTransportDIB(
}
}
-void MacGPUPluginContainer::MoveTo(
+void AcceleratedSurfaceContainerMac::MoveTo(
const webkit_glue::WebPluginGeometry& geom) {
x_ = geom.window_rect.x();
y_ = geom.window_rect.y();
@@ -66,7 +66,7 @@ void MacGPUPluginContainer::MoveTo(
clipRect_ = geom.clip_rect;
}
-void MacGPUPluginContainer::Draw(CGLContextObj context) {
+void AcceleratedSurfaceContainerMac::Draw(CGLContextObj context) {
IOSurfaceSupport* io_surface_support = IOSurfaceSupport::Initialize();
GLenum target = GL_TEXTURE_RECTANGLE_ARB;
if (!texture_) {
@@ -150,8 +150,8 @@ void MacGPUPluginContainer::Draw(CGLContextObj context) {
}
}
-void MacGPUPluginContainer::EnqueueTextureForDeletion(
- MacGPUPluginContainerManager* manager) {
+void AcceleratedSurfaceContainerMac::EnqueueTextureForDeletion(
+ AcceleratedSurfaceContainerManagerMac* manager) {
manager->EnqueueTextureForDeletion(texture_);
texture_ = 0;
}
diff --git a/chrome/browser/renderer_host/gpu_plugin_container_mac.h b/chrome/browser/renderer_host/accelerated_surface_container_mac.h
index b985147..d9a7495 100644
--- a/chrome/browser/renderer_host/gpu_plugin_container_mac.h
+++ b/chrome/browser/renderer_host/accelerated_surface_container_mac.h
@@ -23,7 +23,7 @@
// does not have an on-screen window.
//
// This class encapsulates some of the management of these data
-// structures, in conjunction with the MacGPUPluginContainerManager.
+// structures, in conjunction with the AcceleratedSurfaceContainerManagerMac.
#include <CoreFoundation/CoreFoundation.h>
#include <OpenGL/OpenGL.h>
@@ -38,44 +38,41 @@ namespace webkit_glue {
struct WebPluginGeometry;
}
-class MacGPUPluginContainerManager;
+class AcceleratedSurfaceContainerManagerMac;
-class MacGPUPluginContainer {
+class AcceleratedSurfaceContainerMac {
public:
- MacGPUPluginContainer();
- virtual ~MacGPUPluginContainer();
+ AcceleratedSurfaceContainerMac();
+ virtual ~AcceleratedSurfaceContainerMac();
- // Sets the backing store and size of this plugin container. There are two
- // versions: the IOSurface version is used on systems where the IOSurface
- // API is supported (Mac OS X 10.6 and later); the TransportDIB is used on
- // Mac OS X 10.5 and earlier.
+ // Sets the backing store and size of this accelerated surface container.
+ // There are two versions: the IOSurface version is used on systems where the
+ // IOSurface API is supported (Mac OS X 10.6 and later); the TransportDIB is
+ // used on Mac OS X 10.5 and earlier.
void SetSizeAndIOSurface(int32 width,
int32 height,
uint64 io_surface_identifier,
- MacGPUPluginContainerManager* manager);
+ AcceleratedSurfaceContainerManagerMac* manager);
void SetSizeAndTransportDIB(int32 width,
int32 height,
TransportDIB::Handle transport_dib,
- MacGPUPluginContainerManager* manager);
+ AcceleratedSurfaceContainerManagerMac* manager);
- // Tells the plugin container that it has moved relative to the
+ // Tells the accelerated surface container that it has moved relative to the
// origin of the window, for example because of a scroll event.
void MoveTo(const webkit_glue::WebPluginGeometry& geom);
- // Draws this plugin's contents, texture mapped onto a quad in the
- // given OpenGL context. TODO(kbr): figure out and define exactly
- // how the coordinate system will work out.
+ // Draws this accelerated surface's contents, texture mapped onto a quad in
+ // the given OpenGL context. TODO(kbr): figure out and define exactly how the
+ // coordinate system will work out.
void Draw(CGLContextObj context);
// Enqueue our texture for later deletion. Call this before deleting
// this object.
- void EnqueueTextureForDeletion(MacGPUPluginContainerManager* manager);
+ void EnqueueTextureForDeletion(
+ AcceleratedSurfaceContainerManagerMac* manager);
private:
- // We currently only have a viable implementation of this class on
- // Snow Leopard. We need to think about fallback strategies that
- // will work on Leopard.
-
// The x and y coordinates of the plugin window on the web page.
int x_;
int y_;
@@ -107,7 +104,7 @@ class MacGPUPluginContainer {
// with it.
GLuint texture_;
- DISALLOW_COPY_AND_ASSIGN(MacGPUPluginContainer);
+ DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerMac);
};
#endif // CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MAC_H_
diff --git a/chrome/browser/renderer_host/gpu_plugin_container_manager_mac.cc b/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.cc
index 8eae393..f7c39e5 100644
--- a/chrome/browser/renderer_host/gpu_plugin_container_manager_mac.cc
+++ b/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.cc
@@ -2,63 +2,64 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/renderer_host/gpu_plugin_container_manager_mac.h"
+#include "chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h"
#include "base/logging.h"
-#include "chrome/browser/renderer_host/gpu_plugin_container_mac.h"
+#include "chrome/browser/renderer_host/accelerated_surface_container_mac.h"
#include "webkit/glue/webplugin.h"
-MacGPUPluginContainerManager::MacGPUPluginContainerManager()
+AcceleratedSurfaceContainerManagerMac::AcceleratedSurfaceContainerManagerMac()
: current_id_(0) {
}
gfx::PluginWindowHandle
-MacGPUPluginContainerManager::AllocateFakePluginWindowHandle() {
- MacGPUPluginContainer* container = new MacGPUPluginContainer();
+AcceleratedSurfaceContainerManagerMac::AllocateFakePluginWindowHandle() {
+ AcceleratedSurfaceContainerMac* container =
+ new AcceleratedSurfaceContainerMac();
gfx::PluginWindowHandle res =
static_cast<gfx::PluginWindowHandle>(++current_id_);
plugin_window_to_container_map_.insert(std::make_pair(res, container));
return res;
}
-void MacGPUPluginContainerManager::DestroyFakePluginWindowHandle(
+void AcceleratedSurfaceContainerManagerMac::DestroyFakePluginWindowHandle(
gfx::PluginWindowHandle id) {
- MacGPUPluginContainer* container = MapIDToContainer(id);
+ AcceleratedSurfaceContainerMac* container = MapIDToContainer(id);
if (container)
delete container;
plugin_window_to_container_map_.erase(id);
}
-void MacGPUPluginContainerManager::SetSizeAndIOSurface(
+void AcceleratedSurfaceContainerManagerMac::SetSizeAndIOSurface(
gfx::PluginWindowHandle id,
int32 width,
int32 height,
uint64 io_surface_identifier) {
- MacGPUPluginContainer* container = MapIDToContainer(id);
+ AcceleratedSurfaceContainerMac* container = MapIDToContainer(id);
if (container)
container->SetSizeAndIOSurface(width, height,
io_surface_identifier, this);
}
-void MacGPUPluginContainerManager::SetSizeAndTransportDIB(
+void AcceleratedSurfaceContainerManagerMac::SetSizeAndTransportDIB(
gfx::PluginWindowHandle id,
int32 width,
int32 height,
TransportDIB::Handle transport_dib) {
- MacGPUPluginContainer* container = MapIDToContainer(id);
+ AcceleratedSurfaceContainerMac* container = MapIDToContainer(id);
if (container)
container->SetSizeAndTransportDIB(width, height,
transport_dib, this);
}
-void MacGPUPluginContainerManager::MovePluginContainer(
+void AcceleratedSurfaceContainerManagerMac::MovePluginContainer(
const webkit_glue::WebPluginGeometry& move) {
- MacGPUPluginContainer* container = MapIDToContainer(move.window);
+ AcceleratedSurfaceContainerMac* container = MapIDToContainer(move.window);
if (container)
container->MoveTo(move);
}
-void MacGPUPluginContainerManager::Draw(CGLContextObj context) {
+void AcceleratedSurfaceContainerManagerMac::Draw(CGLContextObj context) {
glClearColor(0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -68,7 +69,7 @@ void MacGPUPluginContainerManager::Draw(CGLContextObj context) {
for (PluginWindowToContainerMap::const_iterator i =
plugin_window_to_container_map_.begin();
i != plugin_window_to_container_map_.end(); ++i) {
- MacGPUPluginContainer* container = i->second;
+ AcceleratedSurfaceContainerMac* container = i->second;
container->Draw(context);
}
@@ -80,14 +81,16 @@ void MacGPUPluginContainerManager::Draw(CGLContextObj context) {
glFlush();
}
-void MacGPUPluginContainerManager::EnqueueTextureForDeletion(GLuint texture) {
+void AcceleratedSurfaceContainerManagerMac::EnqueueTextureForDeletion(
+ GLuint texture) {
if (texture) {
textures_pending_deletion_.push_back(texture);
}
}
-MacGPUPluginContainer* MacGPUPluginContainerManager::MapIDToContainer(
- gfx::PluginWindowHandle id) {
+AcceleratedSurfaceContainerMac*
+ AcceleratedSurfaceContainerManagerMac::MapIDToContainer(
+ gfx::PluginWindowHandle id) {
PluginWindowToContainerMap::const_iterator i =
plugin_window_to_container_map_.find(id);
if (i != plugin_window_to_container_map_.end())
@@ -97,4 +100,3 @@ MacGPUPluginContainer* MacGPUPluginContainerManager::MapIDToContainer(
return NULL;
}
-
diff --git a/chrome/browser/renderer_host/gpu_plugin_container_manager_mac.h b/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h
index 89e8620..95bf054 100644
--- a/chrome/browser/renderer_host/gpu_plugin_container_manager_mac.h
+++ b/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h
@@ -17,13 +17,13 @@ namespace webkit_glue {
struct WebPluginGeometry;
}
-class MacGPUPluginContainer;
+class AcceleratedSurfaceContainerMac;
// Helper class that manages the backing store and on-screen rendering
// of instances of the GPU plugin on the Mac.
-class MacGPUPluginContainerManager {
+class AcceleratedSurfaceContainerManagerMac {
public:
- MacGPUPluginContainerManager();
+ AcceleratedSurfaceContainerManagerMac();
// Allocates a new "fake" PluginWindowHandle, which is used as the
// key for the other operations.
@@ -37,9 +37,9 @@ class MacGPUPluginContainerManager {
// API is supported (Mac OS X 10.6 and later); the TransportDIB is used on
// Mac OS X 10.5 and earlier.
void SetSizeAndIOSurface(gfx::PluginWindowHandle id,
- int32 width,
- int32 height,
- uint64 io_surface_identifier);
+ int32 width,
+ int32 height,
+ uint64 io_surface_identifier);
void SetSizeAndTransportDIB(gfx::PluginWindowHandle id,
int32 width,
int32 height,
@@ -61,17 +61,17 @@ class MacGPUPluginContainerManager {
uint32 current_id_;
// Maps a "fake" plugin window handle to the corresponding container.
- MacGPUPluginContainer* MapIDToContainer(gfx::PluginWindowHandle id);
+ AcceleratedSurfaceContainerMac* MapIDToContainer(gfx::PluginWindowHandle id);
// A map that associates plugin window handles with their containers.
- typedef std::map<gfx::PluginWindowHandle, MacGPUPluginContainer*>
+ typedef std::map<gfx::PluginWindowHandle, AcceleratedSurfaceContainerMac*>
PluginWindowToContainerMap;
PluginWindowToContainerMap plugin_window_to_container_map_;
// A list of OpenGL textures waiting to be deleted
std::vector<GLuint> textures_pending_deletion_;
- DISALLOW_COPY_AND_ASSIGN(MacGPUPluginContainerManager);
+ DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerManagerMac);
};
#endif // CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MANAGER_MAC_H_
diff --git a/chrome/browser/renderer_host/render_widget_host.cc b/chrome/browser/renderer_host/render_widget_host.cc
index 2bee3e6..e1e69ea 100644
--- a/chrome/browser/renderer_host/render_widget_host.cc
+++ b/chrome/browser/renderer_host/render_widget_host.cc
@@ -151,17 +151,16 @@ void RenderWidgetHost::OnMessageReceived(const IPC::Message &msg) {
IPC_MESSAGE_HANDLER(ViewHostMsg_GetScreenInfo, OnMsgGetScreenInfo)
IPC_MESSAGE_HANDLER(ViewHostMsg_GetWindowRect, OnMsgGetWindowRect)
IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowRect, OnMsgGetRootWindowRect)
- // The following messages are only used on 10.6 and later
IPC_MESSAGE_HANDLER(ViewHostMsg_AllocateFakePluginWindowHandle,
OnAllocateFakePluginWindowHandle)
IPC_MESSAGE_HANDLER(ViewHostMsg_DestroyFakePluginWindowHandle,
OnDestroyFakePluginWindowHandle)
- IPC_MESSAGE_HANDLER(ViewHostMsg_GPUPluginSetIOSurface,
- OnGPUPluginSetIOSurface)
- IPC_MESSAGE_HANDLER(ViewHostMsg_GPUPluginSetTransportDIB,
- OnGPUPluginSetTransportDIB)
- IPC_MESSAGE_HANDLER(ViewHostMsg_GPUPluginBuffersSwapped,
- OnGPUPluginBuffersSwapped)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_AcceleratedSurfaceSetIOSurface,
+ OnAcceleratedSurfaceSetIOSurface)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_AcceleratedSurfaceSetTransportDIB,
+ OnAcceleratedSurfaceSetTransportDIB)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_AcceleratedSurfaceBuffersSwapped,
+ OnAcceleratedSurfaceBuffersSwapped)
#endif
IPC_MESSAGE_UNHANDLED_ERROR()
IPC_END_MESSAGE_MAP_EX()
@@ -940,29 +939,31 @@ void RenderWidgetHost::OnDestroyFakePluginWindowHandle(
}
}
-void RenderWidgetHost::OnGPUPluginSetIOSurface(gfx::PluginWindowHandle window,
- int32 width,
- int32 height,
- uint64 mach_port) {
+void RenderWidgetHost::OnAcceleratedSurfaceSetIOSurface(
+ gfx::PluginWindowHandle window,
+ int32 width,
+ int32 height,
+ uint64 mach_port) {
if (view_) {
- view_->GPUPluginSetIOSurface(window, width, height, mach_port);
+ view_->AcceleratedSurfaceSetIOSurface(window, width, height, mach_port);
}
}
-void RenderWidgetHost::OnGPUPluginSetTransportDIB(
+void RenderWidgetHost::OnAcceleratedSurfaceSetTransportDIB(
gfx::PluginWindowHandle window,
int32 width,
int32 height,
TransportDIB::Handle transport_dib) {
if (view_) {
- view_->GPUPluginSetTransportDIB(window, width, height, transport_dib);
+ view_->AcceleratedSurfaceSetTransportDIB(window, width, height,
+ transport_dib);
}
}
-void RenderWidgetHost::OnGPUPluginBuffersSwapped(
+void RenderWidgetHost::OnAcceleratedSurfaceBuffersSwapped(
gfx::PluginWindowHandle window) {
if (view_) {
- view_->GPUPluginBuffersSwapped(window);
+ view_->AcceleratedSurfaceBuffersSwapped(window);
}
}
#endif
diff --git a/chrome/browser/renderer_host/render_widget_host.h b/chrome/browser/renderer_host/render_widget_host.h
index 235a6f4..35b7851 100644
--- a/chrome/browser/renderer_host/render_widget_host.h
+++ b/chrome/browser/renderer_host/render_widget_host.h
@@ -458,18 +458,17 @@ class RenderWidgetHost : public IPC::Channel::Listener,
WebKit::WebScreenInfo* results);
void OnMsgGetWindowRect(gfx::NativeViewId window_id, gfx::Rect* results);
void OnMsgGetRootWindowRect(gfx::NativeViewId window_id, gfx::Rect* results);
- // The following handlers are only used on 10.6 and later
void OnAllocateFakePluginWindowHandle(gfx::PluginWindowHandle* id);
void OnDestroyFakePluginWindowHandle(gfx::PluginWindowHandle id);
- void OnGPUPluginSetIOSurface(gfx::PluginWindowHandle window,
- int32 width,
- int32 height,
- uint64 mach_port);
- void OnGPUPluginSetTransportDIB(gfx::PluginWindowHandle window,
- int32 width,
- int32 height,
- TransportDIB::Handle transport_dib);
- void OnGPUPluginBuffersSwapped(gfx::PluginWindowHandle window);
+ void OnAcceleratedSurfaceSetIOSurface(gfx::PluginWindowHandle window,
+ int32 width,
+ int32 height,
+ uint64 mach_port);
+ void OnAcceleratedSurfaceSetTransportDIB(gfx::PluginWindowHandle window,
+ int32 width,
+ int32 height,
+ TransportDIB::Handle transport_dib);
+ void OnAcceleratedSurfaceBuffersSwapped(gfx::PluginWindowHandle window);
#endif
// Paints the given bitmap to the current backing store at the given location.
diff --git a/chrome/browser/renderer_host/render_widget_host_view.h b/chrome/browser/renderer_host/render_widget_host_view.h
index 339c6aa..b98351a 100644
--- a/chrome/browser/renderer_host/render_widget_host_view.h
+++ b/chrome/browser/renderer_host/render_widget_host_view.h
@@ -184,21 +184,24 @@ class RenderWidgetHostView {
// Informs the view that its containing window's frame changed.
virtual void WindowFrameChanged() = 0;
- // Methods associated with GPU plugin instances
+ // Methods associated with GPU-accelerated plug-in instances.
virtual gfx::PluginWindowHandle AllocateFakePluginWindowHandle() = 0;
virtual void DestroyFakePluginWindowHandle(
gfx::PluginWindowHandle window) = 0;
- virtual void GPUPluginSetIOSurface(gfx::PluginWindowHandle window,
- int32 width,
- int32 height,
- uint64 io_surface_identifier) = 0;
- virtual void GPUPluginSetTransportDIB(gfx::PluginWindowHandle window,
- int32 width,
- int32 height,
- TransportDIB::Handle transport_dib) = 0;
- virtual void GPUPluginBuffersSwapped(gfx::PluginWindowHandle window) = 0;
- // Draws the current GPU plugin instances into the given context.
- virtual void DrawGPUPluginInstances(CGLContextObj context) = 0;
+ virtual void AcceleratedSurfaceSetIOSurface(
+ gfx::PluginWindowHandle window,
+ int32 width,
+ int32 height,
+ uint64 io_surface_identifier) = 0;
+ virtual void AcceleratedSurfaceSetTransportDIB(
+ gfx::PluginWindowHandle window,
+ int32 width,
+ int32 height,
+ TransportDIB::Handle transport_dib) = 0;
+ virtual void AcceleratedSurfaceBuffersSwapped(
+ gfx::PluginWindowHandle window) = 0;
+ // Draws the current GPU-accelerated plug-in instances into the given context.
+ virtual void DrawAcceleratedSurfaceInstances(CGLContextObj context) = 0;
#endif
#if defined(OS_LINUX)
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.h b/chrome/browser/renderer_host/render_widget_host_view_mac.h
index 6433653..f95a418 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.h
@@ -13,7 +13,7 @@
#include "base/task.h"
#include "base/time.h"
#include "chrome/browser/cocoa/base_view.h"
-#include "chrome/browser/renderer_host/gpu_plugin_container_manager_mac.h"
+#include "chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h"
#include "chrome/browser/renderer_host/render_widget_host_view.h"
#include "webkit/glue/webcursor.h"
#include "webkit/glue/webmenuitem.h"
@@ -123,20 +123,21 @@ class RenderWidgetHostViewMac : public RenderWidgetHostView {
virtual void SetBackground(const SkBitmap& background);
virtual bool ContainsNativeView(gfx::NativeView native_view) const;
- // Methods associated with GPU plugin instances
+ // Methods associated with GPU-accelerated plug-in instances.
virtual gfx::PluginWindowHandle AllocateFakePluginWindowHandle();
virtual void DestroyFakePluginWindowHandle(gfx::PluginWindowHandle window);
- virtual void GPUPluginSetIOSurface(gfx::PluginWindowHandle window,
- int32 width,
- int32 height,
- uint64 io_surface_identifier);
- virtual void GPUPluginSetTransportDIB(gfx::PluginWindowHandle window,
- int32 width,
- int32 height,
- TransportDIB::Handle transport_dib);
- virtual void GPUPluginBuffersSwapped(gfx::PluginWindowHandle window);
- // Draws the current GPU plugin instances into the given context.
- virtual void DrawGPUPluginInstances(CGLContextObj context);
+ virtual void AcceleratedSurfaceSetIOSurface(gfx::PluginWindowHandle window,
+ int32 width,
+ int32 height,
+ uint64 io_surface_identifier);
+ virtual void AcceleratedSurfaceSetTransportDIB(
+ gfx::PluginWindowHandle window,
+ int32 width,
+ int32 height,
+ TransportDIB::Handle transport_dib);
+ virtual void AcceleratedSurfaceBuffersSwapped(gfx::PluginWindowHandle window);
+ // Draws the current GPU-accelerated plug-in instances into the given context.
+ virtual void DrawAcceleratedSurfaceInstances(CGLContextObj context);
virtual void SetVisuallyDeemphasized(bool deemphasized);
void KillSelf();
@@ -250,8 +251,8 @@ class RenderWidgetHostViewMac : public RenderWidgetHostView {
// Used for positioning a popup menu.
BaseView* parent_view_;
- // Helper class for managing instances of the GPU plugin.
- MacGPUPluginContainerManager plugin_container_manager_;
+ // Helper class for managing instances of accelerated plug-ins.
+ AcceleratedSurfaceContainerManagerMac plugin_container_manager_;
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
};
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
index 0d20f6b..40e9c66 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
@@ -59,8 +59,8 @@ const size_t kMaxTooltipLength = 1024;
// GPUPluginLayer --------------------------------------------------------------
-// This subclass of CAOpenGLLayer hosts the output of the GPU plugins
-// on the page.
+// This subclass of CAOpenGLLayer hosts the output of the GPU-accelerated
+// plugins on the page.
@interface GPUPluginLayer : CAOpenGLLayer {
RenderWidgetHostViewMac* renderWidgetHostView_; // weak
@@ -82,7 +82,7 @@ const size_t kMaxTooltipLength = 1024;
pixelFormat:(CGLPixelFormatObj)pixelFormat
forLayerTime:(CFTimeInterval)timeInterval
displayTime:(const CVTimeStamp *)timeStamp {
- renderWidgetHostView_->DrawGPUPluginInstances(glContext);
+ renderWidgetHostView_->DrawAcceleratedSurfaceInstances(glContext);
[super drawInCGLContext:glContext
pixelFormat:pixelFormat
forLayerTime:timeInterval
@@ -546,7 +546,7 @@ void RenderWidgetHostViewMac::DestroyFakePluginWindowHandle(
plugin_container_manager_.DestroyFakePluginWindowHandle(window);
}
-void RenderWidgetHostViewMac::GPUPluginSetIOSurface(
+void RenderWidgetHostViewMac::AcceleratedSurfaceSetIOSurface(
gfx::PluginWindowHandle window,
int32 width,
int32 height,
@@ -557,7 +557,7 @@ void RenderWidgetHostViewMac::GPUPluginSetIOSurface(
io_surface_identifier);
}
-void RenderWidgetHostViewMac::GPUPluginSetTransportDIB(
+void RenderWidgetHostViewMac::AcceleratedSurfaceSetTransportDIB(
gfx::PluginWindowHandle window,
int32 width,
int32 height,
@@ -568,12 +568,13 @@ void RenderWidgetHostViewMac::GPUPluginSetTransportDIB(
transport_dib);
}
-void RenderWidgetHostViewMac::GPUPluginBuffersSwapped(
+void RenderWidgetHostViewMac::AcceleratedSurfaceBuffersSwapped(
gfx::PluginWindowHandle window) {
[gpu_plugin_layer_.get() setNeedsDisplay];
}
-void RenderWidgetHostViewMac::DrawGPUPluginInstances(CGLContextObj context) {
+void RenderWidgetHostViewMac::DrawAcceleratedSurfaceInstances(
+ CGLContextObj context) {
CGLSetCurrentContext(context);
gfx::Rect rect = GetWindowRect();
glMatrixMode(GL_PROJECTION);
diff --git a/chrome/browser/renderer_host/test/test_render_view_host.cc b/chrome/browser/renderer_host/test/test_render_view_host.cc
index 1269c7b..275576c 100644
--- a/chrome/browser/renderer_host/test/test_render_view_host.cc
+++ b/chrome/browser/renderer_host/test/test_render_view_host.cc
@@ -107,25 +107,26 @@ void TestRenderWidgetHostView::DestroyFakePluginWindowHandle(
gfx::PluginWindowHandle window) {
}
-void TestRenderWidgetHostView::GPUPluginSetIOSurface(
+void TestRenderWidgetHostView::AcceleratedSurfaceSetIOSurface(
gfx::PluginWindowHandle window,
int32 width,
int32 height,
uint64 io_surface_identifier) {
}
-void TestRenderWidgetHostView::GPUPluginSetTransportDIB(
+void TestRenderWidgetHostView::AcceleratedSurfaceSetTransportDIB(
gfx::PluginWindowHandle window,
int32 width,
int32 height,
TransportDIB::Handle transport_dib) {
}
-void TestRenderWidgetHostView::GPUPluginBuffersSwapped(
+void TestRenderWidgetHostView::AcceleratedSurfaceBuffersSwapped(
gfx::PluginWindowHandle window) {
}
-void TestRenderWidgetHostView::DrawGPUPluginInstances(CGLContextObj context) {
+void TestRenderWidgetHostView::DrawAcceleratedSurfaceInstances(
+ CGLContextObj context) {
}
#endif
diff --git a/chrome/browser/renderer_host/test/test_render_view_host.h b/chrome/browser/renderer_host/test/test_render_view_host.h
index 2d8025b..3939ad9 100644
--- a/chrome/browser/renderer_host/test/test_render_view_host.h
+++ b/chrome/browser/renderer_host/test/test_render_view_host.h
@@ -82,16 +82,17 @@ class TestRenderWidgetHostView : public RenderWidgetHostView {
virtual void WindowFrameChanged() {}
virtual gfx::PluginWindowHandle AllocateFakePluginWindowHandle();
virtual void DestroyFakePluginWindowHandle(gfx::PluginWindowHandle window);
- virtual void GPUPluginSetIOSurface(gfx::PluginWindowHandle window,
- int32 width,
- int32 height,
- uint64 io_surface_identifier);
- virtual void GPUPluginSetTransportDIB(gfx::PluginWindowHandle window,
- int32 width,
- int32 height,
- TransportDIB::Handle transport_dib);
- virtual void GPUPluginBuffersSwapped(gfx::PluginWindowHandle window);
- virtual void DrawGPUPluginInstances(CGLContextObj context);
+ virtual void AcceleratedSurfaceSetIOSurface(gfx::PluginWindowHandle window,
+ int32 width,
+ int32 height,
+ uint64 io_surface_identifier);
+ virtual void AcceleratedSurfaceSetTransportDIB(
+ gfx::PluginWindowHandle window,
+ int32 width,
+ int32 height,
+ TransportDIB::Handle transport_dib);
+ virtual void AcceleratedSurfaceBuffersSwapped(gfx::PluginWindowHandle window);
+ virtual void DrawAcceleratedSurfaceInstances(CGLContextObj context);
#endif
virtual void SetVisuallyDeemphasized(bool deemphasized) { }
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 267f6ca..dd6524d 100755
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -1662,10 +1662,10 @@
'browser/renderer_host/global_request_id.h',
'browser/renderer_host/gpu_view_host.cc',
'browser/renderer_host/gpu_view_host.h',
- 'browser/renderer_host/gpu_plugin_container_mac.cc',
- 'browser/renderer_host/gpu_plugin_container_mac.h',
- 'browser/renderer_host/gpu_plugin_container_manager_mac.cc',
- 'browser/renderer_host/gpu_plugin_container_manager_mac.h',
+ 'browser/renderer_host/accelerated_surface_container_mac.cc',
+ 'browser/renderer_host/accelerated_surface_container_mac.h',
+ 'browser/renderer_host/accelerated_surface_container_manager_mac.cc',
+ 'browser/renderer_host/accelerated_surface_container_manager_mac.h',
'browser/renderer_host/gtk_im_context_wrapper.cc',
'browser/renderer_host/gtk_im_context_wrapper.h',
'browser/renderer_host/gtk_key_bindings_handler.cc',
diff --git a/chrome/common/plugin_messages_internal.h b/chrome/common/plugin_messages_internal.h
index 08e1aba..6fddb92 100644
--- a/chrome/common/plugin_messages_internal.h
+++ b/chrome/common/plugin_messages_internal.h
@@ -306,7 +306,7 @@ IPC_BEGIN_MESSAGES(Plugin)
// This message, used only on 10.6 and later, transmits the "fake"
// window handle allocated by the browser on behalf of the renderer
// to the GPU plugin.
- IPC_MESSAGE_ROUTED1(PluginMsg_SetFakeGPUPluginWindowHandle,
+ IPC_MESSAGE_ROUTED1(PluginMsg_SetFakeAcceleratedSurfaceWindowHandle,
gfx::PluginWindowHandle /* window */)
#endif
@@ -405,12 +405,11 @@ IPC_BEGIN_MESSAGES(PluginHost)
IPC_MESSAGE_ROUTED1(PluginHostMsg_UpdateGeometry_ACK,
int /* ack_key */)
- // This message, used in Mac OS X 10.5 and earlier, is sent from the
- // plug-in process to the renderer process to indicate that the GPU
- // plug-in allocated a new TransportDIB that holds the GPU's rendered
- // image. This information is then forwarded to the browser process via
- // a similar message.
- IPC_MESSAGE_ROUTED4(PluginHostMsg_GPUPluginSetTransportDIB,
+ // This message, used in Mac OS X 10.5 and earlier, is sent from the plug-in
+ // process to the renderer process to indicate that the plug-in allocated a
+ // new TransportDIB that holds the GPU's rendered image. This information is
+ // then forwarded to the browser process via a similar message.
+ IPC_MESSAGE_ROUTED4(PluginHostMsg_AcceleratedSurfaceSetTransportDIB,
gfx::PluginWindowHandle /* window */,
int32 /* width */,
int32 /* height */,
@@ -422,16 +421,15 @@ IPC_BEGIN_MESSAGES(PluginHost)
// the plug-in.
IPC_MESSAGE_ROUTED0(PluginHostMsg_BindFakePluginWindowHandle)
- // This message, used only on 10.6 and later, is sent from the
- // plug-in process to the renderer process to indicate that the GPU
- // plugin allocated a new IOSurface object of the given width and
- // height. This information is then forwarded on to the browser
- // process.
+ // This message, used only on 10.6 and later, is sent from the plug-in process
+ // to the renderer process to indicate that the plugin allocated a new
+ // IOSurface object of the given width and height. This information is then
+ // forwarded on to the browser process.
//
- // NOTE: the original intent was to pass a mach port as the
- // IOSurface identifier but it looks like that will be a lot of
- // work. For now we pass an ID from IOSurfaceGetID.
- IPC_MESSAGE_ROUTED4(PluginHostMsg_GPUPluginSetIOSurface,
+ // NOTE: the original intent was to pass a mach port as the IOSurface
+ // identifier but it looks like that will be a lot of work. For now we pass an
+ // ID from IOSurfaceGetID.
+ IPC_MESSAGE_ROUTED4(PluginHostMsg_AcceleratedSurfaceSetIOSurface,
gfx::PluginWindowHandle /* window */,
int32 /* width */,
int32 /* height */,
@@ -439,7 +437,7 @@ IPC_BEGIN_MESSAGES(PluginHost)
// On the Mac, shared memory can't be allocated in the sandbox, so
- // the TransportDIB used by the GPU process for rendering has to be allocated
+ // the TransportDIB used by the plug-in for rendering has to be allocated
// and managed by the browser. This is a synchronous message, use with care.
IPC_SYNC_MESSAGE_ROUTED1_1(PluginHostMsg_AllocTransportDIB,
size_t /* requested memory size */,
@@ -452,10 +450,10 @@ IPC_BEGIN_MESSAGES(PluginHost)
TransportDIB::Id /* DIB id */)
// This message notifies the renderer process (and from there the
- // browser process) that the GPU plugin swapped the buffers associated
+ // browser process) that the plug-in swapped the buffers associated
// with the given "window", which should cause the browser to redraw
- // the various GPU plugins' contents.
- IPC_MESSAGE_ROUTED1(PluginHostMsg_GPUPluginBuffersSwapped,
+ // the various plug-ins' contents.
+ IPC_MESSAGE_ROUTED1(PluginHostMsg_AcceleratedSurfaceBuffersSwapped,
gfx::PluginWindowHandle /* window */)
#endif
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index 6f9158a..c20fd88 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -1900,34 +1900,34 @@ IPC_BEGIN_MESSAGES(ViewHost)
gfx::PluginWindowHandle /* id */)
// This message, used on Mac OS X 10.5 and earlier (no IOSurface support),
- // is sent from the renderer to the browser on behalf of the GPU plugin
- // to indicate that a new backing store was allocated for that GPU plugin
+ // is sent from the renderer to the browser on behalf of the plug-in
+ // to indicate that a new backing store was allocated for that plug-in
// instance.
- IPC_MESSAGE_ROUTED4(ViewHostMsg_GPUPluginSetTransportDIB,
+ IPC_MESSAGE_ROUTED4(ViewHostMsg_AcceleratedSurfaceSetTransportDIB,
gfx::PluginWindowHandle /* window */,
int32 /* width */,
int32 /* height */,
TransportDIB::Handle /* handle for the DIB */)
// This message, used on Mac OS X 10.6 and later (where IOSurface is
- // supported), is sent from the renderer to the browser on behalf
- // of the GPU plugin to indicate that a new backing store was
- // allocated for that GPU plugin instance.
+ // supported), is sent from the renderer to the browser on behalf of the
+ // plug-in to indicate that a new backing store was allocated for that
+ // plug-in instance.
//
- // NOTE: the original intent was to pass a mach port as the
- // IOSurface identifier but it looks like that will be a lot of
- // work. For now we pass an ID from IOSurfaceGetID.
- IPC_MESSAGE_ROUTED4(ViewHostMsg_GPUPluginSetIOSurface,
+ // NOTE: the original intent was to pass a mach port as the IOSurface
+ // identifier but it looks like that will be a lot of work. For now we pass an
+ // ID from IOSurfaceGetID.
+ IPC_MESSAGE_ROUTED4(ViewHostMsg_AcceleratedSurfaceSetIOSurface,
gfx::PluginWindowHandle /* window */,
int32 /* width */,
int32 /* height */,
uint64 /* identifier for IOSurface */)
- // This message notifies the browser process that the GPU plugin
+ // This message notifies the browser process that the plug-in
// swapped the buffers associated with the given "window", which
- // should cause the browser to redraw the various GPU plugins'
+ // should cause the browser to redraw the various plug-ins'
// contents.
- IPC_MESSAGE_ROUTED1(ViewHostMsg_GPUPluginBuffersSwapped,
+ IPC_MESSAGE_ROUTED1(ViewHostMsg_AcceleratedSurfaceBuffersSwapped,
gfx::PluginWindowHandle /* window */)
#endif
diff --git a/chrome/plugin/command_buffer_stub.cc b/chrome/plugin/command_buffer_stub.cc
index 5ae203d..577bcfc 100644
--- a/chrome/plugin/command_buffer_stub.cc
+++ b/chrome/plugin/command_buffer_stub.cc
@@ -192,29 +192,31 @@ void CommandBufferStub::OnSetWindowSize(int32 width, int32 height) {
uint64 new_backing_store = processor_->SetWindowSizeForIOSurface(width,
height);
if (new_backing_store) {
- Send(new PluginHostMsg_GPUPluginSetIOSurface(plugin_host_route_id_,
- window_,
- width,
- height,
- new_backing_store));
+ Send(new PluginHostMsg_AcceleratedSurfaceSetIOSurface(
+ plugin_host_route_id_,
+ window_,
+ width,
+ height,
+ new_backing_store));
} else {
// If |new_backing_store| is 0, it might mean that the IOSurface APIs are
// not available. In this case, see if TransportDIBs are supported.
TransportDIB::Handle transport_dib =
processor_->SetWindowSizeForTransportDIB(width, height);
if (TransportDIB::is_valid(transport_dib)) {
- Send(new PluginHostMsg_GPUPluginSetTransportDIB(plugin_host_route_id_,
- window_,
- width,
- height,
- transport_dib));
+ Send(new PluginHostMsg_AcceleratedSurfaceSetTransportDIB(
+ plugin_host_route_id_,
+ window_,
+ width,
+ height,
+ transport_dib));
}
}
}
void CommandBufferStub::SwapBuffersCallback() {
- Send(new PluginHostMsg_GPUPluginBuffersSwapped(plugin_host_route_id_,
- window_));
+ Send(new PluginHostMsg_AcceleratedSurfaceBuffersSwapped(plugin_host_route_id_,
+ window_));
}
void CommandBufferStub::AllocTransportDIB(const size_t size,
diff --git a/chrome/plugin/webplugin_delegate_stub.cc b/chrome/plugin/webplugin_delegate_stub.cc
index e3d477e..dd3f6a0 100644
--- a/chrome/plugin/webplugin_delegate_stub.cc
+++ b/chrome/plugin/webplugin_delegate_stub.cc
@@ -143,8 +143,8 @@ void WebPluginDelegateStub::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(PluginMsg_DestroyCommandBuffer,
OnDestroyCommandBuffer)
#if defined(OS_MACOSX)
- IPC_MESSAGE_HANDLER(PluginMsg_SetFakeGPUPluginWindowHandle,
- OnSetFakeGPUPluginWindowHandle)
+ IPC_MESSAGE_HANDLER(PluginMsg_SetFakeAcceleratedSurfaceWindowHandle,
+ OnSetFakeAcceleratedSurfaceWindowHandle)
#endif
IPC_MESSAGE_UNHANDLED_ERROR()
IPC_END_MESSAGE_MAP()
@@ -460,7 +460,7 @@ void WebPluginDelegateStub::OnHTTPRangeRequestReply(
}
#if defined(OS_MACOSX)
-void WebPluginDelegateStub::OnSetFakeGPUPluginWindowHandle(
+void WebPluginDelegateStub::OnSetFakeAcceleratedSurfaceWindowHandle(
gfx::PluginWindowHandle window) {
delegate_->set_windowed_handle(window);
}
diff --git a/chrome/plugin/webplugin_delegate_stub.h b/chrome/plugin/webplugin_delegate_stub.h
index 64dea79d..ecc4b8f 100644
--- a/chrome/plugin/webplugin_delegate_stub.h
+++ b/chrome/plugin/webplugin_delegate_stub.h
@@ -122,10 +122,10 @@ class WebPluginDelegateStub : public IPC::Channel::Listener,
scoped_ptr<CommandBufferStub> command_buffer_stub_;
#if defined(OS_MACOSX)
- // If this is the GPU plugin, we need to be receive a fake window
- // handle which is used for subsequent communication back to the
+ // If this is a GPU-accelerated plug-in, we need to be able to receive a fake
+ // window handle which is used for subsequent communication back to the
// browser.
- void OnSetFakeGPUPluginWindowHandle(gfx::PluginWindowHandle window);
+ void OnSetFakeAcceleratedSurfaceWindowHandle(gfx::PluginWindowHandle window);
#endif
#endif
diff --git a/chrome/plugin/webplugin_proxy.cc b/chrome/plugin/webplugin_proxy.cc
index e7826fd..54eb549 100644
--- a/chrome/plugin/webplugin_proxy.cc
+++ b/chrome/plugin/webplugin_proxy.cc
@@ -584,7 +584,7 @@ void WebPluginProxy::BindFakePluginWindowHandle() {
void WebPluginProxy::AcceleratedFrameBuffersDidSwap(
gfx::PluginWindowHandle window) {
// TODO(pinkerton): Rename this message.
- Send(new PluginHostMsg_GPUPluginBuffersSwapped(route_id_, window));
+ Send(new PluginHostMsg_AcceleratedSurfaceBuffersSwapped(route_id_, window));
}
void WebPluginProxy::SetAcceleratedSurface(gfx::PluginWindowHandle window,
@@ -592,9 +592,8 @@ void WebPluginProxy::SetAcceleratedSurface(gfx::PluginWindowHandle window,
int32 height,
uint64 accelerated_surface_identifier) {
// TODO(pinkerton): Rename this message.
- Send(new PluginHostMsg_GPUPluginSetIOSurface(route_id_, window, width,
- height,
- accelerated_surface_identifier));
+ Send(new PluginHostMsg_AcceleratedSurfaceSetIOSurface(
+ route_id_, window, width, height, accelerated_surface_identifier));
}
#endif
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 12394b2..f726243 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -4615,23 +4615,25 @@ void RenderView::DestroyFakePluginWindowHandle(gfx::PluginWindowHandle window) {
Send(new ViewHostMsg_DestroyFakePluginWindowHandle(routing_id(), window));
}
-void RenderView::GPUPluginSetIOSurface(gfx::PluginWindowHandle window,
- int32 width,
- int32 height,
- uint64 io_surface_identifier) {
- Send(new ViewHostMsg_GPUPluginSetIOSurface(
+void RenderView::AcceleratedSurfaceSetIOSurface(gfx::PluginWindowHandle window,
+ int32 width,
+ int32 height,
+ uint64 io_surface_identifier) {
+ Send(new ViewHostMsg_AcceleratedSurfaceSetIOSurface(
routing_id(), window, width, height, io_surface_identifier));
}
-void RenderView::GPUPluginSetTransportDIB(gfx::PluginWindowHandle window,
- int32 width,
- int32 height,
- TransportDIB::Handle transport_dib) {
- Send(new ViewHostMsg_GPUPluginSetTransportDIB(
+void RenderView::AcceleratedSurfaceSetTransportDIB(
+ gfx::PluginWindowHandle window,
+ int32 width,
+ int32 height,
+ TransportDIB::Handle transport_dib) {
+ Send(new ViewHostMsg_AcceleratedSurfaceSetTransportDIB(
routing_id(), window, width, height, transport_dib));
}
-TransportDIB::Handle RenderView::GPUPluginAllocTransportDIB(size_t size) {
+TransportDIB::Handle RenderView::AcceleratedSurfaceAllocTransportDIB(
+ size_t size) {
TransportDIB::Handle dib_handle;
// Assume this is a synchronous RPC.
if (Send(new ViewHostMsg_AllocTransportDIB(size, &dib_handle)))
@@ -4640,12 +4642,13 @@ TransportDIB::Handle RenderView::GPUPluginAllocTransportDIB(size_t size) {
return TransportDIB::DefaultHandleValue();
}
-void RenderView::GPUPluginFreeTransportDIB(TransportDIB::Id dib_id) {
+void RenderView::AcceleratedSurfaceFreeTransportDIB(TransportDIB::Id dib_id) {
Send(new ViewHostMsg_FreeTransportDIB(dib_id));
}
-void RenderView::GPUPluginBuffersSwapped(gfx::PluginWindowHandle window) {
- Send(new ViewHostMsg_GPUPluginBuffersSwapped(routing_id(), window));
+void RenderView::AcceleratedSurfaceBuffersSwapped(
+ gfx::PluginWindowHandle window) {
+ Send(new ViewHostMsg_AcceleratedSurfaceBuffersSwapped(routing_id(), window));
}
#endif
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h
index d32ce57..0cfc4d1 100644
--- a/chrome/renderer/render_view.h
+++ b/chrome/renderer/render_view.h
@@ -483,17 +483,17 @@ class RenderView : public RenderWidget,
// WebPluginDelegateProxy, which has a pointer to the RenderView.
gfx::PluginWindowHandle AllocateFakePluginWindowHandle();
void DestroyFakePluginWindowHandle(gfx::PluginWindowHandle window);
- void GPUPluginSetIOSurface(gfx::PluginWindowHandle window,
- int32 width,
- int32 height,
- uint64 io_surface_identifier);
- TransportDIB::Handle GPUPluginAllocTransportDIB(size_t size);
- void GPUPluginFreeTransportDIB(TransportDIB::Id dib_id);
- void GPUPluginSetTransportDIB(gfx::PluginWindowHandle window,
- int32 width,
- int32 height,
- TransportDIB::Handle transport_dib);
- void GPUPluginBuffersSwapped(gfx::PluginWindowHandle window);
+ void AcceleratedSurfaceSetIOSurface(gfx::PluginWindowHandle window,
+ int32 width,
+ int32 height,
+ uint64 io_surface_identifier);
+ TransportDIB::Handle AcceleratedSurfaceAllocTransportDIB(size_t size);
+ void AcceleratedSurfaceFreeTransportDIB(TransportDIB::Id dib_id);
+ void AcceleratedSurfaceSetTransportDIB(gfx::PluginWindowHandle window,
+ int32 width,
+ int32 height,
+ TransportDIB::Handle transport_dib);
+ void AcceleratedSurfaceBuffersSwapped(gfx::PluginWindowHandle window);
#endif
protected:
diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc
index 532d26f..5c51b35 100644
--- a/chrome/renderer/webplugin_delegate_proxy.cc
+++ b/chrome/renderer/webplugin_delegate_proxy.cc
@@ -407,17 +407,17 @@ void WebPluginDelegateProxy::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(PluginHostMsg_UpdateGeometry_ACK,
OnUpdateGeometry_ACK)
// Used only on 10.6 and later.
- IPC_MESSAGE_HANDLER(PluginHostMsg_GPUPluginSetIOSurface,
- OnGPUPluginSetIOSurface)
+ IPC_MESSAGE_HANDLER(PluginHostMsg_AcceleratedSurfaceSetIOSurface,
+ OnAcceleratedSurfaceSetIOSurface)
// Used on 10.5 and earlier.
- IPC_MESSAGE_HANDLER(PluginHostMsg_GPUPluginSetTransportDIB,
- OnGPUPluginSetTransportDIB)
+ IPC_MESSAGE_HANDLER(PluginHostMsg_AcceleratedSurfaceSetTransportDIB,
+ OnAcceleratedSurfaceSetTransportDIB)
IPC_MESSAGE_HANDLER(PluginHostMsg_AllocTransportDIB,
- OnGPUPluginAllocTransportDIB)
+ OnAcceleratedSurfaceAllocTransportDIB)
IPC_MESSAGE_HANDLER(PluginHostMsg_FreeTransportDIB,
- OnGPUPluginFreeTransportDIB)
- IPC_MESSAGE_HANDLER(PluginHostMsg_GPUPluginBuffersSwapped,
- OnGPUPluginBuffersSwapped)
+ OnAcceleratedSurfaceFreeTransportDIB)
+ IPC_MESSAGE_HANDLER(PluginHostMsg_AcceleratedSurfaceBuffersSwapped,
+ OnAcceleratedSurfaceBuffersSwapped)
#endif
IPC_MESSAGE_UNHANDLED_ERROR()
@@ -1275,8 +1275,8 @@ bool WebPluginDelegateProxy::BindFakePluginWindowHandle() {
if (!fake_window)
return false;
OnSetWindow(fake_window);
- if (!Send(new PluginMsg_SetFakeGPUPluginWindowHandle(instance_id_,
- fake_window))) {
+ if (!Send(new PluginMsg_SetFakeAcceleratedSurfaceWindowHandle(instance_id_,
+ fake_window))) {
return false;
}
@@ -1367,44 +1367,44 @@ void WebPluginDelegateProxy::OnUpdateGeometry_ACK(int ack_key) {
old_transport_dibs_.erase(iterator);
}
-void WebPluginDelegateProxy::OnGPUPluginSetIOSurface(
+void WebPluginDelegateProxy::OnAcceleratedSurfaceSetIOSurface(
gfx::PluginWindowHandle window,
int32 width,
int32 height,
uint64 io_surface_identifier) {
if (render_view_)
- render_view_->GPUPluginSetIOSurface(window, width, height,
- io_surface_identifier);
+ render_view_->AcceleratedSurfaceSetIOSurface(window, width, height,
+ io_surface_identifier);
}
-void WebPluginDelegateProxy::OnGPUPluginSetTransportDIB(
+void WebPluginDelegateProxy::OnAcceleratedSurfaceSetTransportDIB(
gfx::PluginWindowHandle window,
int32 width,
int32 height,
TransportDIB::Handle transport_dib) {
if (render_view_)
- render_view_->GPUPluginSetTransportDIB(window, width, height,
- transport_dib);
+ render_view_->AcceleratedSurfaceSetTransportDIB(window, width, height,
+ transport_dib);
}
-void WebPluginDelegateProxy::OnGPUPluginAllocTransportDIB(
+void WebPluginDelegateProxy::OnAcceleratedSurfaceAllocTransportDIB(
size_t size,
TransportDIB::Handle* dib_handle) {
if (render_view_)
- *dib_handle = render_view_->GPUPluginAllocTransportDIB(size);
+ *dib_handle = render_view_->AcceleratedSurfaceAllocTransportDIB(size);
else
*dib_handle = TransportDIB::DefaultHandleValue();
}
-void WebPluginDelegateProxy::OnGPUPluginFreeTransportDIB(
+void WebPluginDelegateProxy::OnAcceleratedSurfaceFreeTransportDIB(
TransportDIB::Id dib_id) {
if (render_view_)
- render_view_->GPUPluginFreeTransportDIB(dib_id);
+ render_view_->AcceleratedSurfaceFreeTransportDIB(dib_id);
}
-void WebPluginDelegateProxy::OnGPUPluginBuffersSwapped(
+void WebPluginDelegateProxy::OnAcceleratedSurfaceBuffersSwapped(
gfx::PluginWindowHandle window) {
if (render_view_)
- render_view_->GPUPluginBuffersSwapped(window);
+ render_view_->AcceleratedSurfaceBuffersSwapped(window);
}
#endif
diff --git a/chrome/renderer/webplugin_delegate_proxy.h b/chrome/renderer/webplugin_delegate_proxy.h
index cdeb62a..71b7b6f 100644
--- a/chrome/renderer/webplugin_delegate_proxy.h
+++ b/chrome/renderer/webplugin_delegate_proxy.h
@@ -151,18 +151,18 @@ class WebPluginDelegateProxy
#if defined(OS_MACOSX)
void OnBindFakePluginWindowHandle();
void OnUpdateGeometry_ACK(int ack_key);
- void OnGPUPluginSetIOSurface(gfx::PluginWindowHandle window,
- int32 width,
- int32 height,
- uint64 io_surface_identifier);
- void OnGPUPluginSetTransportDIB(gfx::PluginWindowHandle window,
- int32 width,
- int32 height,
- TransportDIB::Handle transport_dib);
- void OnGPUPluginAllocTransportDIB(size_t size,
- TransportDIB::Handle* dib_handle);
- void OnGPUPluginFreeTransportDIB(TransportDIB::Id dib_id);
- void OnGPUPluginBuffersSwapped(gfx::PluginWindowHandle window);
+ void OnAcceleratedSurfaceSetIOSurface(gfx::PluginWindowHandle window,
+ int32 width,
+ int32 height,
+ uint64 io_surface_identifier);
+ void OnAcceleratedSurfaceSetTransportDIB(gfx::PluginWindowHandle window,
+ int32 width,
+ int32 height,
+ TransportDIB::Handle transport_dib);
+ void OnAcceleratedSurfaceAllocTransportDIB(size_t size,
+ TransportDIB::Handle* dib_handle);
+ void OnAcceleratedSurfaceFreeTransportDIB(TransportDIB::Id dib_id);
+ void OnAcceleratedSurfaceBuffersSwapped(gfx::PluginWindowHandle window);
#endif
// Draw a graphic indicating a crashed plugin.