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

Side by Side Diff: ppapi/cpp/dev/surface_3d_dev.cc

Issue 5944001: Make Graphics3D::SwapBuffers take a completion callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update to Alok's Context3D/Surface3D changes Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/cpp/dev/surface_3d_dev.h ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/cpp/dev/surface_3d_dev.h" 5 #include "ppapi/cpp/dev/surface_3d_dev.h"
6 6
7 #include "ppapi/c/pp_completion_callback.h" 7 #include "ppapi/c/pp_completion_callback.h"
8 #include "ppapi/c/pp_errors.h" 8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/cpp/instance.h" 9 #include "ppapi/cpp/instance.h"
10 #include "ppapi/cpp/module_impl.h" 10 #include "ppapi/cpp/module_impl.h"
(...skipping 20 matching lines...) Expand all
31 PP_Config3D_Dev config, 31 PP_Config3D_Dev config,
32 const int32_t* attrib_list) { 32 const int32_t* attrib_list) {
33 if (has_interface<PPB_Surface3D_Dev>()) { 33 if (has_interface<PPB_Surface3D_Dev>()) {
34 PassRefFromConstructor(get_interface<PPB_Surface3D_Dev>()->Create( 34 PassRefFromConstructor(get_interface<PPB_Surface3D_Dev>()->Create(
35 instance.pp_instance(), 35 instance.pp_instance(),
36 config, 36 config,
37 attrib_list)); 37 attrib_list));
38 } 38 }
39 } 39 }
40 40
41 int32_t Surface3D_Dev::SwapBuffers() const { 41 int32_t Surface3D_Dev::SwapBuffers(const CompletionCallback& cc) const {
42 if (!has_interface<PPB_Surface3D_Dev>()) 42 if (!has_interface<PPB_Surface3D_Dev>())
43 return PP_ERROR_NOINTERFACE; 43 return PP_ERROR_NOINTERFACE;
44 44
45 return get_interface<PPB_Surface3D_Dev>()->SwapBuffers( 45 return get_interface<PPB_Surface3D_Dev>()->SwapBuffers(
46 pp_resource(), 46 pp_resource(),
47 PP_BlockUntilComplete()); 47 cc.pp_completion_callback());
48 } 48 }
49 49
50 } // namespace pp 50 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/surface_3d_dev.h ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698