| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2016 Google Inc. | 2  * Copyright 2016 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 #include "GrBatchFlushState.h" | 10 #include "GrBatchFlushState.h" | 
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 199                 helper->flush(); | 199                 helper->flush(); | 
| 200                 brokenRun = glyphIdx > 0; | 200                 brokenRun = glyphIdx > 0; | 
| 201 | 201 | 
| 202                 SkDEBUGCODE(bool success =) strike->addGlyphToAtlas(target, | 202                 SkDEBUGCODE(bool success =) strike->addGlyphToAtlas(target, | 
| 203                                                                     glyph, | 203                                                                     glyph, | 
| 204                                                                     *scaler, | 204                                                                     *scaler, | 
| 205                                                                     info->maskFo
     rmat()); | 205                                                                     info->maskFo
     rmat()); | 
| 206                 SkASSERT(success); | 206                 SkASSERT(success); | 
| 207             } | 207             } | 
| 208             fontCache->addGlyphToBulkAndSetUseToken(info->bulkUseToken(), glyph, | 208             fontCache->addGlyphToBulkAndSetUseToken(info->bulkUseToken(), glyph, | 
| 209                                                     target->currentToken()); | 209                                                     target->nextDrawToken()); | 
| 210             log2Width = fontCache->log2Width(info->maskFormat()); | 210             log2Width = fontCache->log2Width(info->maskFormat()); | 
| 211             log2Height = fontCache->log2Height(info->maskFormat()); | 211             log2Height = fontCache->log2Height(info->maskFormat()); | 
| 212         } | 212         } | 
| 213 | 213 | 
| 214         intptr_t vertex = reinterpret_cast<intptr_t>(fVertices); | 214         intptr_t vertex = reinterpret_cast<intptr_t>(fVertices); | 
| 215         vertex += info->vertexStartIndex(); | 215         vertex += info->vertexStartIndex(); | 
| 216         vertex += vertexStride * glyphIdx * GrAtlasTextBatch::kVerticesPerGlyph; | 216         vertex += vertexStride * glyphIdx * GrAtlasTextBatch::kVerticesPerGlyph; | 
| 217         regen_vertices<regenPos, regenCol, regenTexCoords>(vertex, glyph, vertex
     Stride, | 217         regen_vertices<regenPos, regenCol, regenTexCoords>(vertex, glyph, vertex
     Stride, | 
| 218                                                            info->drawAsDistanceF
     ields(), transX, | 218                                                            info->drawAsDistanceF
     ields(), transX, | 
| 219                                                            transY, log2Width, lo
     g2Height, color); | 219                                                            transY, log2Width, lo
     g2Height, color); | 
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 304         case kRegenPosTexGlyph: this->regenInBatch<true, false, true, true>(REGE
     N_ARGS); break; | 304         case kRegenPosTexGlyph: this->regenInBatch<true, false, true, true>(REGE
     N_ARGS); break; | 
| 305         case kRegenPosColTex: this->regenInBatch<true, true, true, false>(REGEN_
     ARGS); break; | 305         case kRegenPosColTex: this->regenInBatch<true, true, true, false>(REGEN_
     ARGS); break; | 
| 306         case kRegenPosColTexGlyph: this->regenInBatch<true, true, true, true>(RE
     GEN_ARGS); break; | 306         case kRegenPosColTexGlyph: this->regenInBatch<true, true, true, true>(RE
     GEN_ARGS); break; | 
| 307         case kRegenColTex: this->regenInBatch<false, true, true, false>(REGEN_AR
     GS); break; | 307         case kRegenColTex: this->regenInBatch<false, true, true, false>(REGEN_AR
     GS); break; | 
| 308         case kRegenColTexGlyph: this->regenInBatch<false, true, true, true>(REGE
     N_ARGS); break; | 308         case kRegenColTexGlyph: this->regenInBatch<false, true, true, true>(REGE
     N_ARGS); break; | 
| 309         case kNoRegen: | 309         case kNoRegen: | 
| 310             helper->incGlyphCount(*glyphCount); | 310             helper->incGlyphCount(*glyphCount); | 
| 311 | 311 | 
| 312             // set use tokens for all of the glyphs in our subrun.  This is only
      valid if we | 312             // set use tokens for all of the glyphs in our subrun.  This is only
      valid if we | 
| 313             // have a valid atlas generation | 313             // have a valid atlas generation | 
| 314             fontCache->setUseTokenBulk(*info.bulkUseToken(), target->currentToke
     n(), | 314             fontCache->setUseTokenBulk(*info.bulkUseToken(), target->nextDrawTok
     en(), | 
| 315                                         info.maskFormat()); | 315                                         info.maskFormat()); | 
| 316             break; | 316             break; | 
| 317     } | 317     } | 
| 318 | 318 | 
| 319     *byteCount = info.byteCount(); | 319     *byteCount = info.byteCount(); | 
| 320     *vertices = fVertices + info.vertexStartIndex(); | 320     *vertices = fVertices + info.vertexStartIndex(); | 
| 321 } | 321 } | 
| OLD | NEW | 
|---|