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

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

Issue 6899055: PPAPI: Force async callback invocation option. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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"
11 11
(...skipping 21 matching lines...) Expand all
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 CompletionCallback& cc) 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 cc.MayForce(static_cast<int32_t>(PP_ERROR_NOINTERFACE));
piman 2011/06/07 17:32:14 no need for static_cast ?
polina 2011/06/09 23:53:51 Done.
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 cc.pp_completion_callback()); 47 cc.pp_completion_callback());
48 } 48 }
49 49
50 } // namespace pp 50 } // namespace pp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698