Index: src/gpu/GrOptDrawState.cpp |
diff --git a/src/gpu/GrOptDrawState.cpp b/src/gpu/GrOptDrawState.cpp |
index 529e9ed75e9bbe5bc773de378474da442afe91d2..a9d8ec48881c1fc77c7d8f6b86bd2f1e72e75f65 100644 |
--- a/src/gpu/GrOptDrawState.cpp |
+++ b/src/gpu/GrOptDrawState.cpp |
@@ -7,9 +7,10 @@ |
#include "GrOptDrawState.h" |
+#include "GrDefaultGeoProcFactory.h" |
#include "GrDrawState.h" |
#include "GrDrawTargetCaps.h" |
-#include "gl/GrGpuGL.h" |
+#include "GrGpu.h" |
GrOptDrawState::GrOptDrawState(const GrDrawState& drawState, |
BlendOptFlags blendOptFlags, |
@@ -63,6 +64,10 @@ GrOptDrawState::GrOptDrawState(const GrDrawState& drawState, |
// Copy GeometryProcesssor from DS or ODS |
if (drawState.hasGeometryProcessor()) { |
fGeometryProcessor.initAndRef(drawState.fGeometryProcessor); |
+ } else if (!GrGpu::IsPathRenderingDrawType(drawType)) { |
+ // Install default GP, this will be ignored if we are rendering with fragment shader only |
+ // TODO(joshualitt) rendering code should do this |
+ fGeometryProcessor.reset(GrDefaultGeoProcFactory::Create()); |
} else { |
fGeometryProcessor.reset(NULL); |
} |