aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/viewer/SKPSlide.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/SKPSlide.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/SKPSlide.h')
-rw-r--r--tools/viewer/SKPSlide.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/viewer/SKPSlide.h b/tools/viewer/SKPSlide.h
new file mode 100644
index 0000000000..42845fa30d
--- /dev/null
+++ b/tools/viewer/SKPSlide.h
@@ -0,0 +1,31 @@
+/*
+* 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 SKPSlide_DEFINED
+#define SKPSlide_DEFINED
+
+#include "Slide.h"
+#include "SkPicture.h"
+
+class SKPSlide : public Slide {
+public:
+ SKPSlide(const SkString& name, const SkString& path);
+ ~SKPSlide() override;
+
+ SkISize getDimensions() const override { return fCullRect.size(); }
+
+ void draw(SkCanvas* canvas) override;
+ void load() override;
+ void unload() override;
+
+private:
+ SkString fPath;
+ sk_sp<const SkPicture> fPic;
+ SkIRect fCullRect;
+};
+
+#endif