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

Unified Diff: src/gpu/GrDefaultPathRenderer.cpp

Issue 761563002: First step to moving vertex attributes to the geometryProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: adding test to ignore Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrDefaultGeoProcFactory.cpp ('k') | src/gpu/GrDistanceFieldTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDefaultPathRenderer.cpp
diff --git a/src/gpu/GrDefaultPathRenderer.cpp b/src/gpu/GrDefaultPathRenderer.cpp
index 3b31e876a236af01ce4ed793e8a6203caa987847..4d9026f08606e6470e4440f92ddead91a17972a8 100644
--- a/src/gpu/GrDefaultPathRenderer.cpp
+++ b/src/gpu/GrDefaultPathRenderer.cpp
@@ -233,10 +233,12 @@ bool GrDefaultPathRenderer::createGeom(GrDrawTarget* target,
}
}
- drawState->setDefaultVertexAttribs();
- if (!arg->set(target, maxPts, drawState->getVertexStride(), maxIdxs)) {
+ // TODO this is really wierd, I just need default vertex stride, can I think of a better way?
+ SkAutoTUnref<const GrGeometryProcessor> gp(GrDefaultGeoProcFactory::Create());
+ if (!arg->set(target, maxPts, gp->getVertexStride(), maxIdxs)) {
return false;
}
+ SkASSERT(gp->getVertexStride() == sizeof(SkPoint));
uint16_t* idxBase = reinterpret_cast<uint16_t*>(arg->indices());
uint16_t* idx = idxBase;
@@ -497,7 +499,7 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawTarget* target,
drawState->enableState(GrDrawState::kNoColorWrites_StateBit);
}
GrDrawState::AutoRestoreEffects are(drawState);
- drawState->setGeometryProcessor(GrDefaultGeoProcFactory::Create(false))->unref();
+ drawState->setGeometryProcessor(GrDefaultGeoProcFactory::Create())->unref();
if (indexCnt) {
target->drawIndexed(drawState,
primType,
« no previous file with comments | « src/gpu/GrDefaultGeoProcFactory.cpp ('k') | src/gpu/GrDistanceFieldTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698