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

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

Issue 1905683004: Include scaler context flags (gamma and contrast boost) in the text blob cache key. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove leftover changes from earlier version Created 4 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/text/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 GrAtlasTextBlob_DEFINED 8 #ifndef GrAtlasTextBlob_DEFINED
9 #define GrAtlasTextBlob_DEFINED 9 #define GrAtlasTextBlob_DEFINED
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } 54 }
55 uint32_t fUniqueID; 55 uint32_t fUniqueID;
56 // Color may affect the gamma of the mask we generate, but in a fairly l imited way. 56 // Color may affect the gamma of the mask we generate, but in a fairly l imited way.
57 // Each color is assigned to on of a fixed number of buckets based on it s 57 // Each color is assigned to on of a fixed number of buckets based on it s
58 // luminance. For each luminance bucket there is a "canonical color" tha t 58 // luminance. For each luminance bucket there is a "canonical color" tha t
59 // represents the bucket. This functionality is currently only supporte d for A8 59 // represents the bucket. This functionality is currently only supporte d for A8
60 SkColor fCanonicalColor; 60 SkColor fCanonicalColor;
61 SkPaint::Style fStyle; 61 SkPaint::Style fStyle;
62 SkPixelGeometry fPixelGeometry; 62 SkPixelGeometry fPixelGeometry;
63 bool fHasBlur; 63 bool fHasBlur;
64 uint32_t fScalerContextFlags;
64 65
65 bool operator==(const Key& other) const { 66 bool operator==(const Key& other) const {
66 return 0 == memcmp(this, &other, sizeof(Key)); 67 return 0 == memcmp(this, &other, sizeof(Key));
67 } 68 }
68 }; 69 };
69 70
70 void setupKey(const GrAtlasTextBlob::Key& key, 71 void setupKey(const GrAtlasTextBlob::Key& key,
71 const SkMaskFilter::BlurRec& blurRec, 72 const SkMaskFilter::BlurRec& blurRec,
72 const SkPaint& paint) { 73 const SkPaint& paint) {
73 fKey = key; 74 fKey = key;
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 // We can reuse distance field text, but only if the new viewmatrix would no t result in 550 // We can reuse distance field text, but only if the new viewmatrix would no t result in
550 // a mip change. Because there can be multiple runs in a blob, we track the overall 551 // a mip change. Because there can be multiple runs in a blob, we track the overall
551 // maximum minimum scale, and minimum maximum scale, we can support before w e need to regen 552 // maximum minimum scale, and minimum maximum scale, we can support before w e need to regen
552 SkScalar fMaxMinScale; 553 SkScalar fMaxMinScale;
553 SkScalar fMinMaxScale; 554 SkScalar fMinMaxScale;
554 int fRunCount; 555 int fRunCount;
555 uint8_t fTextType; 556 uint8_t fTextType;
556 }; 557 };
557 558
558 #endif 559 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/text/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698