blob: 4c4d95e32f0103590f0973beda8fb1d13df75439 [file] [log] [blame]
Brian Osmand927bd22019-12-18 11:23:12 -05001/*
2* Copyright 2019 Google LLC
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 SkSLSlide_DEFINED
9#define SkSLSlide_DEFINED
10
11#include "tools/viewer/Slide.h"
12
13#include "src/core/SkRuntimeEffect.h"
14
15class SkSLSlide : public Slide {
16public:
17 SkSLSlide();
18
19 // TODO: We need a way for primarily interactive slides to always be as large as the window
20 SkISize getDimensions() const override { return SkISize::MakeEmpty(); }
21
22 void draw(SkCanvas* canvas) override;
23
24 bool rebuild();
25
26private:
27 SkString fSkSL;
28 sk_sp<SkRuntimeEffect> fEffect;
29 SkAutoTMalloc<char> fInputs;
30};
31
32#endif