| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "GrGLProgram.h" | 8 #include "GrGLProgram.h" |
| 9 | 9 |
| 10 #include "GrAllocator.h" | 10 #include "GrAllocator.h" |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 const GrPendingFragmentStage& proc, | 224 const GrPendingFragmentStage& proc, |
| 225 int index, | 225 int index, |
| 226 GrGLInstalledFragProc* ip) { | 226 GrGLInstalledFragProc* ip) { |
| 227 GrGLPathProcessor* pathProc = | 227 GrGLPathProcessor* pathProc = |
| 228 static_cast<GrGLPathProcessor*>(fGeometryProcessor.get()->fGLProc.ge
t()); | 228 static_cast<GrGLPathProcessor*>(fGeometryProcessor.get()->fGLProc.ge
t()); |
| 229 pathProc->setTransformData(primProc, index, proc.processor()->coordTransform
s(), | 229 pathProc->setTransformData(primProc, index, proc.processor()->coordTransform
s(), |
| 230 fGpu->glPathRendering(), fProgramID); | 230 fGpu->glPathRendering(), fProgramID); |
| 231 } | 231 } |
| 232 | 232 |
| 233 void GrGLNvprProgram::onSetRenderTargetState(const GrOptDrawState& optState) { | 233 void GrGLNvprProgram::onSetRenderTargetState(const GrOptDrawState& optState) { |
| 234 SkASSERT(GrGpu::IsPathRenderingDrawType(optState.drawType())); | 234 SkASSERT(GrGpu::IsPathRenderingDrawType(optState.drawType()) && |
| 235 !optState.getPrimitiveProcessor()->willUseGeoShader() && |
| 236 optState.getPrimitiveProcessor()->numAttribs() == 0); |
| 235 const GrRenderTarget* rt = optState.getRenderTarget(); | 237 const GrRenderTarget* rt = optState.getRenderTarget(); |
| 236 SkISize size; | 238 SkISize size; |
| 237 size.set(rt->width(), rt->height()); | 239 size.set(rt->width(), rt->height()); |
| 238 fGpu->glPathRendering()->setProjectionMatrix(optState.getPrimitiveProcessor(
)->viewMatrix(), | 240 fGpu->glPathRendering()->setProjectionMatrix(optState.getPrimitiveProcessor(
)->viewMatrix(), |
| 239 size, rt->origin()); | 241 size, rt->origin()); |
| 240 } | 242 } |
| OLD | NEW |