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

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

Issue 234243002: Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 8 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/SkDraw.cpp ('k') | src/core/SkSpriteBlitter_ARGB32.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 "SkScaledImageCache.h" 8 #include "SkScaledImageCache.h"
9 #include "SkMipMap.h" 9 #include "SkMipMap.h"
10 #include "SkOnce.h" 10 #include "SkOnce.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 if (0 == size) { 270 if (0 == size) {
271 return false; 271 return false;
272 } 272 }
273 273
274 SkDiscardableMemory* dm = fFactory(size); 274 SkDiscardableMemory* dm = fFactory(size);
275 if (NULL == dm) { 275 if (NULL == dm) {
276 return false; 276 return false;
277 } 277 }
278 278
279 // can we relax this? 279 // can we relax this?
280 if (kN32_SkColorType != bitmap->colorType()) { 280 if (kPMColor_SkColorType != bitmap->colorType()) {
281 return false; 281 return false;
282 } 282 }
283 283
284 SkImageInfo info = bitmap->info(); 284 SkImageInfo info = bitmap->info();
285 bitmap->setPixelRef(SkNEW_ARGS(SkOneShotDiscardablePixelRef, 285 bitmap->setPixelRef(SkNEW_ARGS(SkOneShotDiscardablePixelRef,
286 (info, dm, bitmap->rowBytes())))->unref(); 286 (info, dm, bitmap->rowBytes())))->unref();
287 bitmap->lockPixels(); 287 bitmap->lockPixels();
288 return bitmap->readyToDraw(); 288 return bitmap->readyToDraw();
289 } 289 }
290 290
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 return SkScaledImageCache::GetBytesUsed(); 776 return SkScaledImageCache::GetBytesUsed();
777 } 777 }
778 778
779 size_t SkGraphics::GetImageCacheByteLimit() { 779 size_t SkGraphics::GetImageCacheByteLimit() {
780 return SkScaledImageCache::GetByteLimit(); 780 return SkScaledImageCache::GetByteLimit();
781 } 781 }
782 782
783 size_t SkGraphics::SetImageCacheByteLimit(size_t newLimit) { 783 size_t SkGraphics::SetImageCacheByteLimit(size_t newLimit) {
784 return SkScaledImageCache::SetByteLimit(newLimit); 784 return SkScaledImageCache::SetByteLimit(newLimit);
785 } 785 }
OLDNEW
« no previous file with comments | « src/core/SkDraw.cpp ('k') | src/core/SkSpriteBlitter_ARGB32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698