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

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

Issue 1256763005: Fix for GrAtlasTextContext crash (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | no next file » | 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 size_t fVertexEndIndex; 91 size_t fVertexEndIndex;
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
robertphillips 2015/07/29 17:00:00 Get the reference to newSubRun on the push_back li
102 SubRunInfo& prevSubRun = fSubRunInfo.back(); 102 fSubRunInfo.push_back();
103 SubRunInfo& newSubRun = fSubRunInfo.push_back(); 103 SubRunInfo& prevSubRun = fSubRunInfo.fromBack(1);
104 SubRunInfo& newSubRun = fSubRunInfo.back();
105
104 newSubRun.fGlyphStartIndex = prevSubRun.fGlyphEndIndex; 106 newSubRun.fGlyphStartIndex = prevSubRun.fGlyphEndIndex;
105 newSubRun.fGlyphEndIndex = prevSubRun.fGlyphEndIndex; 107 newSubRun.fGlyphEndIndex = prevSubRun.fGlyphEndIndex;
106 108
107 newSubRun.fVertexStartIndex = prevSubRun.fVertexEndIndex; 109 newSubRun.fVertexStartIndex = prevSubRun.fVertexEndIndex;
108 newSubRun.fVertexEndIndex = prevSubRun.fVertexEndIndex; 110 newSubRun.fVertexEndIndex = prevSubRun.fVertexEndIndex;
109 return newSubRun; 111 return newSubRun;
110 } 112 }
111 static const int kMinSubRuns = 1; 113 static const int kMinSubRuns = 1;
112 SkAutoTUnref<GrBatchTextStrike> fStrike; 114 SkAutoTUnref<GrBatchTextStrike> fStrike;
113 SkAutoTUnref<SkTypeface> fTypeface; 115 SkAutoTUnref<SkTypeface> fTypeface;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 void setHasDistanceField() { fTextType |= kHasDistanceField_TextType; } 222 void setHasDistanceField() { fTextType |= kHasDistanceField_TextType; }
221 void setHasBitmap() { fTextType |= kHasBitmap_TextType; } 223 void setHasBitmap() { fTextType |= kHasBitmap_TextType; }
222 224
223 #ifdef CACHE_SANITY_CHECK 225 #ifdef CACHE_SANITY_CHECK
224 static void AssertEqual(const GrAtlasTextBlob&, const GrAtlasTextBlob&); 226 static void AssertEqual(const GrAtlasTextBlob&, const GrAtlasTextBlob&);
225 size_t fSize; 227 size_t fSize;
226 #endif 228 #endif
227 }; 229 };
228 230
229 #endif 231 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698