Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: tools/viewer/ImageSlide.h

Issue 2056343004: Add samples to Viewer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add samples.gypi Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/fonts/SkTestScalerContext.cpp ('k') | tools/viewer/ImageSlide.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef ImageSlide_DEFINED 8 #ifndef ImageSlide_DEFINED
9 #define ImageSlide_DEFINED 9 #define ImageSlide_DEFINED
10 10
11 #include "Slide.h" 11 #include "Slide.h"
12 #include "SkPicture.h" 12 #include "SkPicture.h"
13 #include "SkImage.h" 13 #include "SkImage.h"
14 14
15 static const char* kImageColorXformMetaData = "ImageColorSpaceXform"; 15 static const char* kImageColorXformMetaData = "ImageColorSpaceXform";
16 16
17 class ImageSlide : public Slide { 17 class ImageSlide : public Slide {
18 public: 18 public:
19 ImageSlide(const SkString& name, const SkString& path); 19 ImageSlide(const SkString& name, const SkString& path);
20 20
21 SkISize getDimensions() const override; 21 SkISize getDimensions() const override;
22 22
23 void draw(SkCanvas* canvas) override; 23 void draw(SkCanvas* canvas) override;
24 void load() override; 24 void load(SkScalar winWidth, SkScalar winHeight) override;
25 void unload() override; 25 void unload() override;
26 26
27 private: 27 private:
28 SkString fPath; 28 SkString fPath;
29 sk_sp<const SkImage> fImage; 29 sk_sp<const SkImage> fImage;
30 SkBitmap fOriginalBitmap; 30 SkBitmap fOriginalBitmap;
31 SkBitmap fXformedBitmap; 31 SkBitmap fXformedBitmap;
32 }; 32 };
33 33
34 #endif 34 #endif
OLDNEW
« no previous file with comments | « src/fonts/SkTestScalerContext.cpp ('k') | tools/viewer/ImageSlide.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698