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

Side by Side Diff: content/plugin/webplugin_proxy.h

Issue 8678037: Render Core Animation plugins through WebKit's compositor rather than (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_ 5 #ifndef CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_
6 #define CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_ 6 #define CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 virtual bool IsOffTheRecord() OVERRIDE; 129 virtual bool IsOffTheRecord() OVERRIDE;
130 virtual void ResourceClientDeleted( 130 virtual void ResourceClientDeleted(
131 webkit::npapi::WebPluginResourceClient* resource_client) OVERRIDE; 131 webkit::npapi::WebPluginResourceClient* resource_client) OVERRIDE;
132 gfx::NativeViewId containing_window() { return containing_window_; } 132 gfx::NativeViewId containing_window() { return containing_window_; }
133 133
134 #if defined(OS_MACOSX) 134 #if defined(OS_MACOSX)
135 virtual void FocusChanged(bool focused) OVERRIDE; 135 virtual void FocusChanged(bool focused) OVERRIDE;
136 136
137 virtual void StartIme() OVERRIDE; 137 virtual void StartIme() OVERRIDE;
138 138
139 virtual void BindFakePluginWindowHandle(bool opaque) OVERRIDE;
140
141 virtual webkit::npapi::WebPluginAcceleratedSurface* 139 virtual webkit::npapi::WebPluginAcceleratedSurface*
142 GetAcceleratedSurface(gfx::GpuPreference gpu_preference) OVERRIDE; 140 GetAcceleratedSurface(gfx::GpuPreference gpu_preference) OVERRIDE;
143 141
142 //----------------------------------------------------------------------
143 // Legacy Core Animation plugin implementation rendering directly to screen.
144
145 virtual void BindFakePluginWindowHandle(bool opaque) OVERRIDE;
146
144 // Tell the browser (via the renderer) to invalidate because the 147 // Tell the browser (via the renderer) to invalidate because the
145 // accelerated buffers have changed. 148 // accelerated buffers have changed.
146 virtual void AcceleratedFrameBuffersDidSwap( 149 virtual void AcceleratedFrameBuffersDidSwap(
147 gfx::PluginWindowHandle window, uint64 surface_id); 150 gfx::PluginWindowHandle window, uint64 surface_id);
148 151
149 // Tell the renderer and browser to associate the given plugin handle with 152 // Tell the renderer and browser to associate the given plugin handle with
150 // |accelerated_surface_identifier|. The geometry is used to resize any 153 // |accelerated_surface_identifier|. The geometry is used to resize any
151 // native "window" (which on the Mac is a just a view). 154 // native "window" (which on the Mac is a just a view).
152 // This method is used when IOSurface support is available. 155 // This method is used when IOSurface support is available.
153 virtual void SetAcceleratedSurface(gfx::PluginWindowHandle window, 156 virtual void SetAcceleratedSurface(gfx::PluginWindowHandle window,
154 const gfx::Size& size, 157 const gfx::Size& size,
155 uint64 accelerated_surface_identifier); 158 uint64 accelerated_surface_identifier);
156 159
157 // Tell the renderer and browser to associate the given plugin handle with 160 // Tell the renderer and browser to associate the given plugin handle with
158 // |dib_handle|. The geometry is used to resize any native "window" (which 161 // |dib_handle|. The geometry is used to resize any native "window" (which
159 // on the Mac is just a view). 162 // on the Mac is just a view).
160 // This method is used when IOSurface support is not available. 163 // This method is used when IOSurface support is not available.
161 virtual void SetAcceleratedDIB( 164 virtual void SetAcceleratedDIB(
162 gfx::PluginWindowHandle window, 165 gfx::PluginWindowHandle window,
163 const gfx::Size& size, 166 const gfx::Size& size,
164 const TransportDIB::Handle& dib_handle); 167 const TransportDIB::Handle& dib_handle);
165 168
166 // Create/destroy TranportDIBs via messages to the browser process. 169 // Create/destroy TranportDIBs via messages to the browser process.
167 // These are only used when IOSurface support is not available. 170 // These are only used when IOSurface support is not available.
168 virtual void AllocSurfaceDIB(const size_t size, 171 virtual void AllocSurfaceDIB(const size_t size,
169 TransportDIB::Handle* dib_handle); 172 TransportDIB::Handle* dib_handle);
170 virtual void FreeSurfaceDIB(TransportDIB::Id dib_id); 173 virtual void FreeSurfaceDIB(TransportDIB::Id dib_id);
174
175 //----------------------------------------------------------------------
176 // New accelerated plugin implementation which renders via the compositor.
177
178 // Tells the renderer, and from there the GPU process, that the plugin
179 // is using accelerated rather than software rendering.
180 virtual void AcceleratedPluginEnabledRendering();
181
182 // Tells the renderer, and from there the GPU process, that the plugin
183 // allocated the given IOSurface to be used as its backing store.
184 virtual void AcceleratedPluginAllocatedIOSurface(int32 width,
185 int32 height,
186 uint32 surface_id);
187 virtual void AcceleratedPluginSwappedIOSurface();
171 #endif 188 #endif
172 189
173 virtual void URLRedirectResponse(bool allow, int resource_id) OVERRIDE; 190 virtual void URLRedirectResponse(bool allow, int resource_id) OVERRIDE;
174 191
175 #if defined(OS_WIN) && !defined(USE_AURA) 192 #if defined(OS_WIN) && !defined(USE_AURA)
176 // Retrieves the IME status from a windowless plug-in and sends it to a 193 // Retrieves the IME status from a windowless plug-in and sends it to a
177 // renderer process. A renderer process will convert the coordinates from 194 // renderer process. A renderer process will convert the coordinates from
178 // local to the window coordinates and send the converted coordinates to a 195 // local to the window coordinates and send the converted coordinates to a
179 // browser process. 196 // browser process.
180 void UpdateIMEStatus(); 197 void UpdateIMEStatus();
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 292
276 #endif 293 #endif
277 294
278 // Contains the routing id of the host render view. 295 // Contains the routing id of the host render view.
279 int host_render_view_routing_id_; 296 int host_render_view_routing_id_;
280 297
281 base::WeakPtrFactory<WebPluginProxy> weak_factory_; 298 base::WeakPtrFactory<WebPluginProxy> weak_factory_;
282 }; 299 };
283 300
284 #endif // CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_ 301 #endif // CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698