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

Unified Diff: experimental/c_salt/npapi/browser_3d_device.cc

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 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 | « experimental/c_salt/npapi/browser_3d_device.h ('k') | experimental/c_salt/npapi/browser_binding.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/c_salt/npapi/browser_3d_device.cc
diff --git a/experimental/c_salt/npapi/browser_3d_device.cc b/experimental/c_salt/npapi/browser_3d_device.cc
deleted file mode 100644
index f1781a9e1cf5d3c94b0079d1b6210369e5627505..0000000000000000000000000000000000000000
--- a/experimental/c_salt/npapi/browser_3d_device.cc
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright 2010 The Native Client 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 "c_salt/npapi/browser_3d_device.h"
-
-#include <nacl/npapi_extensions.h>
-
-#include "c_salt/instance.h"
-#include "c_salt/opengl_context.h"
-
-NPDevice* NPN_AcquireDevice(NPP instance, NPDeviceID device);
-
-namespace {
-const int32_t kCommandBufferSize = 1024 * 1024;
-} // namespace
-
-namespace c_salt {
-
-Browser3DDevice* CreateBrowser3DDevice(const Instance& instance) {
- return new npapi::Browser3DDeviceNPAPI(instance);
-}
-
-namespace npapi {
-
-Browser3DDeviceNPAPI::Browser3DDeviceNPAPI(const Instance& instance)
- : instance_(instance), device3d_(NULL) {
- std::memset(&context3d_, 0, sizeof(context3d_));
-}
-
-Browser3DDeviceNPAPI::~Browser3DDeviceNPAPI() {
- DeleteBrowser3DContext();
- device3d_ = NULL;
-}
-
-bool Browser3DDeviceNPAPI::AcquireBrowser3DDevice() {
- if (is_valid())
- return true;
- device3d_ = NPN_AcquireDevice(instance_.npp_instance(), NPPepper3DDevice);
- assert(device3d_);
- return is_valid();
-}
-
-PGLContext Browser3DDeviceNPAPI::CreateBrowser3DContext(
- OpenGLContext* context) {
- NPDeviceContext3DConfig config;
- config.commandBufferSize = kCommandBufferSize;
- assert(device3d_);
- context3d_.repaintCallback = RepaintCallback;
- context3d_.user_data_ = context;
- device3d_->initializeContext(instance_.npp_instance(),
- &config,
- &context3d_);
- return pglCreateContext(instance_.npp_instance(), device3d_, &context3d_);
-}
-
-void Browser3DDeviceNPAPI::DeleteBrowser3DContext() {
- PGLBoolean success = device3d_->destroyContext(instance_.npp_instance(),
- &context3d_);
- assert(PGL_TRUE == success);
- std::memset(&context3d_, 0, sizeof(context3d_));
-}
-
-void Browser3DDeviceNPAPI::RepaintCallback(NPP /* npp NOTUSED */,
- NPDeviceContext3D* native_context) {
- assert(native_context);
- DeviceContext3DExt* context =
- static_cast<DeviceContext3DExt*>(native_context);
- OpenGLContext* opengl_context = context->user_data_;
- assert(opengl_context);
- if (opengl_context)
- opengl_context->RenderContext();
-}
-} // namespace npapi
-} // namespace c_salt
« no previous file with comments | « experimental/c_salt/npapi/browser_3d_device.h ('k') | experimental/c_salt/npapi/browser_binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698