OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2012 The Android Open Source Project | 2 * Copyright 2012 The Android Open Source Project |
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 SkBitmapSource_DEFINED | 8 #ifndef SkBitmapSource_DEFINED |
9 #define SkBitmapSource_DEFINED | 9 #define SkBitmapSource_DEFINED |
10 | 10 |
11 #include "SkImageFilter.h" | 11 #include "SkImageFilter.h" |
12 #include "SkBitmap.h" | 12 #include "SkBitmap.h" |
13 | 13 |
14 class SK_API SkBitmapSource : public SkImageFilter { | 14 class SK_API SkBitmapSource : public SkImageFilter { |
15 public: | 15 public: |
16 explicit SkBitmapSource(const SkBitmap& bitmap); | 16 explicit SkBitmapSource(const SkBitmap& bitmap, const SkRect* srcRect = NULL , const SkRect* dstRect = NULL); |
reed1
2013/12/05 18:48:25
Two option params + explicit?
Can we make two (at
Stephen White
2013/12/05 18:59:54
Yep, explicit is still needed since call sites of
| |
17 | 17 |
18 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBitmapSource) | 18 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBitmapSource) |
19 | 19 |
20 protected: | 20 protected: |
21 explicit SkBitmapSource(SkFlattenableReadBuffer& buffer); | 21 explicit SkBitmapSource(SkFlattenableReadBuffer& buffer); |
22 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; | 22 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; |
23 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, | 23 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, |
24 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE; | 24 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE; |
25 | 25 |
26 private: | 26 private: |
27 SkBitmap fBitmap; | 27 SkBitmap fBitmap; |
28 SkRect fSrcRect, fDstRect; | |
28 typedef SkImageFilter INHERITED; | 29 typedef SkImageFilter INHERITED; |
29 }; | 30 }; |
30 | 31 |
31 #endif | 32 #endif |
OLD | NEW |