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 "SkBitmapScaler.h" | 8 #include "SkBitmapScaler.h" |
9 #include "SkBitmapFilter.h" | 9 #include "SkBitmapFilter.h" |
| 10 #include "SkConvolver.h" |
| 11 #include "SkImageInfo.h" |
| 12 #include "SkPixmap.h" |
10 #include "SkRect.h" | 13 #include "SkRect.h" |
| 14 #include "SkScalar.h" |
11 #include "SkTArray.h" | 15 #include "SkTArray.h" |
12 #include "SkErrorInternals.h" | |
13 #include "SkConvolver.h" | |
14 | 16 |
15 // SkResizeFilter --------------------------------------------------------------
-- | 17 // SkResizeFilter --------------------------------------------------------------
-- |
16 | 18 |
17 // Encapsulates computation and storage of the filters required for one complete | 19 // Encapsulates computation and storage of the filters required for one complete |
18 // resize operation. | 20 // resize operation. |
19 class SkResizeFilter { | 21 class SkResizeFilter { |
20 public: | 22 public: |
21 SkResizeFilter(SkBitmapScaler::ResizeMethod method, | 23 SkResizeFilter(SkBitmapScaler::ResizeMethod method, |
22 int srcFullWidth, int srcFullHeight, | 24 int srcFullWidth, int srcFullHeight, |
23 float destWidth, float destHeight, | 25 float destWidth, float destHeight, |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 static_cast<int>(result.rowBytes()), | 305 static_cast<int>(result.rowBytes()), |
304 static_cast<unsigned char*>(result.getPixels()), | 306 static_cast<unsigned char*>(result.getPixels()), |
305 convolveProcs, true); | 307 convolveProcs, true); |
306 | 308 |
307 *resultPtr = result; | 309 *resultPtr = result; |
308 resultPtr->lockPixels(); | 310 resultPtr->lockPixels(); |
309 SkASSERT(resultPtr->getPixels()); | 311 SkASSERT(resultPtr->getPixels()); |
310 return true; | 312 return true; |
311 } | 313 } |
312 | 314 |
OLD | NEW |