Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1389)

Side by Side Diff: src/core/SkBitmapScaler.h

Issue 1588653002: Allow Resize to be called w/ a preallocated pixmap (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update dox, clarifying dst's treatment Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/core/SkBitmapScaler.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 #ifndef SkBitmapScaler_DEFINED 8 #ifndef SkBitmapScaler_DEFINED
9 #define SkBitmapScaler_DEFINED 9 #define SkBitmapScaler_DEFINED
10 10
(...skipping 11 matching lines...) Expand all
22 RESIZE_BOX, 22 RESIZE_BOX,
23 RESIZE_TRIANGLE, 23 RESIZE_TRIANGLE,
24 RESIZE_LANCZOS3, 24 RESIZE_LANCZOS3,
25 RESIZE_HAMMING, 25 RESIZE_HAMMING,
26 RESIZE_MITCHELL, 26 RESIZE_MITCHELL,
27 27
28 RESIZE_FirstMethod = RESIZE_BOX, 28 RESIZE_FirstMethod = RESIZE_BOX,
29 RESIZE_LastMethod = RESIZE_MITCHELL, 29 RESIZE_LastMethod = RESIZE_MITCHELL,
30 }; 30 };
31 31
32 /**
33 * Given already-allocated src and dst pixmaps, this will scale the src pix els using the
34 * specified resize-method and write the results into the pixels pointed to by dst.
35 */
36 static bool Resize(const SkPixmap& dst, const SkPixmap& src, ResizeMethod me thod);
37
38 /**
39 * Helper function that manages allocating a bitmap to hold the dst pixels, and then calls
40 * the pixmap version of Resize.
41 */
32 static bool Resize(SkBitmap* result, const SkPixmap& src, ResizeMethod metho d, 42 static bool Resize(SkBitmap* result, const SkPixmap& src, ResizeMethod metho d,
33 int dest_width, int dest_height, SkBitmap::Allocator* = n ullptr); 43 int dest_width, int dest_height, SkBitmap::Allocator* = n ullptr);
34 44
35 /** Platforms can also optionally overwrite the convolution functions 45 /** Platforms can also optionally overwrite the convolution functions
36 if we have SIMD versions of them. 46 if we have SIMD versions of them.
37 */ 47 */
38 48
39 static void PlatformConvolutionProcs(SkConvolutionProcs*); 49 static void PlatformConvolutionProcs(SkConvolutionProcs*);
40 }; 50 };
41 51
42 #endif 52 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkBitmapScaler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698