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

Side by Side Diff: src/core/SkScalerContext.h

Issue 1260473004: Adding debug SkScalerContext which returns random mask formats (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more twiddling Created 5 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
« no previous file with comments | « include/core/SkTypeface.h ('k') | src/fonts/SkRandomScalerContext.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 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 #ifndef SkScalerContext_DEFINED 8 #ifndef SkScalerContext_DEFINED
9 #define SkScalerContext_DEFINED 9 #define SkScalerContext_DEFINED
10 10
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 */ 291 */
292 virtual uint16_t generateCharToGlyph(SkUnichar unichar) = 0; 292 virtual uint16_t generateCharToGlyph(SkUnichar unichar) = 0;
293 293
294 /** Returns the unichar for the given glyph id. 294 /** Returns the unichar for the given glyph id.
295 * If there is no 1:1 mapping from the glyph id to a unichar, returns 0. 295 * If there is no 1:1 mapping from the glyph id to a unichar, returns 0.
296 * The default implementation always returns 0, indicating failure. 296 * The default implementation always returns 0, indicating failure.
297 */ 297 */
298 virtual SkUnichar generateGlyphToChar(uint16_t glyphId); 298 virtual SkUnichar generateGlyphToChar(uint16_t glyphId);
299 299
300 void forceGenerateImageFromPath() { fGenerateImageFromPath = true; } 300 void forceGenerateImageFromPath() { fGenerateImageFromPath = true; }
301 void forceOffGenerateImageFromPath() { fGenerateImageFromPath = false; }
301 302
302 private: 303 private:
303 // never null 304 // never null
304 SkAutoTUnref<SkTypeface> fTypeface; 305 SkAutoTUnref<SkTypeface> fTypeface;
305 306
306 // optional object, which may be null 307 // optional object, which may be null
307 SkPathEffect* fPathEffect; 308 SkPathEffect* fPathEffect;
308 SkMaskFilter* fMaskFilter; 309 SkMaskFilter* fMaskFilter;
309 SkRasterizer* fRasterizer; 310 SkRasterizer* fRasterizer;
310 311
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 return static_cast<SkPaint::Hinting>(hint); 360 return static_cast<SkPaint::Hinting>(hint);
360 } 361 }
361 362
362 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { 363 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) {
363 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | 364 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) |
364 (hinting << SkScalerContext::kHinting_Shift); 365 (hinting << SkScalerContext::kHinting_Shift);
365 } 366 }
366 367
367 368
368 #endif 369 #endif
OLDNEW
« no previous file with comments | « include/core/SkTypeface.h ('k') | src/fonts/SkRandomScalerContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698