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