Index: ppapi/shared_impl/ppb_graphics_3d_shared.cc |
diff --git a/ppapi/shared_impl/ppb_graphics_3d_shared.cc b/ppapi/shared_impl/ppb_graphics_3d_shared.cc |
index 3a562f4392e3b6d05c792be89cdfc0a16ff3d377..29a33391a1b75acdb744b6e91199f34b762595ba 100644 |
--- a/ppapi/shared_impl/ppb_graphics_3d_shared.cc |
+++ b/ppapi/shared_impl/ppb_graphics_3d_shared.cc |
@@ -55,19 +55,14 @@ int32_t PPB_Graphics3D_Shared::ResizeBuffers(int32_t width, int32_t height) { |
return PP_OK; |
} |
-int32_t PPB_Graphics3D_Shared::SwapBuffers(PP_CompletionCallback callback) { |
- if (!callback.func) { |
- // Blocking SwapBuffers isn't supported (since we have to be on the main |
- // thread). |
- return PP_ERROR_BADARGUMENT; |
- } |
- |
+int32_t PPB_Graphics3D_Shared::SwapBuffers( |
+ scoped_refptr<TrackedCallback> callback) { |
if (HasPendingSwap()) { |
// Already a pending SwapBuffers that hasn't returned yet. |
return PP_ERROR_INPROGRESS; |
} |
- swap_callback_ = new TrackedCallback(this, callback); |
+ swap_callback_ = callback; |
return DoSwapBuffers(); |
} |