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

Side by Side Diff: include/core/SkPaint.h

Issue 323513005: Revert of Gamma correction for distance field text. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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 | « no previous file | src/core/SkGlyphCache.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 /* 3 /*
4 * Copyright 2006 The Android Open Source Project 4 * Copyright 2006 The Android Open Source Project
5 * 5 *
6 * Use of this source code is governed by a BSD-style license that can be 6 * Use of this source code is governed by a BSD-style license that can be
7 * found in the LICENSE file. 7 * found in the LICENSE file.
8 */ 8 */
9 9
10 10
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 uint32_t getBitfields() const { return fBitfields; } 1074 uint32_t getBitfields() const { return fBitfields; }
1075 void setBitfields(uint32_t bitfields); 1075 void setBitfields(uint32_t bitfields);
1076 1076
1077 SkDrawCacheProc getDrawCacheProc() const; 1077 SkDrawCacheProc getDrawCacheProc() const;
1078 SkMeasureCacheProc getMeasureCacheProc(TextBufferDirection dir, 1078 SkMeasureCacheProc getMeasureCacheProc(TextBufferDirection dir,
1079 bool needFullMetrics) const; 1079 bool needFullMetrics) const;
1080 1080
1081 SkScalar measure_text(SkGlyphCache*, const char* text, size_t length, 1081 SkScalar measure_text(SkGlyphCache*, const char* text, size_t length,
1082 int* count, SkRect* bounds) const; 1082 int* count, SkRect* bounds) const;
1083 1083
1084 SkGlyphCache* detachCache(const SkDeviceProperties* deviceProperties, const SkMatrix*, 1084 SkGlyphCache* detachCache(const SkDeviceProperties* deviceProperties, const SkMatrix*) const;
1085 bool ignoreGamma) const;
1086 1085
1087 void descriptorProc(const SkDeviceProperties* deviceProperties, const SkMatr ix* deviceMatrix, 1086 void descriptorProc(const SkDeviceProperties* deviceProperties, const SkMatr ix* deviceMatrix,
1088 void (*proc)(SkTypeface*, const SkDescriptor*, void*), 1087 void (*proc)(SkTypeface*, const SkDescriptor*, void*),
1089 void* context, bool ignoreGamma = false) const; 1088 void* context, bool ignoreGamma = false) const;
1090 1089
1091 static void Term(); 1090 static void Term();
1092 1091
1093 enum { 1092 enum {
1094 /* This is the size we use when we ask for a glyph's path. We then 1093 /* This is the size we use when we ask for a glyph's path. We then
1095 * post-transform it as we draw to match the request. 1094 * post-transform it as we draw to match the request.
(...skipping 29 matching lines...) Expand all
1125 // have change it to kCanonicalTextSizeForPaths. 1124 // have change it to kCanonicalTextSizeForPaths.
1126 SkScalar setupForAsPaths(); 1125 SkScalar setupForAsPaths();
1127 1126
1128 static SkScalar MaxCacheSize2() { 1127 static SkScalar MaxCacheSize2() {
1129 static const SkScalar kMaxSize = SkIntToScalar(kMaxSizeForGlyphCache); 1128 static const SkScalar kMaxSize = SkIntToScalar(kMaxSizeForGlyphCache);
1130 static const SkScalar kMag2Max = kMaxSize * kMaxSize; 1129 static const SkScalar kMag2Max = kMaxSize * kMaxSize;
1131 return kMag2Max; 1130 return kMag2Max;
1132 } 1131 }
1133 1132
1134 friend class SkAutoGlyphCache; 1133 friend class SkAutoGlyphCache;
1135 friend class SkAutoGlyphCacheNoGamma;
1136 friend class SkCanvas; 1134 friend class SkCanvas;
1137 friend class SkDraw; 1135 friend class SkDraw;
1138 friend class SkGraphics; // So Term() can be called. 1136 friend class SkGraphics; // So Term() can be called.
1139 friend class SkPDFDevice; 1137 friend class SkPDFDevice;
1140 friend class GrBitmapTextContext; 1138 friend class GrBitmapTextContext;
1141 friend class GrDistanceFieldTextContext; 1139 friend class GrDistanceFieldTextContext;
1142 friend class SkTextToPathIter; 1140 friend class SkTextToPathIter;
1143 friend class SkCanonicalizePaint; 1141 friend class SkCanonicalizePaint;
1144 1142
1145 #ifdef SK_BUILD_FOR_ANDROID 1143 #ifdef SK_BUILD_FOR_ANDROID
1146 SkPaintOptionsAndroid fPaintOptionsAndroid; 1144 SkPaintOptionsAndroid fPaintOptionsAndroid;
1147 1145
1148 // In order for the == operator to work properly this must be the last field 1146 // In order for the == operator to work properly this must be the last field
1149 // in the struct so that we can do a memcmp to this field's offset. 1147 // in the struct so that we can do a memcmp to this field's offset.
1150 uint32_t fGenerationID; 1148 uint32_t fGenerationID;
1151 #endif 1149 #endif
1152 }; 1150 };
1153 1151
1154 #endif 1152 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkGlyphCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698