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

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

Issue 1457373003: Add more batch information printouts (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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/batches/GrAAFillRectBatch.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 #include "GrAtlasTextContext.h" 7 #include "GrAtlasTextContext.h"
8 8
9 #include "GrBatchFontCache.h" 9 #include "GrBatchFontCache.h"
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after
1328 SkRect bounds = run.fVertexBounds; 1328 SkRect bounds = run.fVertexBounds;
1329 fBatch.fViewMatrix.mapRect(&bounds); 1329 fBatch.fViewMatrix.mapRect(&bounds);
1330 this->setBounds(bounds); 1330 this->setBounds(bounds);
1331 } else { 1331 } else {
1332 this->setBounds(run.fVertexBounds); 1332 this->setBounds(run.fVertexBounds);
1333 } 1333 }
1334 } 1334 }
1335 1335
1336 const char* name() const override { return "TextBatch"; } 1336 const char* name() const override { return "TextBatch"; }
1337 1337
1338 SkString dumpInfo() const override {
1339 SkString str;
1340
1341 for (int i = 0; i < fGeoCount; ++i) {
1342 str.appendf("%d: Color: 0x%08x Trans: %.2f,%.2f Runs: %d\n",
1343 i,
1344 fGeoData[i].fColor,
1345 fGeoData[i].fTransX,
1346 fGeoData[i].fTransY,
1347 fGeoData[i].fBlob->fRunCount);
1348 }
1349
1350 str.append(INHERITED::dumpInfo());
1351 return str;
1352 }
1353
1338 void getInvariantOutputColor(GrInitInvariantOutput* out) const override { 1354 void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
1339 if (kColorBitmapMask_MaskType == fMaskType) { 1355 if (kColorBitmapMask_MaskType == fMaskType) {
1340 out->setUnknownFourComponents(); 1356 out->setUnknownFourComponents();
1341 } else { 1357 } else {
1342 out->setKnownFourComponents(fBatch.fColor); 1358 out->setKnownFourComponents(fBatch.fColor);
1343 } 1359 }
1344 } 1360 }
1345 1361
1346 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { 1362 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
1347 switch (fMaskType) { 1363 switch (fMaskType) {
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
2107 gTextContext->createDrawTextBlob(rt, clip, grPaint, skPaint, viewMat rix, text, 2123 gTextContext->createDrawTextBlob(rt, clip, grPaint, skPaint, viewMat rix, text,
2108 static_cast<size_t>(textLen), 0, 0, noClip)); 2124 static_cast<size_t>(textLen), 0, 0, noClip));
2109 2125
2110 SkScalar transX = static_cast<SkScalar>(random->nextU()); 2126 SkScalar transX = static_cast<SkScalar>(random->nextU());
2111 SkScalar transY = static_cast<SkScalar>(random->nextU()); 2127 SkScalar transY = static_cast<SkScalar>(random->nextU());
2112 const GrAtlasTextBlob::Run::SubRunInfo& info = blob->fRuns[0].fSubRunInfo[0] ; 2128 const GrAtlasTextBlob::Run::SubRunInfo& info = blob->fRuns[0].fSubRunInfo[0] ;
2113 return gTextContext->createBatch(blob, info, textLen, 0, 0, color, transX, t ransY, skPaint); 2129 return gTextContext->createBatch(blob, info, textLen, 0, 0, color, transX, t ransY, skPaint);
2114 } 2130 }
2115 2131
2116 #endif 2132 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/batches/GrAAFillRectBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698