Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Unified Diff: ppapi/shared_impl/ppb_graphics_3d_shared.cc

Issue 10081020: PPAPI: Make blocking completion callbacks work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned up for review. Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 c5397040497157a8d6c9176edec5d39a65c1d882..e6c552991085e020bc14fdb6b50a6492747c97ba 100644
--- a/ppapi/shared_impl/ppb_graphics_3d_shared.cc
+++ b/ppapi/shared_impl/ppb_graphics_3d_shared.cc
@@ -55,19 +55,13 @@ 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(ApiCallbackType 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();
}

Powered by Google App Engine
This is Rietveld 408576698