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 "GrGpuGL.h" | 9 #include "GrGpuGL.h" |
10 #include "GrGLStencilBuffer.h" | 10 #include "GrGLStencilBuffer.h" |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 bool GrGpuGL::fullReadPixelsIsFasterThanPartial() const { | 232 bool GrGpuGL::fullReadPixelsIsFasterThanPartial() const { |
233 return SkToBool(GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL); | 233 return SkToBool(GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL); |
234 } | 234 } |
235 | 235 |
236 void GrGpuGL::onResetContext(uint32_t resetBits) { | 236 void GrGpuGL::onResetContext(uint32_t resetBits) { |
237 // we don't use the zb at all | 237 // we don't use the zb at all |
238 if (resetBits & kMisc_GrGLBackendState) { | 238 if (resetBits & kMisc_GrGLBackendState) { |
239 GL_CALL(Disable(GR_GL_DEPTH_TEST)); | 239 GL_CALL(Disable(GR_GL_DEPTH_TEST)); |
240 GL_CALL(DepthMask(GR_GL_FALSE)); | 240 GL_CALL(DepthMask(GR_GL_FALSE)); |
241 | 241 |
242 fHWDrawFace = GrDrawState::kInvalid_DrawFace; | 242 fHWDrawFace = GrOptDrawState::kInvalid_DrawFace; |
243 fHWDitherEnabled = kUnknown_TriState; | 243 fHWDitherEnabled = kUnknown_TriState; |
244 | 244 |
245 if (kGL_GrGLStandard == this->glStandard()) { | 245 if (kGL_GrGLStandard == this->glStandard()) { |
246 // Desktop-only state that we never change | 246 // Desktop-only state that we never change |
247 if (!this->glCaps().isCoreProfile()) { | 247 if (!this->glCaps().isCoreProfile()) { |
248 GL_CALL(Disable(GR_GL_POINT_SMOOTH)); | 248 GL_CALL(Disable(GR_GL_POINT_SMOOTH)); |
249 GL_CALL(Disable(GR_GL_LINE_SMOOTH)); | 249 GL_CALL(Disable(GR_GL_LINE_SMOOTH)); |
250 GL_CALL(Disable(GR_GL_POLYGON_SMOOTH)); | 250 GL_CALL(Disable(GR_GL_POLYGON_SMOOTH)); |
251 GL_CALL(Disable(GR_GL_POLYGON_STIPPLE)); | 251 GL_CALL(Disable(GR_GL_POLYGON_STIPPLE)); |
252 GL_CALL(Disable(GR_GL_COLOR_LOGIC_OP)); | 252 GL_CALL(Disable(GR_GL_COLOR_LOGIC_OP)); |
(...skipping 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2599 this->setVertexArrayID(gpu, 0); | 2599 this->setVertexArrayID(gpu, 0); |
2600 } | 2600 } |
2601 int attrCount = gpu->glCaps().maxVertexAttributes(); | 2601 int attrCount = gpu->glCaps().maxVertexAttributes(); |
2602 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 2602 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
2603 fDefaultVertexArrayAttribState.resize(attrCount); | 2603 fDefaultVertexArrayAttribState.resize(attrCount); |
2604 } | 2604 } |
2605 attribState = &fDefaultVertexArrayAttribState; | 2605 attribState = &fDefaultVertexArrayAttribState; |
2606 } | 2606 } |
2607 return attribState; | 2607 return attribState; |
2608 } | 2608 } |
OLD | NEW |