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

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

Issue 1337513002: Late creation of GrPathProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 3 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/GrDrawTarget.h » ('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 /* 2 /*
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrAtlasTextContext.h" 9 #include "GrAtlasTextContext.h"
10 #include "GrBatchTest.h" 10 #include "GrBatchTest.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 SkDrawFilter* filter, const SkIRect& clipBounds ) { 105 SkDrawFilter* filter, const SkIRect& clipBounds ) {
106 if (!fTextContext) { 106 if (!fTextContext) {
107 fTextContext = this->createTextContext(rt, fSurfaceProps); 107 fTextContext = this->createTextContext(rt, fSurfaceProps);
108 } 108 }
109 109
110 fTextContext->drawTextBlob(this, rt, 110 fTextContext->drawTextBlob(this, rt,
111 clip, skPaint, viewMatrix, blob, x, y, filter, cl ipBounds); 111 clip, skPaint, viewMatrix, blob, x, y, filter, cl ipBounds);
112 } 112 }
113 113
114 void GrDrawContext::drawPathsFromRange(const GrPipelineBuilder* pipelineBuilder, 114 void GrDrawContext::drawPathsFromRange(const GrPipelineBuilder* pipelineBuilder,
115 const GrPathProcessor* pathProc, 115 const SkMatrix& viewMatrix,
116 const SkMatrix& localMatrix,
117 GrColor color,
116 GrPathRangeDraw* draw, 118 GrPathRangeDraw* draw,
117 int /*GrPathRendering::FillType*/ fill) { 119 int /*GrPathRendering::FillType*/ fill) {
118 fDrawTarget->drawPathsFromRange(*pipelineBuilder, pathProc, draw, 120 fDrawTarget->drawPathsFromRange(*pipelineBuilder, viewMatrix, localMatrix, c olor, draw,
119 (GrPathRendering::FillType) fill); 121 (GrPathRendering::FillType) fill);
120 } 122 }
121 123
122 void GrDrawContext::discard(GrRenderTarget* renderTarget) { 124 void GrDrawContext::discard(GrRenderTarget* renderTarget) {
123 RETURN_IF_ABANDONED 125 RETURN_IF_ABANDONED
124 SkASSERT(renderTarget); 126 SkASSERT(renderTarget);
125 AutoCheckFlush acf(fContext); 127 AutoCheckFlush acf(fContext);
126 if (!this->prepareToDraw(renderTarget)) { 128 if (!this->prepareToDraw(renderTarget)) {
127 return; 129 return;
128 } 130 }
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 RETURN_FALSE_IF_ABANDONED 755 RETURN_FALSE_IF_ABANDONED
754 756
755 ASSERT_OWNED_RESOURCE(rt); 757 ASSERT_OWNED_RESOURCE(rt);
756 SkASSERT(rt); 758 SkASSERT(rt);
757 return true; 759 return true;
758 } 760 }
759 761
760 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b atch) { 762 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b atch) {
761 fDrawTarget->drawBatch(*pipelineBuilder, batch); 763 fDrawTarget->drawBatch(*pipelineBuilder, batch);
762 } 764 }
OLDNEW
« no previous file with comments | « include/gpu/GrDrawContext.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698