diff options
author | piman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-05 01:18:59 +0000 |
---|---|---|
committer | piman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-05 01:18:59 +0000 |
commit | cad37d275799e1d4761c5f192b134249c34a1c77 (patch) | |
tree | 9d441b1d79ea503563f8607f03d0692da566860a /ppapi/cpp | |
parent | 783ffc7355af267f7dd6881f9f2436fbcd95b2a1 (diff) | |
download | chromium_src-cad37d275799e1d4761c5f192b134249c34a1c77.zip chromium_src-cad37d275799e1d4761c5f192b134249c34a1c77.tar.gz chromium_src-cad37d275799e1d4761c5f192b134249c34a1c77.tar.bz2 |
Make Graphics3D::SwapBuffers take a completion callback
BUG=none
TEST=with demo_simple_vertex_shader, rate control works
Review URL: http://codereview.chromium.org/5944001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70474 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp')
-rw-r--r-- | ppapi/cpp/dev/surface_3d_dev.cc | 4 | ||||
-rw-r--r-- | ppapi/cpp/dev/surface_3d_dev.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ppapi/cpp/dev/surface_3d_dev.cc b/ppapi/cpp/dev/surface_3d_dev.cc index a222683..eab8149 100644 --- a/ppapi/cpp/dev/surface_3d_dev.cc +++ b/ppapi/cpp/dev/surface_3d_dev.cc @@ -38,13 +38,13 @@ Surface3D_Dev::Surface3D_Dev(const Instance& instance, } } -int32_t Surface3D_Dev::SwapBuffers() const { +int32_t Surface3D_Dev::SwapBuffers(const CompletionCallback& cc) const { if (!has_interface<PPB_Surface3D_Dev>()) return PP_ERROR_NOINTERFACE; return get_interface<PPB_Surface3D_Dev>()->SwapBuffers( pp_resource(), - PP_BlockUntilComplete()); + cc.pp_completion_callback()); } } // namespace pp diff --git a/ppapi/cpp/dev/surface_3d_dev.h b/ppapi/cpp/dev/surface_3d_dev.h index ff7c809..450ce41 100644 --- a/ppapi/cpp/dev/surface_3d_dev.h +++ b/ppapi/cpp/dev/surface_3d_dev.h @@ -7,6 +7,7 @@ #include "ppapi/c/dev/ppb_surface_3d_dev.h" +#include "ppapi/cpp/completion_callback.h" #include "ppapi/cpp/instance.h" #include "ppapi/cpp/resource.h" @@ -23,8 +24,7 @@ class Surface3D_Dev : public Resource { PP_Config3D_Dev config, const int32_t* attrib_list); - // TODO(alokp): Add completion callback. - int32_t SwapBuffers() const; + int32_t SwapBuffers(const CompletionCallback& cc) const; protected: explicit Surface3D_Dev(PP_Resource resource_id) : Resource(resource_id) {} |