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

Side by Side Diff: skia/ext/SkFontHost_fontconfig.cpp

Issue 165223: Enable skia asserts. They were disabled some time ago due to... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 | « skia/config/SkUserConfig.h ('k') | skia/ext/image_operations_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* libs/graphics/ports/SkFontHost_fontconfig.cpp 1 /* libs/graphics/ports/SkFontHost_fontconfig.cpp
2 ** 2 **
3 ** Copyright 2008, Google Inc. 3 ** Copyright 2008, Google Inc.
4 ** 4 **
5 ** Licensed under the Apache License, Version 2.0 (the "License"); 5 ** Licensed under the Apache License, Version 2.0 (the "License");
6 ** you may not use this file except in compliance with the License. 6 ** you may not use this file except in compliance with the License.
7 ** You may obtain a copy of the License at 7 ** You may obtain a copy of the License at
8 ** 8 **
9 ** http://www.apache.org/licenses/LICENSE-2.0 9 ** http://www.apache.org/licenses/LICENSE-2.0
10 ** 10 **
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 75
76 static SkTypeface::Style UniqueIdToStyle(unsigned uniqueid) 76 static SkTypeface::Style UniqueIdToStyle(unsigned uniqueid)
77 { 77 {
78 return static_cast<SkTypeface::Style>(uniqueid & 0xff); 78 return static_cast<SkTypeface::Style>(uniqueid & 0xff);
79 } 79 }
80 80
81 static unsigned FileIdAndStyleToUniqueId(unsigned fileid, 81 static unsigned FileIdAndStyleToUniqueId(unsigned fileid,
82 SkTypeface::Style style) 82 SkTypeface::Style style)
83 { 83 {
84 SkASSERT(style & 0xff == style); 84 SkASSERT((style & 0xff) == style);
85 return (fileid << 8) | static_cast<int>(style); 85 return (fileid << 8) | static_cast<int>(style);
86 } 86 }
87 87
88 static const unsigned kRemoteFontMask = 0x00800000u; 88 static const unsigned kRemoteFontMask = 0x00800000u;
89 89
90 static bool IsRemoteFont(unsigned fileid) 90 static bool IsRemoteFont(unsigned fileid)
91 { 91 {
92 return fileid & kRemoteFontMask; 92 return fileid & kRemoteFontMask;
93 } 93 }
94 94
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 return SkNEW_ARGS(SkFileDescriptorStream, (fd)); 308 return SkNEW_ARGS(SkFileDescriptorStream, (fd));
309 } 309 }
310 310
311 size_t SkFontHost::ShouldPurgeFontCache(size_t sizeAllocatedSoFar) 311 size_t SkFontHost::ShouldPurgeFontCache(size_t sizeAllocatedSoFar)
312 { 312 {
313 if (sizeAllocatedSoFar > kFontCacheMemoryBudget) 313 if (sizeAllocatedSoFar > kFontCacheMemoryBudget)
314 return sizeAllocatedSoFar - kFontCacheMemoryBudget; 314 return sizeAllocatedSoFar - kFontCacheMemoryBudget;
315 else 315 else
316 return 0; // nothing to do 316 return 0; // nothing to do
317 } 317 }
OLDNEW
« no previous file with comments | « skia/config/SkUserConfig.h ('k') | skia/ext/image_operations_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698