summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/webplugin_delegate_pepper.h
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-09 23:28:43 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-09 23:28:43 +0000
commitcd189bdbe4ad339765549b41530b59c51973d2cf (patch)
treeebb322b7c0004526cf77f0ac44df5734015e9cab /chrome/renderer/webplugin_delegate_pepper.h
parentd1015f1c5bc276109b62280694ec180e62ae909f (diff)
downloadchromium_src-cd189bdbe4ad339765549b41530b59c51973d2cf.zip
chromium_src-cd189bdbe4ad339765549b41530b59c51973d2cf.tar.gz
chromium_src-cd189bdbe4ad339765549b41530b59c51973d2cf.tar.bz2
Implemented async flushes for Pepper 3D.
Added waitForProgress field to NPDeviceContext3D to select between a flush (that pushes more work to the GPU process and waits for at least some of it to have been completed) and getting the current state as quickly as possible. The previous method of checking to see if the put offset had advanced was incorrect. TEST=trybots BUG=none Review URL: http://codereview.chromium.org/561058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38540 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/webplugin_delegate_pepper.h')
-rw-r--r--chrome/renderer/webplugin_delegate_pepper.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/chrome/renderer/webplugin_delegate_pepper.h b/chrome/renderer/webplugin_delegate_pepper.h
index 3c203e6..5082d64 100644
--- a/chrome/renderer/webplugin_delegate_pepper.h
+++ b/chrome/renderer/webplugin_delegate_pepper.h
@@ -166,6 +166,13 @@ class WebPluginDelegatePepper : public webkit_glue::WebPluginDelegate {
// Synchronize a 3D context state with the service.
void Synchronize3DContext(NPDeviceContext3D* context,
gpu::CommandBuffer::State state);
+
+ // Synchronize the 3D context state with the proxy and invoke the async
+ // flush callback.
+ void Device3DUpdateState(NPP npp,
+ NPDeviceContext3D* context,
+ NPDeviceFlushContextCallbackPtr callback,
+ void* user_data);
#endif
base::WeakPtr<RenderView> render_view_;
@@ -188,9 +195,11 @@ class WebPluginDelegatePepper : public webkit_glue::WebPluginDelegate {
// The url with which the plugin was instantiated.
std::string plugin_url_;
- // The nested GPU plugin and its command buffer proxy.
+ // The nested GPU plugin.
WebPluginDelegateProxy* nested_delegate_;
+
#if defined(ENABLE_GPU)
+ // The command buffer used to issue commands to the nested GPU plugin.
scoped_ptr<CommandBufferProxy> command_buffer_;
#endif
@@ -199,10 +208,8 @@ class WebPluginDelegatePepper : public webkit_glue::WebPluginDelegate {
void SendNestedDelegateGeometryToBrowser(const gfx::Rect& window_rect,
const gfx::Rect& clip_rect);
- // Used to track whether additional commands have been put in the command
- // buffer since the last flush.
- int32 last_command_buffer_put_offset_;
-
+ // Runnable methods that must be cancelled when the 3D context is destroyed.
+ ScopedRunnableMethodFactory<WebPluginDelegatePepper> method_factory3d_;
DISALLOW_COPY_AND_ASSIGN(WebPluginDelegatePepper);
};