Flutter Engine
The Flutter Engine
SKPSlide.h
Go to the documentation of this file.
1/*
2* Copyright 2016 Google Inc.
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 SKPSlide_DEFINED
9#define SKPSlide_DEFINED
10
11#include "include/core/SkRect.h"
14#include "include/core/SkSize.h"
15#include "tools/viewer/Slide.h"
16
17#include <memory>
18
19class SkCanvas;
20class SkPicture;
21class SkStream;
22class SkString;
23
24class SKPSlide : public Slide {
25public:
26 SKPSlide(const SkString& name, const SkString& path);
27 SKPSlide(const SkString& name, std::unique_ptr<SkStream>);
28 ~SKPSlide() override;
29
30 SkISize getDimensions() const override { return fCullRect.size(); }
31
32 void draw(SkCanvas* canvas) override;
33 void load(SkScalar winWidth, SkScalar winHeight) override;
34 void unload() override;
35
36private:
37 std::unique_ptr<SkStream> fStream;
39 SkIRect fCullRect;
40};
41
42#endif
void draw(SkCanvas *canvas) override
Definition: SKPSlide.cpp:30
void unload() override
Definition: SKPSlide.cpp:60
SKPSlide(const SkString &name, const SkString &path)
Definition: SKPSlide.cpp:19
void load(SkScalar winWidth, SkScalar winHeight) override
Definition: SKPSlide.cpp:46
SkISize getDimensions() const override
Definition: SKPSlide.h:30
~SKPSlide() override
Definition: SKPSlide.cpp:28
Definition: Slide.h:29
float SkScalar
Definition: extension.cpp:12
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition: switches.h:57
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32
Definition: SkRect.h:32
constexpr SkISize size() const
Definition: SkRect.h:172
Definition: SkSize.h:16