blob: 293a052f6ead21d2cc7e789efa4272fff9cb0182 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkImageSource_DEFINED
#define SkImageSource_DEFINED
#include "SkImageFilter.h"
class SkImage;
class SK_API SkImageSource : public SkImageFilter {
public:
static SkImageFilter* Create(SkImage*);
static SkImageFilter* Create(SkImage*,
const SkRect& srcRect,
const SkRect& dstRect,
SkFilterQuality);
SkRect computeFastBounds(const SkRect& src) const override;
SK_TO_STRING_OVERRIDE()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkImageSource)
protected:
void flatten(SkWriteBuffer&) const override;
SkSpecialImage* onFilterImage(SkSpecialImage* source, const Context&,
SkIPoint* offset) const override;
private:
explicit SkImageSource(SkImage*);
SkImageSource(SkImage*,
const SkRect& srcRect,
const SkRect& dstRect,
SkFilterQuality);
sk_sp<SkImage> fImage;
SkRect fSrcRect, fDstRect;
SkFilterQuality fFilterQuality;
typedef SkImageFilter INHERITED;
};
#endif
|