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

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

Issue 1227933003: fix for valgrind issue (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more tweaks Created 5 years, 5 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 | « src/gpu/GrAARectRenderer.cpp ('k') | 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 #include "GrAtlasTextContext.h" 7 #include "GrAtlasTextContext.h"
8 8
9 #include "GrBatch.h" 9 #include "GrBatch.h"
10 #include "GrBatchFontCache.h" 10 #include "GrBatchFontCache.h"
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 } else { 1492 } else {
1493 out->setUnknownFourComponents(); 1493 out->setUnknownFourComponents();
1494 out->setUsingLCDCoverage(); 1494 out->setUsingLCDCoverage();
1495 } 1495 }
1496 } 1496 }
1497 } 1497 }
1498 1498
1499 void initBatchTracker(const GrPipelineInfo& init) override { 1499 void initBatchTracker(const GrPipelineInfo& init) override {
1500 // Handle any color overrides 1500 // Handle any color overrides
1501 if (!init.readsColor()) { 1501 if (!init.readsColor()) {
1502 fBatch.fColor = GrColor_ILLEGAL; 1502 fGeoData[0].fColor = GrColor_ILLEGAL;
1503 } 1503 }
1504 init.getOverrideColorIfSet(&fBatch.fColor); 1504 init.getOverrideColorIfSet(&fGeoData[0].fColor);
1505 1505
1506 // setup batch properties 1506 // setup batch properties
1507 fBatch.fColorIgnored = !init.readsColor(); 1507 fBatch.fColorIgnored = !init.readsColor();
1508 fBatch.fColor = fGeoData[0].fColor;
1508 fBatch.fUsesLocalCoords = init.readsLocalCoords(); 1509 fBatch.fUsesLocalCoords = init.readsLocalCoords();
1509 fBatch.fCoverageIgnored = !init.readsCoverage(); 1510 fBatch.fCoverageIgnored = !init.readsCoverage();
1510 } 1511 }
1511 1512
1512 struct FlushInfo { 1513 struct FlushInfo {
1513 SkAutoTUnref<const GrVertexBuffer> fVertexBuffer; 1514 SkAutoTUnref<const GrVertexBuffer> fVertexBuffer;
1514 SkAutoTUnref<const GrIndexBuffer> fIndexBuffer; 1515 SkAutoTUnref<const GrIndexBuffer> fIndexBuffer;
1515 int fGlyphsToFlush; 1516 int fGlyphsToFlush;
1516 int fVertexOffset; 1517 int fVertexOffset;
1517 }; 1518 };
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
2266 gTextContext->createDrawTextBlob(rt, clip, grPaint, skPaint, viewMat rix, text, 2267 gTextContext->createDrawTextBlob(rt, clip, grPaint, skPaint, viewMat rix, text,
2267 static_cast<size_t>(textLen), 0, 0, noClip)); 2268 static_cast<size_t>(textLen), 0, 0, noClip));
2268 2269
2269 SkScalar transX = static_cast<SkScalar>(random->nextU()); 2270 SkScalar transX = static_cast<SkScalar>(random->nextU());
2270 SkScalar transY = static_cast<SkScalar>(random->nextU()); 2271 SkScalar transY = static_cast<SkScalar>(random->nextU());
2271 const GrAtlasTextContext::BitmapTextBlob::Run::SubRunInfo& info = blob->fRun s[0].fSubRunInfo[0]; 2272 const GrAtlasTextContext::BitmapTextBlob::Run::SubRunInfo& info = blob->fRun s[0].fSubRunInfo[0];
2272 return gTextContext->createBatch(blob, info, textLen, 0, 0, color, transX, t ransY, skPaint); 2273 return gTextContext->createBatch(blob, info, textLen, 0, 0, color, transX, t ransY, skPaint);
2273 } 2274 }
2274 2275
2275 #endif 2276 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAARectRenderer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698