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

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

Issue 7530010: Added PPB_Graphics3D_Dev::Resize to let plugins resize the backing surface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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) 2011 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/graphics_3d_dev.h" 5 #include "ppapi/cpp/dev/graphics_3d_dev.h"
6 6
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/cpp/completion_callback.h" 8 #include "ppapi/cpp/completion_callback.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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 int32_t Graphics3D_Dev::SetAttribs(int32_t* attrib_list) { 81 int32_t Graphics3D_Dev::SetAttribs(int32_t* attrib_list) {
82 if (!has_interface<PPB_Graphics3D_Dev>()) 82 if (!has_interface<PPB_Graphics3D_Dev>())
83 return PP_ERROR_NOINTERFACE; 83 return PP_ERROR_NOINTERFACE;
84 84
85 return get_interface<PPB_Graphics3D_Dev>()->SetAttribs( 85 return get_interface<PPB_Graphics3D_Dev>()->SetAttribs(
86 pp_resource(), 86 pp_resource(),
87 attrib_list); 87 attrib_list);
88 } 88 }
89 89
90 int32_t Graphics3D_Dev::Resize(int32_t width, int32_t height) {
91 if (!has_interface<PPB_Graphics3D_Dev>())
92 return PP_ERROR_NOINTERFACE;
93
94 return get_interface<PPB_Graphics3D_Dev>()->Resize(
95 pp_resource(), width, height);
96 }
97
90 int32_t Graphics3D_Dev::SwapBuffers(const CompletionCallback& cc) { 98 int32_t Graphics3D_Dev::SwapBuffers(const CompletionCallback& cc) {
91 if (!has_interface<PPB_Graphics3D_Dev>()) 99 if (!has_interface<PPB_Graphics3D_Dev>())
92 return PP_ERROR_NOINTERFACE; 100 return PP_ERROR_NOINTERFACE;
93 101
94 return get_interface<PPB_Graphics3D_Dev>()->SwapBuffers( 102 return get_interface<PPB_Graphics3D_Dev>()->SwapBuffers(
95 pp_resource(), 103 pp_resource(),
96 cc.pp_completion_callback()); 104 cc.pp_completion_callback());
97 } 105 }
98 106
99 } // namespace pp 107 } // namespace pp
100 108
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698