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

Side by Side Diff: src/utils/SkBitmapHasher.cpp

Issue 235523003: Revert of 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/ports/SkImageDecoder_WIC.cpp ('k') | src/utils/SkCanvasStateUtils.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 2012 Google Inc. 2 * Copyright 2012 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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkBitmapHasher.h" 9 #include "SkBitmapHasher.h"
10 #include "SkEndian.h" 10 #include "SkEndian.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 /*static*/ bool SkBitmapHasher::ComputeDigest(const SkBitmap& bitmap, uint64_t * result) { 52 /*static*/ bool SkBitmapHasher::ComputeDigest(const SkBitmap& bitmap, uint64_t * result) {
53 if (ComputeDigestInternal(bitmap, result)) { 53 if (ComputeDigestInternal(bitmap, result)) {
54 return true; 54 return true;
55 } 55 }
56 56
57 // Hmm, that didn't work. Maybe if we create a new 57 // Hmm, that didn't work. Maybe if we create a new
58 // kARGB_8888_Config version of the bitmap it will work better? 58 // kARGB_8888_Config version of the bitmap it will work better?
59 SkBitmap copyBitmap; 59 SkBitmap copyBitmap;
60 if (!bitmap.copyTo(&copyBitmap, kPMColor_SkColorType)) { 60 if (!bitmap.copyTo(&copyBitmap, kN32_SkColorType)) {
61 return false; 61 return false;
62 } 62 }
63 return ComputeDigestInternal(copyBitmap, result); 63 return ComputeDigestInternal(copyBitmap, result);
64 } 64 }
OLDNEW
« no previous file with comments | « src/ports/SkImageDecoder_WIC.cpp ('k') | src/utils/SkCanvasStateUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698