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

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

Issue 1315563003: GrPathRangeBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix init order warning 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 | « src/gpu/GrCommandBuilder.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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 SkScalar x, SkScalar y, 104 SkScalar x, SkScalar y,
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::drawPaths(GrPipelineBuilder* pipelineBuilder, 114 void GrDrawContext::drawPathsFromRange(const GrPipelineBuilder* pipelineBuilder,
115 const GrPathProcessor* pathProc, 115 const GrPathProcessor* pathProc,
116 const GrPathRange* pathRange, 116 GrPathRangeDraw* draw,
117 const void* indices, 117 int /*GrPathRendering::FillType*/ fill) {
118 int /*GrDrawTarget::PathIndexType*/ indexType, 118 fDrawTarget->drawPathsFromRange(*pipelineBuilder, pathProc, draw,
119 const float transformValues[], 119 (GrPathRendering::FillType) fill);
120 int /*GrDrawTarget::PathTransformType*/ transformT ype,
121 int count,
122 int /*GrPathRendering::FillType*/ fill) {
123 fDrawTarget->drawPaths(*pipelineBuilder, pathProc, pathRange,
124 indices, (GrDrawTarget::PathIndexType) indexType,
125 transformValues,
126 (GrDrawTarget::PathTransformType) transformType,
127 count, (GrPathRendering::FillType) fill);
128 } 120 }
129 121
130 void GrDrawContext::discard(GrRenderTarget* renderTarget) { 122 void GrDrawContext::discard(GrRenderTarget* renderTarget) {
131 RETURN_IF_ABANDONED 123 RETURN_IF_ABANDONED
132 SkASSERT(renderTarget); 124 SkASSERT(renderTarget);
133 AutoCheckFlush acf(fContext); 125 AutoCheckFlush acf(fContext);
134 if (!this->prepareToDraw(renderTarget)) { 126 if (!this->prepareToDraw(renderTarget)) {
135 return; 127 return;
136 } 128 }
137 fDrawTarget->discard(renderTarget); 129 fDrawTarget->discard(renderTarget);
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 RETURN_FALSE_IF_ABANDONED 753 RETURN_FALSE_IF_ABANDONED
762 754
763 ASSERT_OWNED_RESOURCE(rt); 755 ASSERT_OWNED_RESOURCE(rt);
764 SkASSERT(rt); 756 SkASSERT(rt);
765 return true; 757 return true;
766 } 758 }
767 759
768 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b atch) { 760 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b atch) {
769 fDrawTarget->drawBatch(*pipelineBuilder, batch); 761 fDrawTarget->drawBatch(*pipelineBuilder, batch);
770 } 762 }
OLDNEW
« no previous file with comments | « src/gpu/GrCommandBuilder.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698