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 11 #include "Slide.h" 12 #include "SkPicture.h" 13 #include "SkImage.h" 14 15 class ImageSlide : public Slide { 16 public: 17 ImageSlide(const SkString& name, const SkString& path); 18 19 SkISize getDimensions() const override; 20 21 void draw(SkCanvas* canvas) override; 22 void load(SkScalar winWidth, SkScalar winHeight) override; 23 void unload() override; 24 25 private: 26 SkString fPath; 27 sk_sp<SkImage> fImage; 28 }; 29 30 #endif 31