summaryrefslogtreecommitdiffstats
path: root/third_party/npapi
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 /third_party/npapi
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 'third_party/npapi')
-rw-r--r--third_party/npapi/bindings/npapi_extensions.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/third_party/npapi/bindings/npapi_extensions.h b/third_party/npapi/bindings/npapi_extensions.h
index b80e0bd..4bfac2c 100644
--- a/third_party/npapi/bindings/npapi_extensions.h
+++ b/third_party/npapi/bindings/npapi_extensions.h
@@ -299,6 +299,16 @@ typedef struct _NPDeviceContext3D
{
void* reserved;
+ // If true, then a flush will only complete once the get offset has advanced
+ // on the GPU thread. If false, then the get offset might have changed but
+ // the GPU thread will respond as quickly as possible without guaranteeing
+ // having made any progress in executing pending commands. Set to true
+ // to ensure that progress is made or when flushing in a loop waiting for the
+ // GPU to reach a certain state, for example in advancing beyond a particular
+ // token. Set to false when flushing to query the current state, for example
+ // whether an error has occurred.
+ bool waitForProgress;
+
// Buffer in which commands are stored.
void* commandBuffer;
int32 commandBufferSize;