Debian Codegraph @

tools/viewer/CaptureSlide.h

raw
1 /*
2 * Copyright 2025 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 CaptureSlide_DEFINED
9 #define CaptureSlide_DEFINED
10
11 #include "include/core/SkRect.h"
12 #include "include/core/SkRefCnt.h"
13 #include "include/core/SkScalar.h"
14 #include "include/core/SkSize.h"
15 #include "src/capture/SkCapture.h"
16 #include "tools/viewer/Slide.h"
17
18 class SkCanvas;
19 class SkPicture;
20 class SkStream;
21 class SkString;
22
23 class CaptureSlide : public Slide {
24 public:
25 CaptureSlide(const SkString& name, const SkString& path);
26 ~CaptureSlide() override;
27
28 SkISize getDimensions() const override;
29
30 void draw(SkCanvas* canvas) override;
31 bool animate(double) override;
32 void load(SkScalar winWidth, SkScalar winHeight) override;
33 void unload() override;
34
35 bool onChar(SkUnichar) override;
36
37 private:
38 sk_sp<SkCapture> fCapture;
39 int fCurrentPictureIndex = 0;
40 bool fInvalidate = false;
41 SkCapture::Metadata fMetadata;
42 };
43
44 #endif