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

Side by Side Diff: src/gpu/SkGrFontScaler.cpp

Issue 27192003: Start cleaning up 64bit Win warnings (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: revertedGrBytesPerPixel to returning a size_t Created 7 years, 2 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/gpu/GrResourceCache.cpp ('k') | src/gpu/gl/GrGpuGL.h » ('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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "GrTemplates.h" 10 #include "GrTemplates.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 SkGrDescKey::~SkGrDescKey() { 45 SkGrDescKey::~SkGrDescKey() {
46 if (fDesc != GrTCast<SkDescriptor*>(fStorage)) { 46 if (fDesc != GrTCast<SkDescriptor*>(fStorage)) {
47 SkDescriptor::Free(fDesc); 47 SkDescriptor::Free(fDesc);
48 } 48 }
49 } 49 }
50 50
51 bool SkGrDescKey::lt(const GrKey& rh) const { 51 bool SkGrDescKey::lt(const GrKey& rh) const {
52 const SkDescriptor* srcDesc = ((const SkGrDescKey*)&rh)->fDesc; 52 const SkDescriptor* srcDesc = ((const SkGrDescKey*)&rh)->fDesc;
53 size_t lenLH = fDesc->getLength(); 53 size_t lenLH = fDesc->getLength();
54 size_t lenRH = srcDesc->getLength(); 54 size_t lenRH = srcDesc->getLength();
55 int cmp = memcmp(fDesc, srcDesc, SkMin32(lenLH, lenRH)); 55 int cmp = memcmp(fDesc, srcDesc, SkTMin<size_t>(lenLH, lenRH));
56 if (0 == cmp) { 56 if (0 == cmp) {
57 return lenLH < lenRH; 57 return lenLH < lenRH;
58 } else { 58 } else {
59 return cmp < 0; 59 return cmp < 0;
60 } 60 }
61 } 61 }
62 62
63 bool SkGrDescKey::eq(const GrKey& rh) const { 63 bool SkGrDescKey::eq(const GrKey& rh) const {
64 const SkDescriptor* srcDesc = ((const SkGrDescKey*)&rh)->fDesc; 64 const SkDescriptor* srcDesc = ((const SkGrDescKey*)&rh)->fDesc;
65 return fDesc->equals(*srcDesc); 65 return fDesc->equals(*srcDesc);
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 bool SkGrFontScaler::getGlyphPath(uint16_t glyphID, SkPath* path) { 192 bool SkGrFontScaler::getGlyphPath(uint16_t glyphID, SkPath* path) {
193 193
194 const SkGlyph& glyph = fStrike->getGlyphIDMetrics(glyphID); 194 const SkGlyph& glyph = fStrike->getGlyphIDMetrics(glyphID);
195 const SkPath* skPath = fStrike->findPath(glyph); 195 const SkPath* skPath = fStrike->findPath(glyph);
196 if (skPath) { 196 if (skPath) {
197 *path = *skPath; 197 *path = *skPath;
198 return true; 198 return true;
199 } 199 }
200 return false; 200 return false;
201 } 201 }
OLDNEW
« no previous file with comments | « src/gpu/GrResourceCache.cpp ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698