diff options
Diffstat (limited to 'webkit/tools/pepper_test_plugin/plugin_object.cc')
-rw-r--r-- | webkit/tools/pepper_test_plugin/plugin_object.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/webkit/tools/pepper_test_plugin/plugin_object.cc b/webkit/tools/pepper_test_plugin/plugin_object.cc index 6880099..4c1b2a6 100644 --- a/webkit/tools/pepper_test_plugin/plugin_object.cc +++ b/webkit/tools/pepper_test_plugin/plugin_object.cc @@ -438,6 +438,14 @@ void PluginObject::Destroy3D() { #endif // INDEPENDENT_PLUGIN } +namespace { +void AsyncFlushCallback(NPP npp, + NPDeviceContext* context, + NPError error, + void* user_data) { +} +} + void PluginObject::Draw3D() { #if !defined(INDEPENDENT_PLUGIN) if (!pglMakeCurrent(pgl_context_) && pglGetError() == PGL_CONTEXT_LOST) { @@ -451,6 +459,18 @@ void PluginObject::Draw3D() { pglSwapBuffers(); pglMakeCurrent(NULL); + // Async flushes just to see them working. + context3d_.waitForProgress = true; + device3d_->flushContext(npp_, + &context3d_, + AsyncFlushCallback, + reinterpret_cast<void*>(0x3D1)); + context3d_.waitForProgress = false; + device3d_->flushContext(npp_, + &context3d_, + AsyncFlushCallback, + reinterpret_cast<void*>(0x3D2)); + // Schedule another call to Draw. browser->pluginthreadasynccall(npp_, Draw3DCallback, this); #endif // INDEPENDENT_PLUGIN |