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

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

Issue 1355353002: Create GrDraw and start fast pathing src over rects (Closed) Base URL: https://skia.googlesource.com/skia.git@strokerect2
Patch Set: tweaks Created 5 years, 2 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 | « include/gpu/GrDrawContext.h ('k') | src/gpu/GrDrawContext.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 2125 matching lines...) Expand 10 before | Expand all | Expand 10 after
2136 for (int subRun = 0; subRun < cacheBlob->fRuns[run].fSubRunInfo.count(); sub Run++) { 2136 for (int subRun = 0; subRun < cacheBlob->fRuns[run].fSubRunInfo.count(); sub Run++) {
2137 const PerSubRunInfo& info = cacheBlob->fRuns[run].fSubRunInfo[subRun]; 2137 const PerSubRunInfo& info = cacheBlob->fRuns[run].fSubRunInfo[subRun];
2138 int glyphCount = info.fGlyphEndIndex - info.fGlyphStartIndex; 2138 int glyphCount = info.fGlyphEndIndex - info.fGlyphStartIndex;
2139 if (0 == glyphCount) { 2139 if (0 == glyphCount) {
2140 continue; 2140 continue;
2141 } 2141 }
2142 2142
2143 SkAutoTUnref<GrDrawBatch> batch(this->createBatch(cacheBlob, info, glyph Count, run, 2143 SkAutoTUnref<GrDrawBatch> batch(this->createBatch(cacheBlob, info, glyph Count, run,
2144 subRun, color, transX, transY, 2144 subRun, color, transX, transY,
2145 skPaint)); 2145 skPaint));
2146 dc->drawBatch(pipelineBuilder, batch); 2146 dc->drawBatch(*pipelineBuilder, batch);
2147 } 2147 }
2148 } 2148 }
2149 2149
2150 inline void GrAtlasTextContext::flushBigGlyphs(GrAtlasTextBlob* cacheBlob, 2150 inline void GrAtlasTextContext::flushBigGlyphs(GrAtlasTextBlob* cacheBlob,
2151 GrDrawContext* dc, GrRenderTarget * rt, 2151 GrDrawContext* dc, GrRenderTarget * rt,
2152 const GrClip& clip, const SkPaint & skPaint, 2152 const GrClip& clip, const SkPaint & skPaint,
2153 SkScalar transX, SkScalar transY, 2153 SkScalar transX, SkScalar transY,
2154 const SkIRect& clipBounds) { 2154 const SkIRect& clipBounds) {
2155 if (!cacheBlob->fBigGlyphs.count()) { 2155 if (!cacheBlob->fBigGlyphs.count()) {
2156 return; 2156 return;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
2282 gTextContext->createDrawTextBlob(rt, clip, grPaint, skPaint, viewMat rix, text, 2282 gTextContext->createDrawTextBlob(rt, clip, grPaint, skPaint, viewMat rix, text,
2283 static_cast<size_t>(textLen), 0, 0, noClip)); 2283 static_cast<size_t>(textLen), 0, 0, noClip));
2284 2284
2285 SkScalar transX = static_cast<SkScalar>(random->nextU()); 2285 SkScalar transX = static_cast<SkScalar>(random->nextU());
2286 SkScalar transY = static_cast<SkScalar>(random->nextU()); 2286 SkScalar transY = static_cast<SkScalar>(random->nextU());
2287 const GrAtlasTextBlob::Run::SubRunInfo& info = blob->fRuns[0].fSubRunInfo[0] ; 2287 const GrAtlasTextBlob::Run::SubRunInfo& info = blob->fRuns[0].fSubRunInfo[0] ;
2288 return gTextContext->createBatch(blob, info, textLen, 0, 0, color, transX, t ransY, skPaint); 2288 return gTextContext->createBatch(blob, info, textLen, 0, 0, color, transX, t ransY, skPaint);
2289 } 2289 }
2290 2290
2291 #endif 2291 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrDrawContext.h ('k') | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698