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

Side by Side Diff: src/ports/SkFontHost_FreeType_common.h

Issue 770923002: Remove SkASSERT_CONTINUE. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 | « no previous file | no next file » | 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 2006-2012 The Android Open Source Project 2 * Copyright 2006-2012 The Android Open Source Project
3 * Copyright 2012 Mozilla Foundation 3 * Copyright 2012 Mozilla Foundation
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 #ifndef SKFONTHOST_FREETYPE_COMMON_H_ 9 #ifndef SKFONTHOST_FREETYPE_COMMON_H_
10 #define SKFONTHOST_FREETYPE_COMMON_H_ 10 #define SKFONTHOST_FREETYPE_COMMON_H_
11 11
12 #include "SkGlyph.h" 12 #include "SkGlyph.h"
13 #include "SkScalerContext.h" 13 #include "SkScalerContext.h"
14 #include "SkTypeface.h" 14 #include "SkTypeface.h"
15 #include "SkTypes.h" 15 #include "SkTypes.h"
16 16
17 #include <ft2build.h> 17 #include <ft2build.h>
18 #include FT_FREETYPE_H 18 #include FT_FREETYPE_H
19 19
20 #ifdef SK_DEBUG
21 #define SkASSERT_CONTINUE(pred) \
22 do { \
23 if (!(pred)) \
24 SkDebugf("file %s:%d: assert failed '" #pred "'\n", __FILE__, __ LINE__); \
25 } while (false)
26 #else
27 #define SkASSERT_CONTINUE(pred)
28 #endif
29
30 class SkScalerContext_FreeType_Base : public SkScalerContext { 20 class SkScalerContext_FreeType_Base : public SkScalerContext {
31 protected: 21 protected:
32 // See http://freetype.sourceforge.net/freetype2/docs/reference/ft2-bitmap_h andling.html#FT_Bitmap_Embolden 22 // See http://freetype.sourceforge.net/freetype2/docs/reference/ft2-bitmap_h andling.html#FT_Bitmap_Embolden
33 // This value was chosen by eyeballing the result in Firefox and trying to m atch it. 23 // This value was chosen by eyeballing the result in Firefox and trying to m atch it.
34 static const FT_Pos kBitmapEmboldenStrength = 1 << 6; 24 static const FT_Pos kBitmapEmboldenStrength = 1 << 6;
35 25
36 SkScalerContext_FreeType_Base(SkTypeface* typeface, const SkDescriptor *desc ) 26 SkScalerContext_FreeType_Base(SkTypeface* typeface, const SkDescriptor *desc )
37 : INHERITED(typeface, desc) 27 : INHERITED(typeface, desc)
38 {} 28 {}
39 29
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 virtual size_t onGetTableData(SkFontTableTag, size_t offset, 77 virtual size_t onGetTableData(SkFontTableTag, size_t offset,
88 size_t length, void* data) const SK_OVERRIDE; 78 size_t length, void* data) const SK_OVERRIDE;
89 79
90 private: 80 private:
91 mutable int fGlyphCount; 81 mutable int fGlyphCount;
92 82
93 typedef SkTypeface INHERITED; 83 typedef SkTypeface INHERITED;
94 }; 84 };
95 85
96 #endif // SKFONTHOST_FREETYPE_COMMON_H_ 86 #endif // SKFONTHOST_FREETYPE_COMMON_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698