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

Side by Side Diff: src/gpu/GrAtlasTextBlob.h

Issue 1315933002: Fix for distance field draw large glyph as paths (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix 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/gpu/GrAtlasTextContext.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 2015 Google Inc. 2 * Copyright 2015 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 GrAtlasTextBlob_DEFINED 8 #ifndef GrAtlasTextBlob_DEFINED
9 #define GrAtlasTextBlob_DEFINED 9 #define GrAtlasTextBlob_DEFINED
10 10
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 SkRect fVertexBounds; 128 SkRect fVertexBounds;
129 SkSTArray<kMinSubRuns, SubRunInfo> fSubRunInfo; 129 SkSTArray<kMinSubRuns, SubRunInfo> fSubRunInfo;
130 SkAutoDescriptor fDescriptor; 130 SkAutoDescriptor fDescriptor;
131 SkAutoTDelete<SkAutoDescriptor> fOverrideDescriptor; // df properties 131 SkAutoTDelete<SkAutoDescriptor> fOverrideDescriptor; // df properties
132 GrColor fColor; 132 GrColor fColor;
133 bool fInitialized; 133 bool fInitialized;
134 bool fDrawAsPaths; 134 bool fDrawAsPaths;
135 }; 135 };
136 136
137 struct BigGlyph { 137 struct BigGlyph {
138 BigGlyph(const SkPath& path, SkScalar vx, SkScalar vy) 138 BigGlyph(const SkPath& path, SkScalar vx, SkScalar vy, SkScalar scale, b ool applyVM)
139 : fPath(path) 139 : fPath(path)
140 , fVx(vx) 140 , fVx(vx)
141 , fVy(vy) {} 141 , fVy(vy)
142 , fScale(scale)
143 , fApplyVM(applyVM) {}
142 SkPath fPath; 144 SkPath fPath;
143 SkScalar fVx; 145 SkScalar fVx;
144 SkScalar fVy; 146 SkScalar fVy;
147 SkScalar fScale;
148 bool fApplyVM;
145 }; 149 };
146 150
147 struct Key { 151 struct Key {
148 Key() { 152 Key() {
149 sk_bzero(this, sizeof(Key)); 153 sk_bzero(this, sizeof(Key));
150 } 154 }
151 uint32_t fUniqueID; 155 uint32_t fUniqueID;
152 // Color may affect the gamma of the mask we generate, but in a fairly l imited way. 156 // Color may affect the gamma of the mask we generate, but in a fairly l imited way.
153 // Each color is assigned to on of a fixed number of buckets based on it s 157 // Each color is assigned to on of a fixed number of buckets based on it s
154 // luminance. For each luminance bucket there is a "canonical color" tha t 158 // luminance. For each luminance bucket there is a "canonical color" tha t
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 void setHasDistanceField() { fTextType |= kHasDistanceField_TextType; } 238 void setHasDistanceField() { fTextType |= kHasDistanceField_TextType; }
235 void setHasBitmap() { fTextType |= kHasBitmap_TextType; } 239 void setHasBitmap() { fTextType |= kHasBitmap_TextType; }
236 240
237 #ifdef CACHE_SANITY_CHECK 241 #ifdef CACHE_SANITY_CHECK
238 static void AssertEqual(const GrAtlasTextBlob&, const GrAtlasTextBlob&); 242 static void AssertEqual(const GrAtlasTextBlob&, const GrAtlasTextBlob&);
239 size_t fSize; 243 size_t fSize;
240 #endif 244 #endif
241 }; 245 };
242 246
243 #endif 247 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrAtlasTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698