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

Unified Diff: experimental/c_salt/opengl_view.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/opengl_view.h ('k') | experimental/c_salt/opengl_view_ptrs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/c_salt/opengl_view.cc
diff --git a/experimental/c_salt/opengl_view.cc b/experimental/c_salt/opengl_view.cc
deleted file mode 100644
index b703e18bf6b3977bcec8ff991bc35709f62f43af..0000000000000000000000000000000000000000
--- a/experimental/c_salt/opengl_view.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2010 The Ginsu 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/opengl_view.h"
-
-#include <algorithm>
-
-#include "c_salt/instance.h"
-#include "c_salt/opengl_context.h"
-
-namespace c_salt {
-
-OpenGLView::OpenGLView() : width_(1), height_(1), needs_redraw_(true) {
-}
-
-OpenGLView::~OpenGLView() {
-}
-
-SharedOpenGLContext OpenGLView::GetOpenGLContext() const {
- return context_;
-}
-
-void OpenGLView::SetOpenGLContext(SharedOpenGLContext context) {
- context_ = context; // Might cause ReleaseOpenGL() to be called.
- SharedOpenGLView shared_view(this);
- context_->set_opengl_view(shared_view);
-}
-
-void OpenGLView::SetNeedsRedraw(bool flag) {
- needs_redraw_ = flag;
- if (needs_redraw_) {
- // Signal the associated context to issue a repaint request.
- context_->RenderOpenGL();
- }
-}
-
-void OpenGLView::AddToInstance(const Instance& instance) {
- if (context_.get() && context_->is_valid()) {
- // This view already belongs to a context, do nothing.
- return;
- }
- SharedOpenGLContext shared_context(new OpenGLContext(instance));
- shared_context->InitializeOpenGL();
- SetOpenGLContext(shared_context);
-}
-
-void OpenGLView::SetSize(int32_t width, int32_t height) {
- width_ = std::max(static_cast<int32_t>(1), width);
- height_ = std::max(static_cast<int32_t>(1), height);
- assert(context_.get());
- if (context_.get() && context_->is_valid())
- context_->MakeContextCurrent();
- ResizeViewport();
-}
-
-} // namespace c_salt
« no previous file with comments | « experimental/c_salt/opengl_view.h ('k') | experimental/c_salt/opengl_view_ptrs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698