Flutter Engine
The Flutter Engine
ImageSlide.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 ImageSlide_DEFINED
9#define ImageSlide_DEFINED
10
14#include "include/core/SkSize.h"
16#include "tools/viewer/Slide.h"
17
18class SkCanvas;
19
20class ImageSlide : public Slide {
21public:
22 ImageSlide(const SkString& name, const SkString& path);
24
25 SkISize getDimensions() const override;
26
27 void draw(SkCanvas* canvas) override;
28 void load(SkScalar winWidth, SkScalar winHeight) override;
29 void unload() override;
30
31private:
32 SkString fPath;
33 sk_sp<SkImage> fImage;
34 bool fRetainImage = false;
35};
36
37#endif
SkISize getDimensions() const override
Definition: ImageSlide.cpp:26
ImageSlide(const SkString &name, const SkString &path)
Definition: ImageSlide.cpp:17
void unload() override
Definition: ImageSlide.cpp:44
void load(SkScalar winWidth, SkScalar winHeight) override
Definition: ImageSlide.cpp:35
void draw(SkCanvas *canvas) override
Definition: ImageSlide.cpp:30
Definition: Slide.h:29
float SkScalar
Definition: extension.cpp:12
sk_sp< const SkImage > image
Definition: SkRecords.h:269
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: SkSize.h:16