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

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

Issue 1098093003: fix some small bugs with GrAtlasTextContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback inc Created 5 years, 8 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.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 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 GrAtlasTextContext_DEFINED 8 #ifndef GrAtlasTextContext_DEFINED
9 #define GrAtlasTextContext_DEFINED 9 #define GrAtlasTextContext_DEFINED
10 10
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 // We can reuse distance field text, but only if the new viewmatrix woul d not result in 242 // We can reuse distance field text, but only if the new viewmatrix woul d not result in
243 // a mip change. Because there can be multiple runs in a blob, we track the overall 243 // a mip change. Because there can be multiple runs in a blob, we track the overall
244 // maximum minimum scale, and minimum maximum scale, we can support befo re we need to regen 244 // maximum minimum scale, and minimum maximum scale, we can support befo re we need to regen
245 SkScalar fMaxMinScale; 245 SkScalar fMaxMinScale;
246 SkScalar fMinMaxScale; 246 SkScalar fMinMaxScale;
247 int fRunCount; 247 int fRunCount;
248 uint8_t fTextType; 248 uint8_t fTextType;
249 249
250 BitmapTextBlob() 250 BitmapTextBlob()
251 : fMaxMinScale(SK_ScalarMax) 251 : fMaxMinScale(-SK_ScalarMax)
252 , fMinMaxScale(SK_ScalarMax) 252 , fMinMaxScale(SK_ScalarMax)
253 , fTextType(0) {} 253 , fTextType(0) {}
254 254
255 static const Key& GetKey(const BitmapTextBlob& blob) { 255 static const Key& GetKey(const BitmapTextBlob& blob) {
256 return blob.fKey; 256 return blob.fKey;
257 } 257 }
258 258
259 static uint32_t Hash(const Key& key) { 259 static uint32_t Hash(const Key& key) {
260 return SkChecksum::Murmur3(&key, sizeof(Key)); 260 return SkChecksum::Murmur3(&key, sizeof(Key));
261 } 261 }
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 bool fEnableDFRendering; 394 bool fEnableDFRendering;
395 SkAutoTUnref<DistanceAdjustTable> fDistanceAdjustTable; 395 SkAutoTUnref<DistanceAdjustTable> fDistanceAdjustTable;
396 396
397 friend class GrTextBlobCache; 397 friend class GrTextBlobCache;
398 friend class BitmapTextBatch; 398 friend class BitmapTextBatch;
399 399
400 typedef GrTextContext INHERITED; 400 typedef GrTextContext INHERITED;
401 }; 401 };
402 402
403 #endif 403 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698