diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-06-22 18:18:08 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-06-22 18:18:08 +0000 |
commit | 1b1e201ea395e9b97778e9a709b7e5a251e35a56 (patch) | |
tree | dd7481505241720fa2fa81cba6f16218ccd3280e | |
parent | 6756209ee0a0103d395ac908edbdcf5268b920da (diff) |
Revert #if 0ed out code accidentally committed as part of r4299.
git-svn-id: http://skia.googlecode.com/svn/trunk@4309 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | src/gpu/gl/GrGpuGL.cpp | 84 |
1 files changed, 1 insertions, 83 deletions
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp index 6c0d4b278e..5b03500fc3 100644 --- a/src/gpu/gl/GrGpuGL.cpp +++ b/src/gpu/gl/GrGpuGL.cpp @@ -1734,90 +1734,8 @@ void GrGpuGL::onGpuDrawNonIndexed(GrPrimitiveType type, #endif } -void GrGpuGL::onGpuStencilPath(const GrPath& path, GrPathFill fill) { +void GrGpuGL::onGpuStencilPath(const GrPath&, GrPathFill) { GrCrash("Not implemented yet. Should not get here."); -#if 0 - GrGLuint id = static_cast<const GrGLPath*>(&path)->pathID(); - GrDrawState* drawState = this->drawState(); - GrAssert(NULL != drawState->getRenderTarget()); - if (NULL == drawState->getRenderTarget()->getStencilBuffer()) { - return; - } - GrRenderTarget* rt = drawState->getRenderTarget(); - - GrGLint stencilBits = rt->getStencilBuffer()->bits(); - GrGLuint clipStencilMask = 1 << (stencilBits -1); - GrGLuint userStencilMask = clipStencilMask - 1; - unsigned ref = 0; - unsigned mask = 0; - GrStencilFunc func = ConvertStencilFuncAndMask(kAlwaysIfInClip_StencilFunc, - fClipMaskManager.isClipInStencil() && drawState->isClipState(), - clipStencilMask, - userStencilMask, - &ref, - &mask); - const GrMatrix& m = drawState->getViewMatrix(); - // We use the GL model view matrix to hold the draw state's view matrix - // and the GL projection matrix to convert to normalized y-up coords. - GrGLfloat mv[] = { - // col 0 - GrScalarToFloat(m[GrMatrix::kMScaleX]), - GrScalarToFloat(m[GrMatrix::kMSkewY]), - 0, - GrScalarToFloat(m[GrMatrix::kMPersp0]), - - // col 1 - GrScalarToFloat(m[GrMatrix::kMSkewX]), - GrScalarToFloat(m[GrMatrix::kMScaleY]), - 0, - GrScalarToFloat(m[GrMatrix::kMPersp1]), - - // col 2 - 0, 0, 0, 0, - - // col3 - GrScalarToFloat(m[GrMatrix::kMTransX]), - GrScalarToFloat(m[GrMatrix::kMTransY]), - 0.5f, - GrScalarToFloat(m[GrMatrix::kMPersp2]) - }; - GrGLfloat p[] = { - // col 0 - 2.f / rt->width(), 0, 0, 0, - - // col 1 - 0, -2.f / rt->height(), 0, 0, - - // col 2 - 0, 0, 1.f, 0, - - // col 3 - -1.f, 1.f, 0, 1.f, - }; - GL_CALL(MatrixMode(GR_GL_MODELVIEW)); - GL_CALL(LoadMatrixf(mv)); - GL_CALL(MatrixMode(GR_GL_PROJECTION)); - GL_CALL(LoadMatrixf(p)); - - GL_CALL(Enable(GR_GL_STENCIL_TEST)); - GL_CALL(PathStencilFunc(grToGLStencilFunc[func], ref, mask)); - fHWStencilSettings.invalidate(); - - // Decide how to manipulate the stencil buffer based on the fill rule. - GrGLenum fillMode; - switch (fill) { - case kWinding_PathFill: - fillMode = GR_GL_COUNT_UP; - break; - case kEvenOdd_PathFill: - fillMode = GR_GL_INVERT; - break; - default: - // Only the above two fill rules are allowed. - GrCrash("Invalid fill rule."); - } - GL_CALL(StencilFillPath(id, fillMode, mask)); -#endif } void GrGpuGL::onResolveRenderTarget(GrRenderTarget* target) { |