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 "GrGLGpu.h" | 8 #include "GrGLGpu.h" |
9 #include "GrGLBuffer.h" | 9 #include "GrGLBuffer.h" |
10 #include "GrGLGLSL.h" | 10 #include "GrGLGLSL.h" |
(...skipping 2973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2984 } | 2984 } |
2985 fHWStencilSettings = stencilSettings; | 2985 fHWStencilSettings = stencilSettings; |
2986 } | 2986 } |
2987 } | 2987 } |
2988 | 2988 |
2989 void GrGLGpu::flushHWAAState(GrRenderTarget* rt, bool useHWAA, bool stencilEnabl
ed) { | 2989 void GrGLGpu::flushHWAAState(GrRenderTarget* rt, bool useHWAA, bool stencilEnabl
ed) { |
2990 // rt is only optional if useHWAA is false. | 2990 // rt is only optional if useHWAA is false. |
2991 SkASSERT(rt || !useHWAA); | 2991 SkASSERT(rt || !useHWAA); |
2992 SkASSERT(!useHWAA || rt->isStencilBufferMultisampled()); | 2992 SkASSERT(!useHWAA || rt->isStencilBufferMultisampled()); |
2993 | 2993 |
2994 if (this->glCaps().multisampleDisableSupport()) { | 2994 if (this->caps()->multisampleDisableSupport()) { |
2995 if (useHWAA) { | 2995 if (useHWAA) { |
2996 if (kYes_TriState != fMSAAEnabled) { | 2996 if (kYes_TriState != fMSAAEnabled) { |
2997 GL_CALL(Enable(GR_GL_MULTISAMPLE)); | 2997 GL_CALL(Enable(GR_GL_MULTISAMPLE)); |
2998 fMSAAEnabled = kYes_TriState; | 2998 fMSAAEnabled = kYes_TriState; |
2999 } | 2999 } |
3000 } else { | 3000 } else { |
3001 if (kNo_TriState != fMSAAEnabled) { | 3001 if (kNo_TriState != fMSAAEnabled) { |
3002 GL_CALL(Disable(GR_GL_MULTISAMPLE)); | 3002 GL_CALL(Disable(GR_GL_MULTISAMPLE)); |
3003 fMSAAEnabled = kNo_TriState; | 3003 fMSAAEnabled = kNo_TriState; |
3004 } | 3004 } |
(...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4645 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || | 4645 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || |
4646 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { | 4646 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { |
4647 copyParams->fFilter = GrTextureParams::kNone_FilterMode; | 4647 copyParams->fFilter = GrTextureParams::kNone_FilterMode; |
4648 copyParams->fWidth = texture->width(); | 4648 copyParams->fWidth = texture->width(); |
4649 copyParams->fHeight = texture->height(); | 4649 copyParams->fHeight = texture->height(); |
4650 return true; | 4650 return true; |
4651 } | 4651 } |
4652 } | 4652 } |
4653 return false; | 4653 return false; |
4654 } | 4654 } |
OLD | NEW |