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

Side by Side Diff: ppapi/examples/compositor/spinning_cube.h

Issue 331123003: Revert 277208 "[PPAPI] Compositor API implementation." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/examples/compositor/compositor.html ('k') | ppapi/examples/compositor/spinning_cube.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef PPAPI_EXAMPLES_GLES2_SPINNING_CUBE_SPINNING_CUBE_H_
6 #define PPAPI_EXAMPLES_GLES2_SPINNING_CUBE_SPINNING_CUBE_H_
7
8 #include "ppapi/c/pp_stdint.h"
9
10 class SpinningCube {
11 public:
12 SpinningCube();
13 ~SpinningCube();
14
15 void Init(uint32_t width, uint32_t height);
16 void set_direction(int direction) { direction_ = direction; }
17 void SetFlingMultiplier(float drag_distance, float drag_time);
18 void UpdateForTimeDelta(float delta_time);
19 void UpdateForDragDistance(float distance);
20 void Draw();
21
22 void OnGLContextLost();
23
24 private:
25 class GLState;
26
27 // Disallow copy and assign.
28 SpinningCube(const SpinningCube& other);
29 SpinningCube& operator=(const SpinningCube& other);
30
31 void Update();
32
33 bool initialized_;
34 uint32_t width_;
35 uint32_t height_;
36 // Owned ptr.
37 GLState* state_;
38 float fling_multiplier_;
39 int direction_;
40 };
41
42 #endif // PPAPI_EXAMPLES_GLES2_SPINNING_CUBE_SPINNING_CUBE_H_
OLDNEW
« no previous file with comments | « ppapi/examples/compositor/compositor.html ('k') | ppapi/examples/compositor/spinning_cube.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698