aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrOptDrawState.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrOptDrawState.cpp')
-rw-r--r--src/gpu/GrOptDrawState.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gpu/GrOptDrawState.cpp b/src/gpu/GrOptDrawState.cpp
index 529e9ed75e..a9d8ec4888 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);
}