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 | 8 |
9 #include "GrGLGpu.h" | 9 #include "GrGLGpu.h" |
10 #include "GrGLStencilAttachment.h" | 10 #include "GrGLStencilAttachment.h" |
(...skipping 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2094 GrStencilSettings::kFront_Face); | 2094 GrStencilSettings::kFront_Face); |
2095 } | 2095 } |
2096 } | 2096 } |
2097 fHWStencilSettings = stencilSettings; | 2097 fHWStencilSettings = stencilSettings; |
2098 } | 2098 } |
2099 } | 2099 } |
2100 | 2100 |
2101 void GrGLGpu::flushHWAAState(GrRenderTarget* rt, bool useHWAA) { | 2101 void GrGLGpu::flushHWAAState(GrRenderTarget* rt, bool useHWAA) { |
2102 SkASSERT(!useHWAA || rt->isMultisampled()); | 2102 SkASSERT(!useHWAA || rt->isMultisampled()); |
2103 | 2103 |
2104 if (kGL_GrGLStandard == this->glStandard()) { | 2104 if (this->glCaps().multisampleDisableSupport()) { |
2105 if (useHWAA) { | 2105 if (useHWAA) { |
2106 if (kYes_TriState != fMSAAEnabled) { | 2106 if (kYes_TriState != fMSAAEnabled) { |
2107 GL_CALL(Enable(GR_GL_MULTISAMPLE)); | 2107 GL_CALL(Enable(GR_GL_MULTISAMPLE)); |
2108 fMSAAEnabled = kYes_TriState; | 2108 fMSAAEnabled = kYes_TriState; |
2109 } | 2109 } |
2110 } else { | 2110 } else { |
2111 if (kNo_TriState != fMSAAEnabled) { | 2111 if (kNo_TriState != fMSAAEnabled) { |
2112 GL_CALL(Disable(GR_GL_MULTISAMPLE)); | 2112 GL_CALL(Disable(GR_GL_MULTISAMPLE)); |
2113 fMSAAEnabled = kNo_TriState; | 2113 fMSAAEnabled = kNo_TriState; |
2114 } | 2114 } |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2856 this->setVertexArrayID(gpu, 0); | 2856 this->setVertexArrayID(gpu, 0); |
2857 } | 2857 } |
2858 int attrCount = gpu->glCaps().maxVertexAttributes(); | 2858 int attrCount = gpu->glCaps().maxVertexAttributes(); |
2859 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 2859 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
2860 fDefaultVertexArrayAttribState.resize(attrCount); | 2860 fDefaultVertexArrayAttribState.resize(attrCount); |
2861 } | 2861 } |
2862 attribState = &fDefaultVertexArrayAttribState; | 2862 attribState = &fDefaultVertexArrayAttribState; |
2863 } | 2863 } |
2864 return attribState; | 2864 return attribState; |
2865 } | 2865 } |
OLD | NEW |