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

Unified Diff: src/gpu/gl/GrGLProgramDesc.cpp

Issue 678953002: Default geometry processor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix dm bug Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: src/gpu/gl/GrGLProgramDesc.cpp
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp
index 79088137caa004519ddcd91d2ad13ad000f5ab40..fafcfbaae470d4dc1e38f962de211f57a3b38d59 100644
--- a/src/gpu/gl/GrGLProgramDesc.cpp
+++ b/src/gpu/gl/GrGLProgramDesc.cpp
@@ -224,8 +224,11 @@ bool GrGLProgramDesc::Build(const GrOptDrawState& optState,
int offsetAndSizeIndex = 0;
- // We can only have one effect which touches the vertex shader
- if (optState.hasGeometryProcessor()) {
+ bool noGP = gpu->caps()->pathRenderingSupport() && GrGpu::IsPathRenderingDrawType(drawType);
+
+ // We can only have one effect which touches the vertex shader, optState will install a
+ // default GP if none are available
+ if (!noGP) {
if (!BuildStagedProcessorKey<GeometryProcessorKeyBuilder>(*optState.getGeometryProcessor(),
gpu->glCaps(),
false,
@@ -253,15 +256,13 @@ bool GrGLProgramDesc::Build(const GrOptDrawState& optState,
// make sure any padding in the header is zeroed.
memset(header, 0, kHeaderSize);
- header->fHasGeometryProcessor = optState.hasGeometryProcessor();
-
header->fEmitsPointSize = GrGpu::kDrawPoints_DrawType == drawType;
- if (gpu->caps()->pathRenderingSupport() &&
- GrGpu::IsPathRenderingDrawType(drawType) &&
+ if (noGP &&
gpu->glPathRendering()->texturingMode() == GrGLPathRendering::FixedFunction_TexturingMode) {
+ // We still have a default geometry processor installed on the opt draw state, but it is
bsalomon 2014/10/27 13:43:43 I think we will have to figure out how to make the
+ // ignored for generating keys, and also ignored in the programbuilder
header->fUseFragShaderOnly = true;
- SkASSERT(!optState.hasGeometryProcessor());
} else {
header->fUseFragShaderOnly = false;
}

Powered by Google App Engine
This is Rietveld 408576698