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

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

Issue 1513723002: Fix bug with GrAtlasTextContext color regen (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanuptext4
Patch Set: nit Created 5 years 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 | « src/gpu/GrAtlasTextBlob.h ('k') | src/gpu/batches/GrAtlasTextBatch.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 #include "GrAtlasTextBlob.h" 8 #include "GrAtlasTextBlob.h"
9 9
10 void GrAtlasTextBlob::appendGlyph(int runIndex, 10 void GrAtlasTextBlob::appendGlyph(int runIndex,
(...skipping 12 matching lines...) Expand all
23 subRun->setStrike(strike); 23 subRun->setStrike(strike);
24 } 24 }
25 25
26 run.fInitialized = true; 26 run.fInitialized = true;
27 27
28 size_t vertexStride = GetVertexStride(format); 28 size_t vertexStride = GetVertexStride(format);
29 29
30 subRun->setMaskFormat(format); 30 subRun->setMaskFormat(format);
31 31
32 run.fVertexBounds.joinNonEmptyArg(positions); 32 run.fVertexBounds.joinNonEmptyArg(positions);
33 run.fColor = color; 33 subRun->setColor(color);
34 34
35 intptr_t vertex = reinterpret_cast<intptr_t>(this->fVertices + subRun->verte xEndIndex()); 35 intptr_t vertex = reinterpret_cast<intptr_t>(this->fVertices + subRun->verte xEndIndex());
36 36
37 if (kARGB_GrMaskFormat != glyph->fMaskFormat) { 37 if (kARGB_GrMaskFormat != glyph->fMaskFormat) {
38 // V0 38 // V0
39 SkPoint* position = reinterpret_cast<SkPoint*>(vertex); 39 SkPoint* position = reinterpret_cast<SkPoint*>(vertex);
40 position->set(positions.fLeft, positions.fTop); 40 position->set(positions.fLeft, positions.fTop);
41 SkColor* colorPtr = reinterpret_cast<SkColor*>(vertex + sizeof(SkPoint)) ; 41 SkColor* colorPtr = reinterpret_cast<SkColor*>(vertex + sizeof(SkPoint)) ;
42 *colorPtr = color; 42 *colorPtr = color;
43 vertex += vertexStride; 43 vertex += vertexStride;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 rSubRun.fBulkUseToken.fPlotAlreadyUpdated); 180 rSubRun.fBulkUseToken.fPlotAlreadyUpdated);
181 for (int k = 0; k < lSubRun.fBulkUseToken.fPlotsToUpdate.count(); k+ +) { 181 for (int k = 0; k < lSubRun.fBulkUseToken.fPlotsToUpdate.count(); k+ +) {
182 SkASSERT(lSubRun.fBulkUseToken.fPlotsToUpdate[k] == 182 SkASSERT(lSubRun.fBulkUseToken.fPlotsToUpdate[k] ==
183 rSubRun.fBulkUseToken.fPlotsToUpdate[k]); 183 rSubRun.fBulkUseToken.fPlotsToUpdate[k]);
184 }*/ 184 }*/
185 } 185 }
186 } 186 }
187 } 187 }
188 188
189 #endif 189 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAtlasTextBlob.h ('k') | src/gpu/batches/GrAtlasTextBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698