| Index: webkit/plugins/ppapi/ppb_graphics_3d_impl.cc
|
| ===================================================================
|
| --- webkit/plugins/ppapi/ppb_graphics_3d_impl.cc (revision 69511)
|
| +++ webkit/plugins/ppapi/ppb_graphics_3d_impl.cc (working copy)
|
| @@ -97,10 +97,10 @@
|
| return current_context ? current_context->GetReference() : 0;
|
| }
|
|
|
| -PP_Bool SwapBuffers(PP_Resource graphics3d, PP_CompletionCallback callback) {
|
| +PP_Bool SwapBuffers(PP_Resource graphics3d) {
|
| scoped_refptr<PPB_Graphics3D_Impl> context(
|
| Resource::GetAs<PPB_Graphics3D_Impl>(graphics3d));
|
| - return BoolToPPBool(context && context->SwapBuffers(callback));
|
| + return BoolToPPBool(context && context->SwapBuffers());
|
| }
|
|
|
| uint32_t GetError() {
|
| @@ -132,9 +132,7 @@
|
|
|
| PPB_Graphics3D_Impl::PPB_Graphics3D_Impl(PluginModule* module)
|
| : Resource(module),
|
| - bound_instance_(NULL),
|
| - swap_initiated_(false),
|
| - swap_callback_(PP_BlockUntilComplete()) {
|
| + bound_instance_(NULL) {
|
| }
|
|
|
| const PPB_Graphics3D_Dev* PPB_Graphics3D_Impl::GetInterface() {
|
| @@ -215,16 +213,10 @@
|
| return true;
|
| }
|
|
|
| -bool PPB_Graphics3D_Impl::SwapBuffers(PP_CompletionCallback callback) {
|
| +bool PPB_Graphics3D_Impl::SwapBuffers() {
|
| if (!platform_context_.get())
|
| return false;
|
|
|
| - if (swap_callback_.func) {
|
| - // Already a pending SwapBuffers that hasn't returned yet.
|
| - return false;
|
| - }
|
| -
|
| - swap_callback_ = callback;
|
| return platform_context_->SwapBuffers();
|
| }
|
|
|
| @@ -249,26 +241,6 @@
|
| platform_context_->SetSwapBuffersCallback(callback);
|
| }
|
|
|
| -void PPB_Graphics3D_Impl::ViewInitiatedPaint() {
|
| - if (swap_callback_.func) {
|
| - swap_initiated_ = true;
|
| - }
|
| -}
|
| -
|
| -void PPB_Graphics3D_Impl::ViewFlushedPaint() {
|
| - // Notify any "painted" callback. See |unpainted_flush_callback_| in the
|
| - // header for more.
|
| - if (swap_initiated_ && swap_callback_.func) {
|
| - // We must clear swap_callback_ before issuing the callback. It will be
|
| - // common for the plugin to issue another SwapBuffers in response to the
|
| - // callback, and we don't want to think that a callback is already pending.
|
| - PP_CompletionCallback callback = PP_BlockUntilComplete();
|
| - std::swap(callback, swap_callback_);
|
| - swap_initiated_ = false;
|
| - PP_RunCompletionCallback(&callback, PP_OK);
|
| - }
|
| -}
|
| -
|
| unsigned PPB_Graphics3D_Impl::GetBackingTextureId() {
|
| if (!platform_context_.get())
|
| return 0;
|
|
|