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

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

Issue 1274513005: Rename GrPipelineInfo to GrPipelineOptimizations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 4 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/GrAALinearizingConvexPathRenderer.cpp ('k') | src/gpu/GrDefaultPathRenderer.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 "GrBatchTarget.h" 10 #include "GrBatchTarget.h"
(...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1508 case kLCDCoverageMask_MaskType: 1508 case kLCDCoverageMask_MaskType:
1509 case kLCDDistanceField_MaskType: 1509 case kLCDDistanceField_MaskType:
1510 out->setUnknownOpaqueFourComponents(); 1510 out->setUnknownOpaqueFourComponents();
1511 out->setUsingLCDCoverage(); 1511 out->setUsingLCDCoverage();
1512 break; 1512 break;
1513 case kColorBitmapMask_MaskType: 1513 case kColorBitmapMask_MaskType:
1514 out->setKnownSingleComponent(0xff); 1514 out->setKnownSingleComponent(0xff);
1515 } 1515 }
1516 } 1516 }
1517 1517
1518 void initBatchTracker(const GrPipelineInfo& init) override { 1518 void initBatchTracker(const GrPipelineOptimizations& opt) override {
1519 // Handle any color overrides 1519 // Handle any color overrides
1520 if (!init.readsColor()) { 1520 if (!opt.readsColor()) {
1521 fGeoData[0].fColor = GrColor_ILLEGAL; 1521 fGeoData[0].fColor = GrColor_ILLEGAL;
1522 } 1522 }
1523 init.getOverrideColorIfSet(&fGeoData[0].fColor); 1523 opt.getOverrideColorIfSet(&fGeoData[0].fColor);
1524 1524
1525 // setup batch properties 1525 // setup batch properties
1526 fBatch.fColorIgnored = !init.readsColor(); 1526 fBatch.fColorIgnored = !opt.readsColor();
1527 fBatch.fColor = fGeoData[0].fColor; 1527 fBatch.fColor = fGeoData[0].fColor;
1528 fBatch.fUsesLocalCoords = init.readsLocalCoords(); 1528 fBatch.fUsesLocalCoords = opt.readsLocalCoords();
1529 fBatch.fCoverageIgnored = !init.readsCoverage(); 1529 fBatch.fCoverageIgnored = !opt.readsCoverage();
1530 } 1530 }
1531 1531
1532 struct FlushInfo { 1532 struct FlushInfo {
1533 SkAutoTUnref<const GrVertexBuffer> fVertexBuffer; 1533 SkAutoTUnref<const GrVertexBuffer> fVertexBuffer;
1534 SkAutoTUnref<const GrIndexBuffer> fIndexBuffer; 1534 SkAutoTUnref<const GrIndexBuffer> fIndexBuffer;
1535 int fGlyphsToFlush; 1535 int fGlyphsToFlush;
1536 int fVertexOffset; 1536 int fVertexOffset;
1537 }; 1537 };
1538 1538
1539 void generateGeometry(GrBatchTarget* batchTarget) override { 1539 void generateGeometry(GrBatchTarget* batchTarget) override {
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
2283 gTextContext->createDrawTextBlob(rt, clip, grPaint, skPaint, viewMat rix, text, 2283 gTextContext->createDrawTextBlob(rt, clip, grPaint, skPaint, viewMat rix, text,
2284 static_cast<size_t>(textLen), 0, 0, noClip)); 2284 static_cast<size_t>(textLen), 0, 0, noClip));
2285 2285
2286 SkScalar transX = static_cast<SkScalar>(random->nextU()); 2286 SkScalar transX = static_cast<SkScalar>(random->nextU());
2287 SkScalar transY = static_cast<SkScalar>(random->nextU()); 2287 SkScalar transY = static_cast<SkScalar>(random->nextU());
2288 const GrAtlasTextBlob::Run::SubRunInfo& info = blob->fRuns[0].fSubRunInfo[0] ; 2288 const GrAtlasTextBlob::Run::SubRunInfo& info = blob->fRuns[0].fSubRunInfo[0] ;
2289 return gTextContext->createBatch(blob, info, textLen, 0, 0, color, transX, t ransY, skPaint); 2289 return gTextContext->createBatch(blob, info, textLen, 0, 0, color, transX, t ransY, skPaint);
2290 } 2290 }
2291 2291
2292 #endif 2292 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAALinearizingConvexPathRenderer.cpp ('k') | src/gpu/GrDefaultPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698