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

Unified Diff: mojo/examples/sample_app/sample_gles2_delegate.cc

Issue 101413002: [Mojo] Remove dependency between mojo/public and gpu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years 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 | « mojo/examples/sample_app/sample_gles2_delegate.h ('k') | mojo/gles2/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/sample_app/sample_gles2_delegate.cc
diff --git a/mojo/examples/sample_app/sample_gles2_delegate.cc b/mojo/examples/sample_app/sample_gles2_delegate.cc
deleted file mode 100644
index 4bac0225141f0905481863f42edee9cab8d395a2..0000000000000000000000000000000000000000
--- a/mojo/examples/sample_app/sample_gles2_delegate.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2013 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 "mojo/examples/sample_app/sample_gles2_delegate.h"
-
-#include <stdio.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-namespace mojo {
-namespace examples {
-
-SampleGLES2Delegate::SampleGLES2Delegate()
- : gl_(NULL) {
-}
-
-SampleGLES2Delegate::~SampleGLES2Delegate() {
-}
-
-void SampleGLES2Delegate::DidCreateContext(
- GLES2ClientImpl* gl, uint32_t width, uint32_t height) {
- gl_ = gl;
- cube_.Init(width, height);
- last_time_ = base::Time::Now();
- timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(16),
- this, &SampleGLES2Delegate::Draw);
-}
-
-void SampleGLES2Delegate::Draw() {
- base::Time now = base::Time::Now();
- base::TimeDelta offset = now - last_time_;
- last_time_ = now;
- cube_.Update(offset.InSecondsF());
- cube_.Draw();
- gl_->SwapBuffers();
-}
-
-void SampleGLES2Delegate::ContextLost(GLES2ClientImpl* gl) {
- gl_ = NULL;
- timer_.Stop();
-}
-
-} // namespace examples
-} // namespace mojo
« no previous file with comments | « mojo/examples/sample_app/sample_gles2_delegate.h ('k') | mojo/gles2/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698