| OLD | NEW |
| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 uint32_t fGlyphStartIndex; | 92 uint32_t fGlyphStartIndex; |
| 93 uint32_t fGlyphEndIndex; | 93 uint32_t fGlyphEndIndex; |
| 94 SkScalar fTextRatio; // df property | 94 SkScalar fTextRatio; // df property |
| 95 GrMaskFormat fMaskFormat; | 95 GrMaskFormat fMaskFormat; |
| 96 bool fDrawAsDistanceFields; // df property | 96 bool fDrawAsDistanceFields; // df property |
| 97 bool fUseLCDText; // df property | 97 bool fUseLCDText; // df property |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 SubRunInfo& push_back() { | 100 SubRunInfo& push_back() { |
| 101 // Forward glyph / vertex information to seed the new sub run | 101 // Forward glyph / vertex information to seed the new sub run |
| 102 SubRunInfo& prevSubRun = fSubRunInfo.back(); | |
| 103 SubRunInfo& newSubRun = fSubRunInfo.push_back(); | 102 SubRunInfo& newSubRun = fSubRunInfo.push_back(); |
| 103 SubRunInfo& prevSubRun = fSubRunInfo.fromBack(1); |
| 104 |
| 104 newSubRun.fGlyphStartIndex = prevSubRun.fGlyphEndIndex; | 105 newSubRun.fGlyphStartIndex = prevSubRun.fGlyphEndIndex; |
| 105 newSubRun.fGlyphEndIndex = prevSubRun.fGlyphEndIndex; | 106 newSubRun.fGlyphEndIndex = prevSubRun.fGlyphEndIndex; |
| 106 | 107 |
| 107 newSubRun.fVertexStartIndex = prevSubRun.fVertexEndIndex; | 108 newSubRun.fVertexStartIndex = prevSubRun.fVertexEndIndex; |
| 108 newSubRun.fVertexEndIndex = prevSubRun.fVertexEndIndex; | 109 newSubRun.fVertexEndIndex = prevSubRun.fVertexEndIndex; |
| 109 return newSubRun; | 110 return newSubRun; |
| 110 } | 111 } |
| 111 static const int kMinSubRuns = 1; | 112 static const int kMinSubRuns = 1; |
| 112 SkAutoTUnref<GrBatchTextStrike> fStrike; | 113 SkAutoTUnref<GrBatchTextStrike> fStrike; |
| 113 SkAutoTUnref<SkTypeface> fTypeface; | 114 SkAutoTUnref<SkTypeface> fTypeface; |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 void setHasDistanceField() { fTextType |= kHasDistanceField_TextType; } | 221 void setHasDistanceField() { fTextType |= kHasDistanceField_TextType; } |
| 221 void setHasBitmap() { fTextType |= kHasBitmap_TextType; } | 222 void setHasBitmap() { fTextType |= kHasBitmap_TextType; } |
| 222 | 223 |
| 223 #ifdef CACHE_SANITY_CHECK | 224 #ifdef CACHE_SANITY_CHECK |
| 224 static void AssertEqual(const GrAtlasTextBlob&, const GrAtlasTextBlob&); | 225 static void AssertEqual(const GrAtlasTextBlob&, const GrAtlasTextBlob&); |
| 225 size_t fSize; | 226 size_t fSize; |
| 226 #endif | 227 #endif |
| 227 }; | 228 }; |
| 228 | 229 |
| 229 #endif | 230 #endif |
| OLD | NEW |