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

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

Issue 1873453002: Some more improvements/fixes to the VulkanViewer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 4 years, 8 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/Window.cpp ('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
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 VulkanViewer_DEFINED 8 #ifndef VulkanViewer_DEFINED
9 #define VulkanViewer_DEFINED 9 #define VulkanViewer_DEFINED
10 10
11 #include "../Application.h" 11 #include "../Application.h"
12 #include "../Window.h" 12 #include "../Window.h"
13 #include "gm.h" 13 #include "gm.h"
14 14
15 class SkCanvas; 15 class SkCanvas;
16 16
17 class VulkanViewer : public Application { 17 class VulkanViewer : public Application {
18 public: 18 public:
19 VulkanViewer(int argc, char** argv, void* platformData); 19 VulkanViewer(int argc, char** argv, void* platformData);
20 ~VulkanViewer() override; 20 ~VulkanViewer() override;
21 21
22 bool onKey(Window::Key key, Window::InputState state, uint32_t modifiers); 22 bool onKey(Window::Key key, Window::InputState state, uint32_t modifiers);
23 void onPaint(SkCanvas* canvas); 23 void onPaint(SkCanvas* canvas);
24 24
25 void onIdle(float dt) override; 25 void onIdle(double ms) override;
26 26
27 private: 27 private:
28 void drawStats(SkCanvas* canvas);
29
28 Window* fWindow; 30 Window* fWindow;
29 31
32 static const int kMeasurementCount = 64; // should be power of 2 for fast m od
33 double fMeasurements[kMeasurementCount];
34 int fCurrentMeasurement;
35
30 const skiagm::GMRegistry* fGMs; 36 const skiagm::GMRegistry* fGMs;
31 }; 37 };
32 38
33 39
34 #endif 40 #endif
OLDNEW
« no previous file with comments | « tools/vulkan/Window.cpp ('k') | tools/vulkan/viewer/VulkanViewer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698