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

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

Issue 1177173003: remove unused private Resizer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 | « src/core/SkBitmapScaler.h ('k') | no next file » | 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 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" 10 #include "SkRect.h"
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 static_cast<int>(result.rowBytes()), 311 static_cast<int>(result.rowBytes()),
312 static_cast<unsigned char*>(result.getPixels()), 312 static_cast<unsigned char*>(result.getPixels()),
313 convolveProcs, true); 313 convolveProcs, true);
314 314
315 *resultPtr = result; 315 *resultPtr = result;
316 resultPtr->lockPixels(); 316 resultPtr->lockPixels();
317 SkASSERT(resultPtr->getPixels()); 317 SkASSERT(resultPtr->getPixels());
318 return true; 318 return true;
319 } 319 }
320 320
321 // static -- simpler interface to the resizer; returns a default bitmap if scali ng
322 // fails for any reason. This is the interface that Chrome expects.
323 SkBitmap SkBitmapScaler::Resize(const SkBitmap& source,
324 ResizeMethod method,
325 float destWidth, float destHeight,
326 SkBitmap::Allocator* allocator) {
327 SkBitmap result;
328 if (!Resize(&result, source, method, destWidth, destHeight, allocator)) {
329 return SkBitmap();
330 }
331 return result;
332 }
OLDNEW
« no previous file with comments | « src/core/SkBitmapScaler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698