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

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

Issue 504343007: DirectWrite to use aliased if ClearType is empty. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add comments. Created 6 years, 3 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 | « src/core/SkGlyph.h ('k') | src/ports/SkScalerContext_win_dw.cpp » ('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 2014 Google Inc. 2 * Copyright 2014 Google Inc.
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 SkScalarContext_win_dw_DEFINED 8 #ifndef SkScalarContext_win_dw_DEFINED
9 #define SkScalarContext_win_dw_DEFINED 9 #define SkScalarContext_win_dw_DEFINED
10 10
(...skipping 15 matching lines...) Expand all
26 protected: 26 protected:
27 virtual unsigned generateGlyphCount() SK_OVERRIDE; 27 virtual unsigned generateGlyphCount() SK_OVERRIDE;
28 virtual uint16_t generateCharToGlyph(SkUnichar uni) SK_OVERRIDE; 28 virtual uint16_t generateCharToGlyph(SkUnichar uni) SK_OVERRIDE;
29 virtual void generateAdvance(SkGlyph* glyph) SK_OVERRIDE; 29 virtual void generateAdvance(SkGlyph* glyph) SK_OVERRIDE;
30 virtual void generateMetrics(SkGlyph* glyph) SK_OVERRIDE; 30 virtual void generateMetrics(SkGlyph* glyph) SK_OVERRIDE;
31 virtual void generateImage(const SkGlyph& glyph) SK_OVERRIDE; 31 virtual void generateImage(const SkGlyph& glyph) SK_OVERRIDE;
32 virtual void generatePath(const SkGlyph& glyph, SkPath* path) SK_OVERRIDE; 32 virtual void generatePath(const SkGlyph& glyph, SkPath* path) SK_OVERRIDE;
33 virtual void generateFontMetrics(SkPaint::FontMetrics*) SK_OVERRIDE; 33 virtual void generateFontMetrics(SkPaint::FontMetrics*) SK_OVERRIDE;
34 34
35 private: 35 private:
36 const void* drawDWMask(const SkGlyph& glyph); 36 const void* drawDWMask(const SkGlyph& glyph,
37 DWRITE_RENDERING_MODE renderingMode,
38 DWRITE_TEXTURE_TYPE textureType);
39
40 void getBoundingBox(SkGlyph* glyph,
41 DWRITE_RENDERING_MODE renderingMode,
42 DWRITE_TEXTURE_TYPE textureType,
43 RECT* bbox);
37 44
38 SkTDArray<uint8_t> fBits; 45 SkTDArray<uint8_t> fBits;
39 /** The total matrix without the text height scale. */ 46 /** The total matrix without the text height scale. */
40 SkMatrix fSkXform; 47 SkMatrix fSkXform;
41 /** The total matrix without the text height scale. */ 48 /** The total matrix without the text height scale. */
42 DWRITE_MATRIX fXform; 49 DWRITE_MATRIX fXform;
43 /** The non-rotational part of total matrix without the text height scale. 50 /** The non-rotational part of total matrix without the text height scale.
44 * This is used to find the magnitude of gdi compatible advances. 51 * This is used to find the magnitude of gdi compatible advances.
45 */ 52 */
46 DWRITE_MATRIX fGsA; 53 DWRITE_MATRIX fGsA;
47 /** The inverse of the rotational part of the total matrix. 54 /** The inverse of the rotational part of the total matrix.
48 * This is used to find the direction of gdi compatible advances. 55 * This is used to find the direction of gdi compatible advances.
49 */ 56 */
50 SkMatrix fG_inv; 57 SkMatrix fG_inv;
51 /** The text size to render with. */ 58 /** The text size to render with. */
52 SkScalar fTextSizeRender; 59 SkScalar fTextSizeRender;
53 /** The text size to measure with. */ 60 /** The text size to measure with. */
54 SkScalar fTextSizeMeasure; 61 SkScalar fTextSizeMeasure;
55 SkAutoTUnref<DWriteFontTypeface> fTypeface; 62 SkAutoTUnref<DWriteFontTypeface> fTypeface;
56 int fGlyphCount; 63 int fGlyphCount;
57 DWRITE_RENDERING_MODE fRenderingMode; 64 DWRITE_RENDERING_MODE fRenderingMode;
58 DWRITE_TEXTURE_TYPE fTextureType; 65 DWRITE_TEXTURE_TYPE fTextureType;
59 DWRITE_MEASURING_MODE fMeasuringMode; 66 DWRITE_MEASURING_MODE fMeasuringMode;
60 }; 67 };
61 68
62 #endif 69 #endif
OLDNEW
« no previous file with comments | « src/core/SkGlyph.h ('k') | src/ports/SkScalerContext_win_dw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698