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

Side by Side Diff: tools/vulkan/viewer/VulkanViewer.h

Issue 1945103003: Rename VulkanViewer to Viewer, take 2. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix android path Created 4 years, 7 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
« no previous file with comments | « tools/vulkan/viewer/Slide.h ('k') | tools/vulkan/viewer/VulkanViewer.cpp » ('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 /*
2 * Copyright 2016 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef VulkanViewer_DEFINED
9 #define VulkanViewer_DEFINED
10
11 #include "../Application.h"
12 #include "../Window.h"
13 #include "gm.h"
14 #include "SkAnimTimer.h"
15 #include "Slide.h"
16
17 class SkCanvas;
18
19 class VulkanViewer : public Application {
20 public:
21 VulkanViewer(int argc, char** argv, void* platformData);
22 ~VulkanViewer() override;
23
24 bool onKey(Window::Key key, Window::InputState state, uint32_t modifiers);
25 bool onChar(SkUnichar, uint32_t modifiers);
26 void onPaint(SkCanvas* canvas);
27 void onIdle(double ms) override;
28
29 private:
30 void initSlides();
31 void setupCurrentSlide(int previousSlide);
32
33 void drawStats(SkCanvas* canvas);
34
35 void changeZoomLevel(float delta);
36 void updateMatrix();
37
38 Window* fWindow;
39
40 static const int kMeasurementCount = 64; // should be power of 2 for fast m od
41 double fMeasurements[kMeasurementCount];
42 int fCurrentMeasurement;
43
44 SkAnimTimer fAnimTimer;
45 SkTArray<sk_sp<Slide>> fSlides;
46 int fCurrentSlide;
47
48 bool fDisplayStats;
49
50 // transform data
51 SkMatrix fLocalMatrix;
52 SkScalar fZoomCenterX;
53 SkScalar fZoomCenterY;
54 SkScalar fZoomLevel;
55 SkScalar fZoomScale;
56
57 };
58
59
60 #endif
OLDNEW
« no previous file with comments | « tools/vulkan/viewer/Slide.h ('k') | tools/vulkan/viewer/VulkanViewer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698