summaryrefslogtreecommitdiffstats
path: root/ppapi/cpp
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-01 06:47:09 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-01 06:47:09 +0000
commit88cc7818c81afdcb418f8fd0486b2c8f57457525 (patch)
treee31e7bc875da0d45ecdf8db3bb703f80a354d861 /ppapi/cpp
parent62df0a016209f927a61b76cf85f98c68aeea141f (diff)
downloadchromium_src-88cc7818c81afdcb418f8fd0486b2c8f57457525.zip
chromium_src-88cc7818c81afdcb418f8fd0486b2c8f57457525.tar.gz
chromium_src-88cc7818c81afdcb418f8fd0486b2c8f57457525.tar.bz2
Remove Context3D/Surface3D
Graphics3D is the new black. BUG=None TEST=None Review URL: http://codereview.chromium.org/8676042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112412 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp')
-rw-r--r--ppapi/cpp/dev/context_3d_dev.cc52
-rw-r--r--ppapi/cpp/dev/context_3d_dev.h38
-rw-r--r--ppapi/cpp/dev/surface_3d_dev.cc50
-rw-r--r--ppapi/cpp/dev/surface_3d_dev.h37
-rw-r--r--ppapi/cpp/dev/video_decoder_dev.cc10
-rw-r--r--ppapi/cpp/dev/video_decoder_dev.h4
-rw-r--r--ppapi/cpp/instance.cc8
-rw-r--r--ppapi/cpp/instance.h12
8 files changed, 0 insertions, 211 deletions
diff --git a/ppapi/cpp/dev/context_3d_dev.cc b/ppapi/cpp/dev/context_3d_dev.cc
deleted file mode 100644
index 4847642..0000000
--- a/ppapi/cpp/dev/context_3d_dev.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) 2010 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/context_3d_dev.h"
-
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/cpp/dev/surface_3d_dev.h"
-#include "ppapi/cpp/instance.h"
-#include "ppapi/cpp/module_impl.h"
-
-namespace pp {
-
-namespace {
-
-template <> const char* interface_name<PPB_Context3D_Dev>() {
- return PPB_CONTEXT_3D_DEV_INTERFACE;
-}
-
-} // namespace
-
-Context3D_Dev Context3D_Dev::FromResource(PP_Resource resource_id) {
- if (has_interface<PPB_Context3D_Dev>() &&
- get_interface<PPB_Context3D_Dev>()->IsContext3D(resource_id))
- return Context3D_Dev(resource_id);
-
- return Context3D_Dev();
-}
-
-Context3D_Dev::Context3D_Dev(const Instance& instance,
- PP_Config3D_Dev config,
- const Context3D_Dev& share_context,
- const int32_t* attrib_list) {
- if (has_interface<PPB_Context3D_Dev>()) {
- PassRefFromConstructor(get_interface<PPB_Context3D_Dev>()->Create(
- instance.pp_instance(),
- config,
- share_context.pp_resource(),
- attrib_list));
- }
-}
-
-int32_t Context3D_Dev::BindSurfaces(const Surface3D_Dev& draw,
- const Surface3D_Dev& read) {
- if (!has_interface<PPB_Context3D_Dev>())
- return PP_ERROR_NOINTERFACE;
-
- return get_interface<PPB_Context3D_Dev>()->BindSurfaces(
- pp_resource(), draw.pp_resource(), read.pp_resource());
-}
-
-} // namespace pp
diff --git a/ppapi/cpp/dev/context_3d_dev.h b/ppapi/cpp/dev/context_3d_dev.h
deleted file mode 100644
index 0bc26c2..0000000
--- a/ppapi/cpp/dev/context_3d_dev.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2010 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_CONTEXT_3D_DEV_H_
-#define PPAPI_CPP_DEV_CONTEXT_3D_DEV_H_
-
-#include "ppapi/c/dev/ppb_context_3d_dev.h"
-
-#include "ppapi/cpp/instance.h"
-#include "ppapi/cpp/resource.h"
-
-namespace pp {
-
-class Surface3D_Dev;
-
-class Context3D_Dev : public Resource {
- public:
- // Creates an is_null() Context3D object.
- Context3D_Dev() {}
-
- Context3D_Dev(const Instance& instance,
- PP_Config3D_Dev config,
- const Context3D_Dev& share_context,
- const int32_t* attrib_list);
-
- int32_t BindSurfaces(const Surface3D_Dev& draw,
- const Surface3D_Dev& read);
-
- protected:
- explicit Context3D_Dev(PP_Resource resource_id) : Resource(resource_id) {}
- static Context3D_Dev FromResource(PP_Resource resource_id);
-};
-
-} // namespace pp
-
-#endif // PPAPI_CPP_DEV_CONTEXT_3D_DEV_H_
-
diff --git a/ppapi/cpp/dev/surface_3d_dev.cc b/ppapi/cpp/dev/surface_3d_dev.cc
deleted file mode 100644
index 9bc1430..0000000
--- a/ppapi/cpp/dev/surface_3d_dev.cc
+++ /dev/null
@@ -1,50 +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/surface_3d_dev.h"
-
-#include "ppapi/c/pp_completion_callback.h"
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/cpp/instance.h"
-#include "ppapi/cpp/module_impl.h"
-
-namespace pp {
-
-namespace {
-
-template <> const char* interface_name<PPB_Surface3D_Dev>() {
- return PPB_SURFACE_3D_DEV_INTERFACE;
-}
-
-} // namespace
-
-Surface3D_Dev Surface3D_Dev::FromResource(PP_Resource resource_id) {
- if (has_interface<PPB_Surface3D_Dev>() &&
- get_interface<PPB_Surface3D_Dev>()->IsSurface3D(resource_id))
- return Surface3D_Dev(resource_id);
-
- return Surface3D_Dev();
-}
-
-Surface3D_Dev::Surface3D_Dev(const Instance& instance,
- PP_Config3D_Dev config,
- const int32_t* attrib_list) {
- if (has_interface<PPB_Surface3D_Dev>()) {
- PassRefFromConstructor(get_interface<PPB_Surface3D_Dev>()->Create(
- instance.pp_instance(),
- config,
- attrib_list));
- }
-}
-
-int32_t Surface3D_Dev::SwapBuffers(const CompletionCallback& cc) const {
- if (!has_interface<PPB_Surface3D_Dev>())
- return cc.MayForce(PP_ERROR_NOINTERFACE);
-
- return get_interface<PPB_Surface3D_Dev>()->SwapBuffers(
- pp_resource(),
- cc.pp_completion_callback());
-}
-
-} // namespace pp
diff --git a/ppapi/cpp/dev/surface_3d_dev.h b/ppapi/cpp/dev/surface_3d_dev.h
deleted file mode 100644
index 450ce41..0000000
--- a/ppapi/cpp/dev/surface_3d_dev.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2010 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_SURFACE_3D_DEV_H_
-#define PPAPI_CPP_DEV_SURFACE_3D_DEV_H_
-
-#include "ppapi/c/dev/ppb_surface_3d_dev.h"
-
-#include "ppapi/cpp/completion_callback.h"
-#include "ppapi/cpp/instance.h"
-#include "ppapi/cpp/resource.h"
-
-namespace pp {
-
-class CompletionCallback;
-
-class Surface3D_Dev : public Resource {
- public:
- // Creates an is_null() Surface3D object.
- Surface3D_Dev() {}
-
- Surface3D_Dev(const Instance& instance,
- PP_Config3D_Dev config,
- const int32_t* attrib_list);
-
- int32_t SwapBuffers(const CompletionCallback& cc) const;
-
- protected:
- explicit Surface3D_Dev(PP_Resource resource_id) : Resource(resource_id) {}
- static Surface3D_Dev FromResource(PP_Resource resource_id);
-};
-
-} // namespace pp
-
-#endif // PPAPI_CPP_DEV_SURFACE_3D_DEV_H_
-
diff --git a/ppapi/cpp/dev/video_decoder_dev.cc b/ppapi/cpp/dev/video_decoder_dev.cc
index 991ad55..7110695 100644
--- a/ppapi/cpp/dev/video_decoder_dev.cc
+++ b/ppapi/cpp/dev/video_decoder_dev.cc
@@ -7,7 +7,6 @@
#include "ppapi/c/dev/ppb_video_decoder_dev.h"
#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/graphics_3d.h"
#include "ppapi/cpp/instance.h"
#include "ppapi/cpp/module.h"
@@ -24,15 +23,6 @@ template <> const char* interface_name<PPB_VideoDecoder_Dev>() {
} // namespace
VideoDecoder_Dev::VideoDecoder_Dev(const Instance* instance,
- const Context3D_Dev& context,
- PP_VideoDecoder_Profile profile) {
- if (!has_interface<PPB_VideoDecoder_Dev>())
- return;
- PassRefFromConstructor(get_interface<PPB_VideoDecoder_Dev>()->Create(
- instance->pp_instance(), context.pp_resource(), profile));
-}
-
-VideoDecoder_Dev::VideoDecoder_Dev(const Instance* instance,
const Graphics3D& context,
PP_VideoDecoder_Profile profile) {
if (!has_interface<PPB_VideoDecoder_Dev>())
diff --git a/ppapi/cpp/dev/video_decoder_dev.h b/ppapi/cpp/dev/video_decoder_dev.h
index b761ef1..28b7bc2 100644
--- a/ppapi/cpp/dev/video_decoder_dev.h
+++ b/ppapi/cpp/dev/video_decoder_dev.h
@@ -14,7 +14,6 @@
namespace pp {
-class Context3D_Dev;
class Graphics3D;
class Instance;
@@ -26,9 +25,6 @@ class VideoDecoder_Dev : public Resource {
public:
// See PPB_VideoDecoder_Dev::Create.
VideoDecoder_Dev(const Instance* instance,
- const Context3D_Dev& context,
- PP_VideoDecoder_Profile profile);
- VideoDecoder_Dev(const Instance* instance,
const Graphics3D& context,
PP_VideoDecoder_Profile profile);
diff --git a/ppapi/cpp/instance.cc b/ppapi/cpp/instance.cc
index a6f5997..72e4f02 100644
--- a/ppapi/cpp/instance.cc
+++ b/ppapi/cpp/instance.cc
@@ -8,7 +8,6 @@
#include "ppapi/c/ppb_input_event.h"
#include "ppapi/c/ppb_instance.h"
#include "ppapi/c/ppb_messaging.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"
@@ -89,13 +88,6 @@ bool Instance::BindGraphics(const Graphics3D& graphics) {
pp_instance(), graphics.pp_resource()));
}
-bool Instance::BindGraphics(const Surface3D_Dev& graphics) {
- if (!has_interface<PPB_Instance>())
- return false;
- return PP_ToBool(get_interface<PPB_Instance>()->BindGraphics(
- pp_instance(), graphics.pp_resource()));
-}
-
bool Instance::IsFullFrame() {
if (!has_interface<PPB_Instance>())
return false;
diff --git a/ppapi/cpp/instance.h b/ppapi/cpp/instance.h
index 981f29c..9a3bfaf 100644
--- a/ppapi/cpp/instance.h
+++ b/ppapi/cpp/instance.h
@@ -24,7 +24,6 @@ class Graphics2D;
class Graphics3D;
class InputEvent;
class Rect;
-class Surface3D_Dev;
class URLLoader;
class Var;
@@ -278,17 +277,6 @@ class Instance {
/// instance, so the caller can release its reference if it chooses.
bool BindGraphics(const Graphics3D& graphics);
- /// Binds the given Surface3D as the current display surface.
- /// Refer to <code>BindGraphics(const Graphics2D& graphics)</code> for
- /// further information.
- ///
- /// @param[in] graphics A <code>Surface3D_Dev</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 Surface3D_Dev& graphics);
-
/// IsFullFrame() determines if the instance is full-frame (repr).
/// Such an instance represents the entire document in a frame rather than an
/// embedded resource. This can happen if the user does a top-level