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

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

Issue 1631993002: Cleaning up trailing spaces and typos. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « include/gpu/SkGr.h ('k') | src/effects/SkBlurMaskFilter.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 #include "SkMipMap.h" 8 #include "SkMipMap.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 350
351 if (level > fCount) { 351 if (level > fCount) {
352 level = fCount; 352 level = fCount;
353 } 353 }
354 if (levelPtr) { 354 if (levelPtr) {
355 *levelPtr = fLevels[level - 1]; 355 *levelPtr = fLevels[level - 1];
356 } 356 }
357 return true; 357 return true;
358 } 358 }
359 359
360 // Helper which extacts a pixmap from the src bitmap 360 // Helper which extracts a pixmap from the src bitmap
361 // 361 //
362 SkMipMap* SkMipMap::Build(const SkBitmap& src, SkDiscardableFactoryProc fact) { 362 SkMipMap* SkMipMap::Build(const SkBitmap& src, SkDiscardableFactoryProc fact) {
363 SkAutoPixmapUnlock srcUnlocker; 363 SkAutoPixmapUnlock srcUnlocker;
364 if (!src.requestLock(&srcUnlocker)) { 364 if (!src.requestLock(&srcUnlocker)) {
365 return nullptr; 365 return nullptr;
366 } 366 }
367 const SkPixmap& srcPixmap = srcUnlocker.pixmap(); 367 const SkPixmap& srcPixmap = srcUnlocker.pixmap();
368 // Try to catch where we might have returned nullptr for src crbug.com/49281 8 368 // Try to catch where we might have returned nullptr for src crbug.com/49281 8
369 if (nullptr == srcPixmap.addr()) { 369 if (nullptr == srcPixmap.addr()) {
370 sk_throw(); 370 sk_throw();
371 } 371 }
372 return Build(srcPixmap, fact); 372 return Build(srcPixmap, fact);
373 } 373 }
374 374
OLDNEW
« no previous file with comments | « include/gpu/SkGr.h ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698