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

Unified Diff: ppapi/cpp/graphics_3d.cc

Issue 9682003: Check for specific PPB versions in C++ wrappers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update pp::Fullscreen in this CL, too. Created 8 years, 9 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
« no previous file with comments | « ppapi/cpp/fullscreen.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/graphics_3d.cc
diff --git a/ppapi/cpp/graphics_3d.cc b/ppapi/cpp/graphics_3d.cc
index 32578de8791f5cf4df1d387c8b0c9d31292cfdb1..be11bec6b513ef12b1664a79904c6326dd85e777 100644
--- a/ppapi/cpp/graphics_3d.cc
+++ b/ppapi/cpp/graphics_3d.cc
@@ -14,8 +14,8 @@ namespace pp {
namespace {
-template <> const char* interface_name<PPB_Graphics3D>() {
- return PPB_GRAPHICS_3D_INTERFACE;
+template <> const char* interface_name<PPB_Graphics3D_1_0>() {
+ return PPB_GRAPHICS_3D_INTERFACE_1_0;
}
} // namespace
@@ -25,8 +25,8 @@ Graphics3D::Graphics3D() {
Graphics3D::Graphics3D(const InstanceHandle& instance,
const int32_t attrib_list[]) {
- if (has_interface<PPB_Graphics3D>()) {
- PassRefFromConstructor(get_interface<PPB_Graphics3D>()->Create(
+ if (has_interface<PPB_Graphics3D_1_0>()) {
+ PassRefFromConstructor(get_interface<PPB_Graphics3D_1_0>()->Create(
instance.pp_instance(), 0, attrib_list));
}
}
@@ -34,8 +34,8 @@ Graphics3D::Graphics3D(const InstanceHandle& instance,
Graphics3D::Graphics3D(const InstanceHandle& instance,
const Graphics3D& share_context,
const int32_t attrib_list[]) {
- if (has_interface<PPB_Graphics3D>()) {
- PassRefFromConstructor(get_interface<PPB_Graphics3D>()->Create(
+ if (has_interface<PPB_Graphics3D_1_0>()) {
+ PassRefFromConstructor(get_interface<PPB_Graphics3D_1_0>()->Create(
instance.pp_instance(),
share_context.pp_resource(),
attrib_list));
@@ -46,39 +46,38 @@ Graphics3D::~Graphics3D() {
}
int32_t Graphics3D::GetAttribs(int32_t attrib_list[]) const {
- if (!has_interface<PPB_Graphics3D>())
+ if (!has_interface<PPB_Graphics3D_1_0>())
return PP_ERROR_NOINTERFACE;
- return get_interface<PPB_Graphics3D>()->GetAttribs(
+ return get_interface<PPB_Graphics3D_1_0>()->GetAttribs(
pp_resource(),
attrib_list);
}
int32_t Graphics3D::SetAttribs(const int32_t attrib_list[]) {
- if (!has_interface<PPB_Graphics3D>())
+ if (!has_interface<PPB_Graphics3D_1_0>())
return PP_ERROR_NOINTERFACE;
- return get_interface<PPB_Graphics3D>()->SetAttribs(
+ return get_interface<PPB_Graphics3D_1_0>()->SetAttribs(
pp_resource(),
attrib_list);
}
int32_t Graphics3D::ResizeBuffers(int32_t width, int32_t height) {
- if (!has_interface<PPB_Graphics3D>())
+ if (!has_interface<PPB_Graphics3D_1_0>())
return PP_ERROR_NOINTERFACE;
- return get_interface<PPB_Graphics3D>()->ResizeBuffers(
+ return get_interface<PPB_Graphics3D_1_0>()->ResizeBuffers(
pp_resource(), width, height);
}
int32_t Graphics3D::SwapBuffers(const CompletionCallback& cc) {
- if (!has_interface<PPB_Graphics3D>())
+ if (!has_interface<PPB_Graphics3D_1_0>())
return PP_ERROR_NOINTERFACE;
- return get_interface<PPB_Graphics3D>()->SwapBuffers(
+ return get_interface<PPB_Graphics3D_1_0>()->SwapBuffers(
pp_resource(),
cc.pp_completion_callback());
}
} // namespace pp
-
« no previous file with comments | « ppapi/cpp/fullscreen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698