Chromium Code Reviews| Index: src/gpu/GrOptDrawState.cpp |
| diff --git a/src/gpu/GrOptDrawState.cpp b/src/gpu/GrOptDrawState.cpp |
| index 529e9ed75e9bbe5bc773de378474da442afe91d2..16d0d13a2a5965f61d2f53c09293ac1ade88f98c 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) processors should do this themselves |
|
bsalomon
2014/11/07 14:44:03
don't care if you change it, but just want to clar
|
| + fGeometryProcessor.reset(GrDefaultGeoProcFactory::Create()); |
| } else { |
| fGeometryProcessor.reset(NULL); |
| } |