OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #include "SkBitmapSourceDeserializer.h" | 8 #include "SkBitmapSourceDeserializer.h" |
9 | 9 |
10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 } | 22 } |
23 SkRect src, dst; | 23 SkRect src, dst; |
24 buffer.readRect(&src); | 24 buffer.readRect(&src); |
25 buffer.readRect(&dst); | 25 buffer.readRect(&dst); |
26 SkBitmap bitmap; | 26 SkBitmap bitmap; |
27 if (!buffer.readBitmap(&bitmap)) { | 27 if (!buffer.readBitmap(&bitmap)) { |
28 return nullptr; | 28 return nullptr; |
29 } | 29 } |
30 bitmap.setImmutable(); | 30 bitmap.setImmutable(); |
31 | 31 |
32 return SkImageSource::Create(SkImage::MakeFromBitmap(bitmap).get(), src, dst
, filterQuality); | 32 return SkImageSource::Make(SkImage::MakeFromBitmap(bitmap), src, dst, filter
Quality).release(); |
33 } | 33 } |
OLD | NEW |