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

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

Issue 1265763002: Args structs to GrPathRenderer functions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more 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/GrDefaultPathRenderer.cpp ('k') | src/gpu/GrPathRenderer.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 "GrAARectRenderer.h" 9 #include "GrAARectRenderer.h"
10 #include "GrAtlasTextContext.h" 10 #include "GrAtlasTextContext.h"
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 true, type); 1176 true, type);
1177 } 1177 }
1178 1178
1179 if (NULL == pr) { 1179 if (NULL == pr) {
1180 #ifdef SK_DEBUG 1180 #ifdef SK_DEBUG
1181 SkDebugf("Unable to find path renderer compatible with path.\n"); 1181 SkDebugf("Unable to find path renderer compatible with path.\n");
1182 #endif 1182 #endif
1183 return; 1183 return;
1184 } 1184 }
1185 1185
1186 pr->drawPath(target, pipelineBuilder, color, viewMatrix, *pathPtr, *strokeIn foPtr, useCoverageAA); 1186 GrPathRenderer::DrawPathArgs args;
1187 args.fTarget = target;
1188 args.fResourceProvider = fContext->resourceProvider();
1189 args.fPipelineBuilder = pipelineBuilder;
1190 args.fColor = color;
1191 args.fViewMatrix = &viewMatrix;
1192 args.fPath = pathPtr;
1193 args.fStroke = strokeInfoPtr;
1194 args.fAntiAlias = useCoverageAA;
1195 pr->drawPath(args);
1187 } 1196 }
1188 1197
1189 bool GrDrawContext::prepareToDraw(GrRenderTarget* rt) { 1198 bool GrDrawContext::prepareToDraw(GrRenderTarget* rt) {
1190 RETURN_FALSE_IF_ABANDONED 1199 RETURN_FALSE_IF_ABANDONED
1191 1200
1192 ASSERT_OWNED_RESOURCE(rt); 1201 ASSERT_OWNED_RESOURCE(rt);
1193 SkASSERT(rt); 1202 SkASSERT(rt);
1194 return true; 1203 return true;
1195 } 1204 }
1196 1205
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 return DrawVerticesBatch::Create(geometry, type, viewMatrix, 1327 return DrawVerticesBatch::Create(geometry, type, viewMatrix,
1319 positions.begin(), vertexCount, 1328 positions.begin(), vertexCount,
1320 indices.begin(), hasIndices ? vertexCount : 0, 1329 indices.begin(), hasIndices ? vertexCount : 0,
1321 colors.begin(), 1330 colors.begin(),
1322 texCoords.begin(), 1331 texCoords.begin(),
1323 bounds); 1332 bounds);
1324 } 1333 }
1325 1334
1326 #endif 1335 #endif
1327 1336
OLDNEW
« no previous file with comments | « src/gpu/GrDefaultPathRenderer.cpp ('k') | src/gpu/GrPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698