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

Unified Diff: ppapi/cpp/graphics_3d.cc

Issue 7782020: Revert 99855 - Move PPAPI graphics3d and opengles interfaces out of Dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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/graphics_3d.h ('k') | ppapi/cpp/graphics_3d_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/graphics_3d.cc
===================================================================
--- ppapi/cpp/graphics_3d.cc (revision 99860)
+++ ppapi/cpp/graphics_3d.cc (working copy)
@@ -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/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
-
« no previous file with comments | « ppapi/cpp/graphics_3d.h ('k') | ppapi/cpp/graphics_3d_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698