summaryrefslogtreecommitdiffstats
path: root/ppapi/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi/cpp')
-rw-r--r--ppapi/cpp/dev/graphics_3d_dev.cc76
-rw-r--r--ppapi/cpp/dev/video_decoder_dev.cc4
-rw-r--r--ppapi/cpp/dev/video_decoder_dev.h4
-rw-r--r--ppapi/cpp/graphics_3d.cc76
-rw-r--r--ppapi/cpp/graphics_3d.h (renamed from ppapi/cpp/dev/graphics_3d_dev.h)20
-rw-r--r--ppapi/cpp/graphics_3d_client.cc (renamed from ppapi/cpp/dev/graphics_3d_client_dev.cc)16
-rw-r--r--ppapi/cpp/graphics_3d_client.h (renamed from ppapi/cpp/dev/graphics_3d_client_dev.h)14
-rw-r--r--ppapi/cpp/instance.cc4
-rw-r--r--ppapi/cpp/instance.h6
9 files changed, 110 insertions, 110 deletions
diff --git a/ppapi/cpp/dev/graphics_3d_dev.cc b/ppapi/cpp/dev/graphics_3d_dev.cc
deleted file mode 100644
index 953b859..0000000
--- a/ppapi/cpp/dev/graphics_3d_dev.cc
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ppapi/cpp/dev/graphics_3d_dev.h"
-
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/cpp/completion_callback.h"
-#include "ppapi/cpp/instance.h"
-#include "ppapi/cpp/module_impl.h"
-#include "ppapi/cpp/var.h"
-
-namespace pp {
-
-namespace {
-
-template <> const char* interface_name<PPB_Graphics3D_Dev>() {
- return PPB_GRAPHICS_3D_DEV_INTERFACE;
-}
-
-} // namespace
-
-Graphics3D_Dev::Graphics3D_Dev() {
-}
-
-Graphics3D_Dev::Graphics3D_Dev(const Instance& instance,
- const Graphics3D_Dev& share_context,
- const int32_t* attrib_list) {
- if (has_interface<PPB_Graphics3D_Dev>()) {
- PassRefFromConstructor(get_interface<PPB_Graphics3D_Dev>()->Create(
- instance.pp_instance(),
- share_context.pp_resource(),
- attrib_list));
- }
-}
-
-Graphics3D_Dev::~Graphics3D_Dev() {
-}
-
-int32_t Graphics3D_Dev::GetAttribs(int32_t* attrib_list) const {
- if (!has_interface<PPB_Graphics3D_Dev>())
- return PP_ERROR_NOINTERFACE;
-
- return get_interface<PPB_Graphics3D_Dev>()->GetAttribs(
- pp_resource(),
- attrib_list);
-}
-
-int32_t Graphics3D_Dev::SetAttribs(int32_t* attrib_list) {
- if (!has_interface<PPB_Graphics3D_Dev>())
- return PP_ERROR_NOINTERFACE;
-
- return get_interface<PPB_Graphics3D_Dev>()->SetAttribs(
- pp_resource(),
- attrib_list);
-}
-
-int32_t Graphics3D_Dev::ResizeBuffers(int32_t width, int32_t height) {
- if (!has_interface<PPB_Graphics3D_Dev>())
- return PP_ERROR_NOINTERFACE;
-
- return get_interface<PPB_Graphics3D_Dev>()->ResizeBuffers(
- pp_resource(), width, height);
-}
-
-int32_t Graphics3D_Dev::SwapBuffers(const CompletionCallback& cc) {
- if (!has_interface<PPB_Graphics3D_Dev>())
- return PP_ERROR_NOINTERFACE;
-
- return get_interface<PPB_Graphics3D_Dev>()->SwapBuffers(
- pp_resource(),
- cc.pp_completion_callback());
-}
-
-} // namespace pp
-
diff --git a/ppapi/cpp/dev/video_decoder_dev.cc b/ppapi/cpp/dev/video_decoder_dev.cc
index f7ab651..991ad55 100644
--- a/ppapi/cpp/dev/video_decoder_dev.cc
+++ b/ppapi/cpp/dev/video_decoder_dev.cc
@@ -8,7 +8,7 @@
#include "ppapi/c/dev/ppp_video_decoder_dev.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/cpp/dev/context_3d_dev.h"
-#include "ppapi/cpp/dev/graphics_3d_dev.h"
+#include "ppapi/cpp/graphics_3d.h"
#include "ppapi/cpp/instance.h"
#include "ppapi/cpp/module.h"
#include "ppapi/cpp/module_impl.h"
@@ -33,7 +33,7 @@ VideoDecoder_Dev::VideoDecoder_Dev(const Instance* instance,
}
VideoDecoder_Dev::VideoDecoder_Dev(const Instance* instance,
- const Graphics3D_Dev& context,
+ const Graphics3D& context,
PP_VideoDecoder_Profile profile) {
if (!has_interface<PPB_VideoDecoder_Dev>())
return;
diff --git a/ppapi/cpp/dev/video_decoder_dev.h b/ppapi/cpp/dev/video_decoder_dev.h
index e260050..b761ef1 100644
--- a/ppapi/cpp/dev/video_decoder_dev.h
+++ b/ppapi/cpp/dev/video_decoder_dev.h
@@ -15,7 +15,7 @@
namespace pp {
class Context3D_Dev;
-class Graphics3D_Dev;
+class Graphics3D;
class Instance;
// C++ wrapper for the Pepper Video Decoder interface. For more detailed
@@ -29,7 +29,7 @@ class VideoDecoder_Dev : public Resource {
const Context3D_Dev& context,
PP_VideoDecoder_Profile profile);
VideoDecoder_Dev(const Instance* instance,
- const Graphics3D_Dev& context,
+ const Graphics3D& context,
PP_VideoDecoder_Profile profile);
explicit VideoDecoder_Dev(PP_Resource resource);
diff --git a/ppapi/cpp/graphics_3d.cc b/ppapi/cpp/graphics_3d.cc
new file mode 100644
index 0000000..0cd8ba2
--- /dev/null
+++ b/ppapi/cpp/graphics_3d.cc
@@ -0,0 +1,76 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ppapi/cpp/graphics_3d.h"
+
+#include "ppapi/c/pp_errors.h"
+#include "ppapi/cpp/completion_callback.h"
+#include "ppapi/cpp/instance.h"
+#include "ppapi/cpp/module_impl.h"
+#include "ppapi/cpp/var.h"
+
+namespace pp {
+
+namespace {
+
+template <> const char* interface_name<PPB_Graphics3D>() {
+ return PPB_GRAPHICS_3D_INTERFACE;
+}
+
+} // namespace
+
+Graphics3D::Graphics3D() {
+}
+
+Graphics3D::Graphics3D(const Instance& instance,
+ const Graphics3D& share_context,
+ const int32_t* attrib_list) {
+ if (has_interface<PPB_Graphics3D>()) {
+ PassRefFromConstructor(get_interface<PPB_Graphics3D>()->Create(
+ instance.pp_instance(),
+ share_context.pp_resource(),
+ attrib_list));
+ }
+}
+
+Graphics3D::~Graphics3D() {
+}
+
+int32_t Graphics3D::GetAttribs(int32_t* attrib_list) const {
+ if (!has_interface<PPB_Graphics3D>())
+ return PP_ERROR_NOINTERFACE;
+
+ return get_interface<PPB_Graphics3D>()->GetAttribs(
+ pp_resource(),
+ attrib_list);
+}
+
+int32_t Graphics3D::SetAttribs(int32_t* attrib_list) {
+ if (!has_interface<PPB_Graphics3D>())
+ return PP_ERROR_NOINTERFACE;
+
+ return get_interface<PPB_Graphics3D>()->SetAttribs(
+ pp_resource(),
+ attrib_list);
+}
+
+int32_t Graphics3D::ResizeBuffers(int32_t width, int32_t height) {
+ if (!has_interface<PPB_Graphics3D>())
+ return PP_ERROR_NOINTERFACE;
+
+ return get_interface<PPB_Graphics3D>()->ResizeBuffers(
+ pp_resource(), width, height);
+}
+
+int32_t Graphics3D::SwapBuffers(const CompletionCallback& cc) {
+ if (!has_interface<PPB_Graphics3D>())
+ return PP_ERROR_NOINTERFACE;
+
+ return get_interface<PPB_Graphics3D>()->SwapBuffers(
+ pp_resource(),
+ cc.pp_completion_callback());
+}
+
+} // namespace pp
+
diff --git a/ppapi/cpp/dev/graphics_3d_dev.h b/ppapi/cpp/graphics_3d.h
index 30a46e7..aaa6d08 100644
--- a/ppapi/cpp/dev/graphics_3d_dev.h
+++ b/ppapi/cpp/graphics_3d.h
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef PPAPI_CPP_DEV_GRAPHICS_3D_DEV_H_
-#define PPAPI_CPP_DEV_GRAPHICS_3D_DEV_H_
+#ifndef PPAPI_CPP_GRAPHICS_3D_H_
+#define PPAPI_CPP_GRAPHICS_3D_H_
-#include "ppapi/c/dev/ppb_graphics_3d_dev.h"
+#include "ppapi/c/ppb_graphics_3d.h"
#include "ppapi/cpp/resource.h"
namespace pp {
@@ -14,16 +14,16 @@ class CompletionCallback;
class Instance;
class Var;
-class Graphics3D_Dev : public Resource {
+class Graphics3D : public Resource {
public:
// Creates an is_null() Graphics3D_Dev object.
- Graphics3D_Dev();
+ Graphics3D();
- Graphics3D_Dev(const Instance& instance,
- const Graphics3D_Dev& share_context,
- const int32_t* attrib_list);
+ Graphics3D(const Instance& instance,
+ const Graphics3D& share_context,
+ const int32_t* attrib_list);
- ~Graphics3D_Dev();
+ ~Graphics3D();
int32_t GetAttribs(int32_t* attrib_list) const;
int32_t SetAttribs(int32_t* attrib_list);
@@ -35,5 +35,5 @@ class Graphics3D_Dev : public Resource {
} // namespace pp
-#endif // PPAPI_CPP_DEV_GRAPHICS_3D_DEV_H_
+#endif // PPAPI_CPP_GRAPHICS_3D_H_
diff --git a/ppapi/cpp/dev/graphics_3d_client_dev.cc b/ppapi/cpp/graphics_3d_client.cc
index bdd2e7e..d827f9d 100644
--- a/ppapi/cpp/dev/graphics_3d_client_dev.cc
+++ b/ppapi/cpp/graphics_3d_client.cc
@@ -1,10 +1,10 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ppapi/cpp/dev/graphics_3d_client_dev.h"
+#include "ppapi/cpp/graphics_3d_client.h"
-#include "ppapi/c/dev/ppp_graphics_3d_dev.h"
+#include "ppapi/c/ppp_graphics_3d.h"
#include "ppapi/cpp/instance.h"
#include "ppapi/cpp/module.h"
#include "ppapi/cpp/module_impl.h"
@@ -13,30 +13,30 @@ namespace pp {
namespace {
-const char kPPPGraphics3DInterface[] = PPP_GRAPHICS_3D_DEV_INTERFACE;
+const char kPPPGraphics3DInterface[] = PPP_GRAPHICS_3D_INTERFACE;
void Graphics3D_ContextLost(PP_Instance instance) {
void* object =
pp::Instance::GetPerInstanceObject(instance, kPPPGraphics3DInterface);
if (!object)
return;
- return static_cast<Graphics3DClient_Dev*>(object)->Graphics3DContextLost();
+ return static_cast<Graphics3DClient*>(object)->Graphics3DContextLost();
}
-static PPP_Graphics3D_Dev graphics3d_interface = {
+static PPP_Graphics3D graphics3d_interface = {
&Graphics3D_ContextLost,
};
} // namespace
-Graphics3DClient_Dev::Graphics3DClient_Dev(Instance* instance)
+Graphics3DClient::Graphics3DClient(Instance* instance)
: associated_instance_(instance) {
pp::Module::Get()->AddPluginInterface(kPPPGraphics3DInterface,
&graphics3d_interface);
associated_instance_->AddPerInstanceObject(kPPPGraphics3DInterface, this);
}
-Graphics3DClient_Dev::~Graphics3DClient_Dev() {
+Graphics3DClient::~Graphics3DClient() {
associated_instance_->RemovePerInstanceObject(kPPPGraphics3DInterface, this);
}
diff --git a/ppapi/cpp/dev/graphics_3d_client_dev.h b/ppapi/cpp/graphics_3d_client.h
index 5f68fb2..511ca2d 100644
--- a/ppapi/cpp/dev/graphics_3d_client_dev.h
+++ b/ppapi/cpp/graphics_3d_client.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef PPAPI_CPP_DEV_GRAPHICS_3D_CLIENT_DEV_H_
-#define PPAPI_CPP_DEV_GRAPHICS_3D_CLIENT_DEV_H_
+#ifndef PPAPI_CPP_GRAPHICS_3D_CLIENT_H_
+#define PPAPI_CPP_GRAPHICS_3D_CLIENT_H_
#include "ppapi/c/pp_stdint.h"
@@ -17,10 +17,10 @@ class Widget_Dev;
// This class provides a C++ interface for callbacks related to 3D. You
// would normally use multiple inheritance to derive from this class in your
// instance.
-class Graphics3DClient_Dev {
+class Graphics3DClient {
public:
- Graphics3DClient_Dev(Instance* instance);
- virtual ~Graphics3DClient_Dev();
+ Graphics3DClient(Instance* instance);
+ virtual ~Graphics3DClient();
/**
* Notification that the context was lost for the 3D devices.
@@ -33,4 +33,4 @@ class Graphics3DClient_Dev {
} // namespace pp
-#endif // PPAPI_CPP_DEV_GRAPHICS_3D_CLIENT_DEV_H_
+#endif // PPAPI_CPP_DEV_GRAPHICS_3D_CLIENT_H_
diff --git a/ppapi/cpp/instance.cc b/ppapi/cpp/instance.cc
index 9bb77dc..a6f5997 100644
--- a/ppapi/cpp/instance.cc
+++ b/ppapi/cpp/instance.cc
@@ -8,9 +8,9 @@
#include "ppapi/c/ppb_input_event.h"
#include "ppapi/c/ppb_instance.h"
#include "ppapi/c/ppb_messaging.h"
-#include "ppapi/cpp/dev/graphics_3d_dev.h"
#include "ppapi/cpp/dev/surface_3d_dev.h"
#include "ppapi/cpp/graphics_2d.h"
+#include "ppapi/cpp/graphics_3d.h"
#include "ppapi/cpp/image_data.h"
#include "ppapi/cpp/logging.h"
#include "ppapi/cpp/module.h"
@@ -82,7 +82,7 @@ bool Instance::BindGraphics(const Graphics2D& graphics) {
pp_instance(), graphics.pp_resource()));
}
-bool Instance::BindGraphics(const Graphics3D_Dev& graphics) {
+bool Instance::BindGraphics(const Graphics3D& graphics) {
if (!has_interface<PPB_Instance>())
return false;
return PP_ToBool(get_interface<PPB_Instance>()->BindGraphics(
diff --git a/ppapi/cpp/instance.h b/ppapi/cpp/instance.h
index ea145f9..528c08a 100644
--- a/ppapi/cpp/instance.h
+++ b/ppapi/cpp/instance.h
@@ -21,7 +21,7 @@ struct PP_InputEvent;
namespace pp {
class Graphics2D;
-class Graphics3D_Dev;
+class Graphics3D;
class InputEvent;
class ImageData;
class Point;
@@ -275,12 +275,12 @@ class Instance {
/// Refer to <code>BindGraphics(const Graphics2D& graphics)</code> for
/// further information.
///
- /// @param[in] graphics A <code>Graphics3D_Dev</code> to bind.
+ /// @param[in] graphics A <code>Graphics3D</code> to bind.
///
/// @return true if bind was successful or false if the device was not the
/// correct type. On success, a reference to the device will be held by the
/// instance, so the caller can release its reference if it chooses.
- bool BindGraphics(const Graphics3D_Dev& graphics);
+ bool BindGraphics(const Graphics3D& graphics);
/// Binds the given Surface3D as the current display surface.
/// Refer to <code>BindGraphics(const Graphics2D& graphics)</code> for