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

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

Issue 1267623004: Revert of Modifying TextBlobCacheTest to use SkRandomScalerContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
306 // never null 304 // never null
307 SkAutoTUnref<SkTypeface> fTypeface; 305 SkAutoTUnref<SkTypeface> fTypeface;
308 306
309 // optional object, which may be null 307 // optional object, which may be null
310 SkPathEffect* fPathEffect; 308 SkPathEffect* fPathEffect;
311 SkMaskFilter* fMaskFilter; 309 SkMaskFilter* fMaskFilter;
312 SkRasterizer* fRasterizer; 310 SkRasterizer* fRasterizer;
313 311
314 // if this is set, we draw the image from a path, rather than 312 // if this is set, we draw the image from a path, rather than
315 // calling generateImage. 313 // calling generateImage.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 return static_cast<SkPaint::Hinting>(hint); 360 return static_cast<SkPaint::Hinting>(hint);
363 } 361 }
364 362
365 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { 363 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) {
366 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | 364 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) |
367 (hinting << SkScalerContext::kHinting_Shift); 365 (hinting << SkScalerContext::kHinting_Shift);
368 } 366 }
369 367
370 368
371 #endif 369 #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