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

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

Issue 20102002: free cache in destructor, in case endContext was not called. change Resize to return bool indicatin… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkBitmapProcState.cpp ('k') | 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 }; 80 };
81 81
82 // Resizes the given source bitmap using the specified resize method, so tha t 82 // Resizes the given source bitmap using the specified resize method, so tha t
83 // the entire image is (dest_size) big. The dest_subset is the rectangle in 83 // the entire image is (dest_size) big. The dest_subset is the rectangle in
84 // this destination image that should actually be returned. 84 // this destination image that should actually be returned.
85 // 85 //
86 // The output image will be (dest_subset.width(), dest_subset.height()). Thi s 86 // The output image will be (dest_subset.width(), dest_subset.height()). Thi s
87 // will save work if you do not need the entire bitmap. 87 // will save work if you do not need the entire bitmap.
88 // 88 //
89 // The destination subset must be smaller than the destination image. 89 // The destination subset must be smaller than the destination image.
90 static SkBitmap Resize(const SkBitmap& source, 90 static bool Resize(SkBitmap* result,
91 ResizeMethod method, 91 const SkBitmap& source,
92 int dest_width, int dest_height, 92 ResizeMethod method,
93 const SkIRect& dest_subset, 93 int dest_width, int dest_height,
94 SkConvolutionProcs *convolveProcs = NULL, 94 const SkIRect& dest_subset,
95 SkBitmap::Allocator* allocator = NULL); 95 SkConvolutionProcs *convolveProcs = NULL,
96 SkBitmap::Allocator* allocator = NULL);
96 97
97 // Alternate version for resizing and returning the entire bitmap rather tha n 98 // Alternate version for resizing and returning the entire bitmap rather tha n
98 // a subset. 99 // a subset.
99 static SkBitmap Resize(const SkBitmap& source, 100 static bool Resize(SkBitmap* result,
100 ResizeMethod method, 101 const SkBitmap& source,
101 int dest_width, int dest_height, 102 ResizeMethod method,
102 SkConvolutionProcs *convolveProcs = NULL, 103 int dest_width, int dest_height,
103 SkBitmap::Allocator* allocator = NULL); 104 SkConvolutionProcs *convolveProcs = NULL,
105 SkBitmap::Allocator* allocator = NULL);
104 }; 106 };
105 107
106 #endif 108 #endif
OLDNEW
« no previous file with comments | « src/core/SkBitmapProcState.cpp ('k') | src/core/SkBitmapScaler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698