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

Side by Side Diff: src/gpu/batches/GrAtlasTextBatch.cpp

Issue 1606943002: A few more small changes to make GrAtlasTextBlob nearly self contained (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanuptext16
Patch Set: cleanup Created 4 years, 11 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/GrAtlasTextBlob.h » ('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 "GrAtlasTextBatch.h" 8 #include "GrAtlasTextBatch.h"
9 9
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 SkColor* vcolor = reinterpret_cast<SkColor*>(vertex + colorOffset); 114 SkColor* vcolor = reinterpret_cast<SkColor*>(vertex + colorOffset);
115 *vcolor = color; 115 *vcolor = color;
116 } 116 }
117 117
118 if (regenTexCoords) { 118 if (regenTexCoords) {
119 SkIPoint16* textureCoords = reinterpret_cast<SkIPoint16*>(vertex + texCo ordOffset); 119 SkIPoint16* textureCoords = reinterpret_cast<SkIPoint16*>(vertex + texCo ordOffset);
120 textureCoords->set(u1, v0); 120 textureCoords->set(u1, v0);
121 } 121 }
122 } 122 }
123 123
124 typedef GrAtlasTextBlob Blob;
125 typedef Blob::Run Run;
126 typedef Run::SubRunInfo TextInfo;
127
128 template <bool regenPos, bool regenCol, bool regenTexCoords, bool regenGlyphs> 124 template <bool regenPos, bool regenCol, bool regenTexCoords, bool regenGlyphs>
129 inline void GrAtlasTextBatch::regenBlob(Target* target, FlushInfo* flushInfo, Bl ob* blob, Run* run, 125 inline void GrAtlasTextBatch::regenBlob(Target* target, FlushInfo* flushInfo, Bl ob* blob, Run* run,
130 TextInfo* info, SkGlyphCache** cache, 126 TextInfo* info, SkGlyphCache** cache,
131 SkTypeface** typeface, GrFontScaler** sc aler, 127 SkTypeface** typeface, GrFontScaler** sc aler,
132 const SkDescriptor** desc, const GrGeome tryProcessor* gp, 128 const SkDescriptor** desc, const GrGeome tryProcessor* gp,
133 int glyphCount, size_t vertexStride, 129 int glyphCount, size_t vertexStride,
134 GrColor color, SkScalar transX, SkScalar transY) const { 130 GrColor color, SkScalar transX, SkScalar transY) const {
135 static_assert(!regenGlyphs || regenTexCoords, "must regenTexCoords along reg enGlyphs"); 131 static_assert(!regenGlyphs || regenTexCoords, "must regenTexCoords along reg enGlyphs");
136 GrBatchTextStrike* strike = nullptr; 132 GrBatchTextStrike* strike = nullptr;
137 if (regenTexCoords) { 133 if (regenTexCoords) {
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 return GrDistanceFieldA8TextGeoProc::Create(color, 547 return GrDistanceFieldA8TextGeoProc::Create(color,
552 viewMatrix, 548 viewMatrix,
553 texture, 549 texture,
554 params, 550 params,
555 flags, 551 flags,
556 this->usesLocalCoords()); 552 this->usesLocalCoords());
557 #endif 553 #endif
558 } 554 }
559 555
560 } 556 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/text/GrAtlasTextBlob.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698