summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/render_widget_host_view_mac.h
diff options
context:
space:
mode:
authorkbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-03 02:28:48 +0000
committerkbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-03 02:28:48 +0000
commit43f28f83bc268dea720843a2616058b64b3e8810 (patch)
tree3c3c4fc9c43dad15246fae82cb5b965e6b217281 /chrome/browser/renderer_host/render_widget_host_view_mac.h
parent2d48004e1f2c8cecd015144c179f993d883aba9c (diff)
downloadchromium_src-43f28f83bc268dea720843a2616058b64b3e8810.zip
chromium_src-43f28f83bc268dea720843a2616058b64b3e8810.tar.gz
chromium_src-43f28f83bc268dea720843a2616058b64b3e8810.tar.bz2
[GPU] Get GPU process running on the mac
Initial port of GPU process / plugin to Mac OS X. Uses new IOSurface APIs and therefore currently runs only on 10.6. Alternate strategy will need to be devised for 10.5. Slight UI issues remain such as GPU plugins initially showing up in the wrong place on the page. These will be fixed in follow-on bugs. Minimal changes made to command buffer code to get it to compile on Mac OS X. Commented out use of nested anonymous namespaces in gles2_cmd_decoder.cc which were causing the linker to crash with a seg fault. Refactored gyp files so the OS test enabling the GPU plugin is in one place, common.gypi, and other files test only the variable enable_gpu. Slight change to gles2_demo_cc.cc to add some simple animation to verify that updates from the GPU plugin are reaching the screen. Changed Pepper test plugin to use 3D view by default and commented out use of audio context because of recent issues. TEST=none (ran Pepper Test Plugin with 3D view enabled) BUG=http://crbug.com/25988 Review URL: http://codereview.chromium.org/558035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37934 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/render_widget_host_view_mac.h')
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_mac.h19
1 files changed, 19 insertions, 0 deletions
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 4edfa1ef..c9834bf 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
#import <Cocoa/Cocoa.h>
+#import <QuartzCore/CALayer.h>
#include "base/scoped_nsobject.h"
#include "base/scoped_ptr.h"
@@ -15,6 +16,7 @@
#include "chrome/browser/renderer_host/render_widget_host_view.h"
#include "webkit/glue/webcursor.h"
#include "webkit/glue/webmenuitem.h"
+#include "webkit/glue/plugins/mac_gpu_plugin_container_manager.h"
class RenderWidgetHostViewMac;
class RWHVMEditCommandHelper;
@@ -112,6 +114,17 @@ class RenderWidgetHostViewMac : public RenderWidgetHostView {
virtual void SetWindowVisibility(bool visible);
virtual void SetBackground(const SkBitmap& background);
+ // Methods associated with GPU plugin 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 GPUPluginBuffersSwapped(gfx::PluginWindowHandle window);
+ // Draws the current GPU plugin instances into the given context.
+ virtual void DrawGPUPluginInstances(CGLContextObj context);
+
void KillSelf();
void set_parent_view(BaseView* parent_view) { parent_view_ = parent_view; }
@@ -181,6 +194,9 @@ class RenderWidgetHostViewMac : public RenderWidgetHostView {
// methods needs it.
NSRect im_caret_rect_;
+ // The Core Animation layer, if any, hosting the GPU plugins' output.
+ scoped_nsobject<CALayer> gpu_plugin_layer_;
+
private:
// Updates the display cursor to the current cursor if the cursor is over this
// render view.
@@ -220,6 +236,9 @@ 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_;
+
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
};