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

Side by Side Diff: include/effects/SkImageSource.h

Issue 1343703005: SkImageSource (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: kRO_LegacyBitmapMode Created 5 years, 3 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
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 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 SkImageSource_DEFINED
9 #define SkImageSource_DEFINED
10
11 #include "SkImageFilter.h"
12
13 class SkImage;
14
15 class SK_API SkImageSource : public SkImageFilter {
16 public:
17 static SkImageSource* Create(const SkImage*);
18 static SkImageSource* Create(const SkImage*,
19 const SkRect& srcRect,
20 const SkRect& dstRect,
21 SkFilterQuality = kHigh_SkFilterQuality);
Stephen White 2015/09/14 18:39:27 API Q for reed@: since we have the chance, should
f(malita) 2015/09/14 19:19:35 Up to reed@, but SGTM. Updated.
22
23 void computeFastBounds(const SkRect& src, SkRect* dst) const override;
24
25 SK_TO_STRING_OVERRIDE()
26 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkImageSource)
27
28 protected:
29 void flatten(SkWriteBuffer&) const override;
30
31 bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
32 SkBitmap* result, SkIPoint* offset) const override;
33
34 private:
35 explicit SkImageSource(const SkImage*);
36 explicit SkImageSource(const SkImage*,
Stephen White 2015/09/14 18:39:27 Nit: explicit is unnecessary here?
f(malita) 2015/09/14 19:19:35 Done.
37 const SkRect& srcRect,
38 const SkRect& dstRect,
39 SkFilterQuality);
40
41 SkAutoTUnref<const SkImage> fImage;
42 SkRect fSrcRect, fDstRect;
43 SkFilterQuality fFilterQuality;
44
45 typedef SkImageFilter INHERITED;
46 };
47
48 #endif
OLDNEW
« no previous file with comments | « gyp/effects.gypi ('k') | src/core/SkPictureData.cpp » ('j') | src/effects/SkImageSource.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698