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

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

Issue 1287973003: Check for xfer barriers in GrBatch, auto-issue barriers in GrGpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment 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/GrBufferedDrawTarget.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 1875 matching lines...) Expand 10 before | Expand all | Expand 10 after
1886 batchTarget->draw(vertices); 1886 batchTarget->draw(vertices);
1887 flushInfo->fVertexOffset += kVerticesPerGlyph * flushInfo->fGlyphsToFlus h; 1887 flushInfo->fVertexOffset += kVerticesPerGlyph * flushInfo->fGlyphsToFlus h;
1888 flushInfo->fGlyphsToFlush = 0; 1888 flushInfo->fGlyphsToFlush = 0;
1889 } 1889 }
1890 1890
1891 GrColor color() const { return fBatch.fColor; } 1891 GrColor color() const { return fBatch.fColor; }
1892 const SkMatrix& viewMatrix() const { return fBatch.fViewMatrix; } 1892 const SkMatrix& viewMatrix() const { return fBatch.fViewMatrix; }
1893 bool usesLocalCoords() const { return fBatch.fUsesLocalCoords; } 1893 bool usesLocalCoords() const { return fBatch.fUsesLocalCoords; }
1894 int numGlyphs() const { return fBatch.fNumGlyphs; } 1894 int numGlyphs() const { return fBatch.fNumGlyphs; }
1895 1895
1896 bool onCombineIfPossible(GrBatch* t) override { 1896 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override {
1897 if (!this->pipeline()->isEqual(*t->pipeline())) { 1897 if (!GrPipeline::CanCombine(*this->pipeline(), this->bounds(), *t->pipel ine(), t->bounds(),
1898 caps)) {
1898 return false; 1899 return false;
1899 } 1900 }
1900 1901
1901 TextBatch* that = t->cast<TextBatch>(); 1902 TextBatch* that = t->cast<TextBatch>();
1902 1903
1903 if (fMaskType != that->fMaskType) { 1904 if (fMaskType != that->fMaskType) {
1904 return false; 1905 return false;
1905 } 1906 }
1906 1907
1907 if (!this->usesDistanceFields()) { 1908 if (!this->usesDistanceFields()) {
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
2283 gTextContext->createDrawTextBlob(rt, clip, grPaint, skPaint, viewMat rix, text, 2284 gTextContext->createDrawTextBlob(rt, clip, grPaint, skPaint, viewMat rix, text,
2284 static_cast<size_t>(textLen), 0, 0, noClip)); 2285 static_cast<size_t>(textLen), 0, 0, noClip));
2285 2286
2286 SkScalar transX = static_cast<SkScalar>(random->nextU()); 2287 SkScalar transX = static_cast<SkScalar>(random->nextU());
2287 SkScalar transY = static_cast<SkScalar>(random->nextU()); 2288 SkScalar transY = static_cast<SkScalar>(random->nextU());
2288 const GrAtlasTextBlob::Run::SubRunInfo& info = blob->fRuns[0].fSubRunInfo[0] ; 2289 const GrAtlasTextBlob::Run::SubRunInfo& info = blob->fRuns[0].fSubRunInfo[0] ;
2289 return gTextContext->createBatch(blob, info, textLen, 0, 0, color, transX, t ransY, skPaint); 2290 return gTextContext->createBatch(blob, info, textLen, 0, 0, color, transX, t ransY, skPaint);
2290 } 2291 }
2291 2292
2292 #endif 2293 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAALinearizingConvexPathRenderer.cpp ('k') | src/gpu/GrBufferedDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698