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 #include "SkBitmapSource.h" | 8 #include "SkBitmapSource.h" |
9 | 9 |
10 SkBitmapSource::SkBitmapSource(const SkBitmap& bitmap) | 10 SkBitmapSource::SkBitmapSource(const SkBitmap& bitmap) |
11 : INHERITED(0), | 11 : INHERITED(0, 0), |
12 fBitmap(bitmap) { | 12 fBitmap(bitmap) { |
13 } | 13 } |
14 | 14 |
15 SkBitmapSource::SkBitmapSource(SkFlattenableReadBuffer& buffer) | 15 SkBitmapSource::SkBitmapSource(SkFlattenableReadBuffer& buffer) |
16 : INHERITED(buffer) { | 16 : INHERITED(0, buffer) { |
17 fBitmap.unflatten(buffer); | 17 fBitmap.unflatten(buffer); |
18 } | 18 } |
19 | 19 |
20 void SkBitmapSource::flatten(SkFlattenableWriteBuffer& buffer) const { | 20 void SkBitmapSource::flatten(SkFlattenableWriteBuffer& buffer) const { |
21 this->INHERITED::flatten(buffer); | 21 this->INHERITED::flatten(buffer); |
22 fBitmap.flatten(buffer); | 22 fBitmap.flatten(buffer); |
23 } | 23 } |
24 | 24 |
25 bool SkBitmapSource::onFilterImage(Proxy*, const SkBitmap&, const SkMatrix&, | 25 bool SkBitmapSource::onFilterImage(Proxy*, const SkBitmap&, const SkMatrix&, |
26 SkBitmap* result, SkIPoint* offset) { | 26 SkBitmap* result, SkIPoint* offset) { |
27 *result = fBitmap; | 27 *result = fBitmap; |
28 return true; | 28 return true; |
29 } | 29 } |
OLD | NEW |