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

Side by Side Diff: tools/viewer/Viewer.h

Issue 2016343002: Revert of Add drawer with state information (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef Viewer_DEFINED 8 #ifndef Viewer_DEFINED
9 #define Viewer_DEFINED 9 #define Viewer_DEFINED
10 10
11 #include "sk_app/Application.h" 11 #include "sk_app/Application.h"
12 #include "sk_app/CommandSet.h" 12 #include "sk_app/CommandSet.h"
13 #include "sk_app/Window.h" 13 #include "sk_app/Window.h"
14 #include "gm.h" 14 #include "gm.h"
15 #include "SkAnimTimer.h" 15 #include "SkAnimTimer.h"
16 #include "Slide.h" 16 #include "Slide.h"
17 17
18 class SkCanvas; 18 class SkCanvas;
19 19
20 class Viewer : public sk_app::Application { 20 class Viewer : public sk_app::Application {
21 public: 21 public:
22 Viewer(int argc, char** argv, void* platformData); 22 Viewer(int argc, char** argv, void* platformData);
23 ~Viewer() override; 23 ~Viewer() override;
24 24
25 void onPaint(SkCanvas* canvas); 25 void onPaint(SkCanvas* canvas);
26 void onIdle(double ms) override; 26 void onIdle(double ms) override;
27 bool onTouch(int owner, sk_app::Window::InputState state, float x, float y); 27 bool onTouch(int owner, sk_app::Window::InputState state, float x, float y);
28 void onUIStateChanged(const SkString& stateName, const SkString& stateValue) ;
29 28
30 private: 29 private:
31 void initSlides(); 30 void initSlides();
32 void updateTitle(); 31 void updateTitle();
33 void setupCurrentSlide(int previousSlide); 32 void setupCurrentSlide(int previousSlide);
34 33
35 void updateUIState();
36
37 void drawStats(SkCanvas* canvas); 34 void drawStats(SkCanvas* canvas);
38 35
39 void changeZoomLevel(float delta); 36 void changeZoomLevel(float delta);
40 SkMatrix computeMatrix(); 37 SkMatrix computeMatrix();
41 38
42 sk_app::Window* fWindow; 39 sk_app::Window* fWindow;
43 40
44 static const int kMeasurementCount = 64; // should be power of 2 for fast m od 41 static const int kMeasurementCount = 64; // should be power of 2 for fast m od
45 double fMeasurements[kMeasurementCount]; 42 double fMeasurements[kMeasurementCount];
46 int fCurrentMeasurement; 43 int fCurrentMeasurement;
(...skipping 16 matching lines...) Expand all
63 60
64 SkTouchGesture fGesture; 61 SkTouchGesture fGesture;
65 62
66 // identity unless the window initially scales the content to fit the screen . 63 // identity unless the window initially scales the content to fit the screen .
67 SkMatrix fDefaultMatrix; 64 SkMatrix fDefaultMatrix;
68 SkMatrix fDefaultMatrixInv; 65 SkMatrix fDefaultMatrixInv;
69 }; 66 };
70 67
71 68
72 #endif 69 #endif
OLDNEW
« no previous file with comments | « platform_tools/android/apps/viewer/src/main/res/values/strings.xml ('k') | tools/viewer/Viewer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698