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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 bool GrGpuGL::fullReadPixelsIsFasterThanPartial() const { | 234 bool GrGpuGL::fullReadPixelsIsFasterThanPartial() const { |
235 return SkToBool(GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL); | 235 return SkToBool(GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL); |
236 } | 236 } |
237 | 237 |
238 void GrGpuGL::onResetContext(uint32_t resetBits) { | 238 void GrGpuGL::onResetContext(uint32_t resetBits) { |
239 // we don't use the zb at all | 239 // we don't use the zb at all |
240 if (resetBits & kMisc_GrGLBackendState) { | 240 if (resetBits & kMisc_GrGLBackendState) { |
241 GL_CALL(Disable(GR_GL_DEPTH_TEST)); | 241 GL_CALL(Disable(GR_GL_DEPTH_TEST)); |
242 GL_CALL(DepthMask(GR_GL_FALSE)); | 242 GL_CALL(DepthMask(GR_GL_FALSE)); |
243 | 243 |
244 fHWDrawFace = GrOptDrawState::kInvalid_DrawFace; | 244 fHWDrawFace = GrDrawState::kInvalid_DrawFace; |
245 fHWDitherEnabled = kUnknown_TriState; | 245 fHWDitherEnabled = kUnknown_TriState; |
246 | 246 |
247 if (kGL_GrGLStandard == this->glStandard()) { | 247 if (kGL_GrGLStandard == this->glStandard()) { |
248 // Desktop-only state that we never change | 248 // Desktop-only state that we never change |
249 if (!this->glCaps().isCoreProfile()) { | 249 if (!this->glCaps().isCoreProfile()) { |
250 GL_CALL(Disable(GR_GL_POINT_SMOOTH)); | 250 GL_CALL(Disable(GR_GL_POINT_SMOOTH)); |
251 GL_CALL(Disable(GR_GL_LINE_SMOOTH)); | 251 GL_CALL(Disable(GR_GL_LINE_SMOOTH)); |
252 GL_CALL(Disable(GR_GL_POLYGON_SMOOTH)); | 252 GL_CALL(Disable(GR_GL_POLYGON_SMOOTH)); |
253 GL_CALL(Disable(GR_GL_POLYGON_STIPPLE)); | 253 GL_CALL(Disable(GR_GL_POLYGON_STIPPLE)); |
254 GL_CALL(Disable(GR_GL_COLOR_LOGIC_OP)); | 254 GL_CALL(Disable(GR_GL_COLOR_LOGIC_OP)); |
(...skipping 2300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2555 this->setVertexArrayID(gpu, 0); | 2555 this->setVertexArrayID(gpu, 0); |
2556 } | 2556 } |
2557 int attrCount = gpu->glCaps().maxVertexAttributes(); | 2557 int attrCount = gpu->glCaps().maxVertexAttributes(); |
2558 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 2558 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
2559 fDefaultVertexArrayAttribState.resize(attrCount); | 2559 fDefaultVertexArrayAttribState.resize(attrCount); |
2560 } | 2560 } |
2561 attribState = &fDefaultVertexArrayAttribState; | 2561 attribState = &fDefaultVertexArrayAttribState; |
2562 } | 2562 } |
2563 return attribState; | 2563 return attribState; |
2564 } | 2564 } |
OLD | NEW |