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

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

Issue 1266003002: Modifying TextBlobCacheTest to use SkRandomScalerContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks 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 | « no previous file | 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 void forceOffGenerateImageFromPath() { fGenerateImageFromPath = false; }
302 302
303 private: 303 private:
304 friend class SkRandomScalerContext; // For debug purposes
305
304 // never null 306 // never null
305 SkAutoTUnref<SkTypeface> fTypeface; 307 SkAutoTUnref<SkTypeface> fTypeface;
306 308
307 // optional object, which may be null 309 // optional object, which may be null
308 SkPathEffect* fPathEffect; 310 SkPathEffect* fPathEffect;
309 SkMaskFilter* fMaskFilter; 311 SkMaskFilter* fMaskFilter;
310 SkRasterizer* fRasterizer; 312 SkRasterizer* fRasterizer;
311 313
312 // if this is set, we draw the image from a path, rather than 314 // if this is set, we draw the image from a path, rather than
313 // calling generateImage. 315 // calling generateImage.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 return static_cast<SkPaint::Hinting>(hint); 362 return static_cast<SkPaint::Hinting>(hint);
361 } 363 }
362 364
363 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { 365 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) {
364 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | 366 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) |
365 (hinting << SkScalerContext::kHinting_Shift); 367 (hinting << SkScalerContext::kHinting_Shift);
366 } 368 }
367 369
368 370
369 #endif 371 #endif
OLDNEW
« no previous file with comments | « no previous file | src/fonts/SkRandomScalerContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698