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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 | 407 |
408 // we don't use the zb at all | 408 // we don't use the zb at all |
409 GL_CALL(Disable(GR_GL_DEPTH_TEST)); | 409 GL_CALL(Disable(GR_GL_DEPTH_TEST)); |
410 GL_CALL(DepthMask(GR_GL_FALSE)); | 410 GL_CALL(DepthMask(GR_GL_FALSE)); |
411 | 411 |
412 fHWDrawFace = GrDrawState::kInvalid_DrawFace; | 412 fHWDrawFace = GrDrawState::kInvalid_DrawFace; |
413 fHWDitherEnabled = kUnknown_TriState; | 413 fHWDitherEnabled = kUnknown_TriState; |
414 | 414 |
415 if (kDesktop_GrGLBinding == this->glBinding()) { | 415 if (kDesktop_GrGLBinding == this->glBinding()) { |
416 // Desktop-only state that we never change | 416 // Desktop-only state that we never change |
417 GL_CALL(Disable(GR_GL_POINT_SMOOTH)); | 417 if (!this->glCaps().isCoreProfile()) { |
418 GL_CALL(Disable(GR_GL_LINE_SMOOTH)); | 418 GL_CALL(Disable(GR_GL_POINT_SMOOTH)); |
419 GL_CALL(Disable(GR_GL_POLYGON_SMOOTH)); | 419 GL_CALL(Disable(GR_GL_LINE_SMOOTH)); |
420 GL_CALL(Disable(GR_GL_POLYGON_STIPPLE)); | 420 GL_CALL(Disable(GR_GL_POLYGON_SMOOTH)); |
421 GL_CALL(Disable(GR_GL_COLOR_LOGIC_OP)); | 421 GL_CALL(Disable(GR_GL_POLYGON_STIPPLE)); |
| 422 GL_CALL(Disable(GR_GL_COLOR_LOGIC_OP)); |
| 423 GL_CALL(Disable(GR_GL_INDEX_LOGIC_OP)); |
| 424 } |
422 if (this->glCaps().imagingSupport()) { | 425 if (this->glCaps().imagingSupport()) { |
423 GL_CALL(Disable(GR_GL_COLOR_TABLE)); | 426 GL_CALL(Disable(GR_GL_COLOR_TABLE)); |
424 } | 427 } |
425 GL_CALL(Disable(GR_GL_INDEX_LOGIC_OP)); | |
426 GL_CALL(Disable(GR_GL_POLYGON_OFFSET_FILL)); | 428 GL_CALL(Disable(GR_GL_POLYGON_OFFSET_FILL)); |
427 // Since ES doesn't support glPointSize at all we always use the VS to | 429 // Since ES doesn't support glPointSize at all we always use the VS to |
428 // set the point size | 430 // set the point size |
429 GL_CALL(Enable(GR_GL_VERTEX_PROGRAM_POINT_SIZE)); | 431 GL_CALL(Enable(GR_GL_VERTEX_PROGRAM_POINT_SIZE)); |
430 | 432 |
431 // We should set glPolygonMode(FRONT_AND_BACK,FILL) here, too. It isn't | 433 // We should set glPolygonMode(FRONT_AND_BACK,FILL) here, too. It isn't |
432 // currently part of our gl interface. There are probably others as | 434 // currently part of our gl interface. There are probably others as |
433 // well. | 435 // well. |
434 } | 436 } |
435 fHWAAState.invalidate(); | 437 fHWAAState.invalidate(); |
(...skipping 1980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2416 stride, | 2418 stride, |
2417 offset)); | 2419 offset)); |
2418 fAttribPointerIsValid = true; | 2420 fAttribPointerIsValid = true; |
2419 fVertexBufferID = bufferID; | 2421 fVertexBufferID = bufferID; |
2420 fSize = size; | 2422 fSize = size; |
2421 fNormalized = normalized; | 2423 fNormalized = normalized; |
2422 fStride = stride; | 2424 fStride = stride; |
2423 fOffset = offset; | 2425 fOffset = offset; |
2424 } | 2426 } |
2425 } | 2427 } |
OLD | NEW |