aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/viewer/Slide.h
diff options
context:
space:
mode:
authorGravatar jvanverth <jvanverth@google.com>2016-05-05 12:32:03 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-05 12:32:03 -0700
commita8d0d6c8bad00e713bc33e5f0d47ca4fec104433 (patch)
tree8f78250c57c9c9d96f8e2fac7864630c97fe3cb9 /tools/viewer/Slide.h
parent2d1ee7936e3536e45c963db004e3b512bb415fd8 (diff)
More refactoring for Viewer
* Move support files into sk_app and main files up to top directory * Rename VulkanTestContext and create WindowContext parent class * Place VulkanWindowContext et al. in sk_app namespace. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1944413005 Review-Url: https://codereview.chromium.org/1944413005
Diffstat (limited to 'tools/viewer/Slide.h')
-rw-r--r--tools/viewer/Slide.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/tools/viewer/Slide.h b/tools/viewer/Slide.h
new file mode 100644
index 0000000000..cdc225b0a8
--- /dev/null
+++ b/tools/viewer/Slide.h
@@ -0,0 +1,36 @@
+/*
+* Copyright 2016 Google Inc.
+*
+* Use of this source code is governed by a BSD-style license that can be
+* found in the LICENSE file.
+*/
+
+#ifndef Slide_DEFINED
+#define Slide_DEFINED
+
+#include "SkRefCnt.h"
+#include "SkSize.h"
+#include "SkString.h"
+
+class SkCanvas;
+class SkAnimTimer;
+
+class Slide : public SkRefCnt {
+public:
+ virtual ~Slide() {}
+
+ virtual SkISize getDimensions() const = 0;
+
+ virtual void draw(SkCanvas* canvas) = 0;
+ virtual bool animate(const SkAnimTimer&) { return false; }
+ virtual void load() {}
+ virtual void unload() {}
+
+ SkString getName() { return fName; }
+
+protected:
+ SkString fName;
+};
+
+
+#endif