| 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 "GrGLGLSL.h" | 10 #include "GrGLGLSL.h" |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 GL_CALL(Disable(GR_GL_DITHER)); | 334 GL_CALL(Disable(GR_GL_DITHER)); |
| 335 } | 335 } |
| 336 | 336 |
| 337 if (resetBits & kMSAAEnable_GrGLBackendState) { | 337 if (resetBits & kMSAAEnable_GrGLBackendState) { |
| 338 fMSAAEnabled = kUnknown_TriState; | 338 fMSAAEnabled = kUnknown_TriState; |
| 339 | 339 |
| 340 // In mixed samples mode coverage modulation allows the coverage to be c
onverted to | 340 // In mixed samples mode coverage modulation allows the coverage to be c
onverted to |
| 341 // "opacity", which can then be blended into the color buffer to accompl
ish antialiasing. | 341 // "opacity", which can then be blended into the color buffer to accompl
ish antialiasing. |
| 342 // Enable coverage modulation suitable for premultiplied alpha colors. | 342 // Enable coverage modulation suitable for premultiplied alpha colors. |
| 343 // This state has no effect when not rendering to a mixed sampled target
. | 343 // This state has no effect when not rendering to a mixed sampled target
. |
| 344 if (this->caps()->mixedSamplesSupport()) { | 344 if (this->caps()->usesMixedSamples()) { |
| 345 GL_CALL(CoverageModulation(GR_GL_RGBA)); | 345 GL_CALL(CoverageModulation(GR_GL_RGBA)); |
| 346 } | 346 } |
| 347 } | 347 } |
| 348 | 348 |
| 349 fHWActiveTextureUnitIdx = -1; // invalid | 349 fHWActiveTextureUnitIdx = -1; // invalid |
| 350 | 350 |
| 351 if (resetBits & kTextureBinding_GrGLBackendState) { | 351 if (resetBits & kTextureBinding_GrGLBackendState) { |
| 352 for (int s = 0; s < fHWBoundTextureUniqueIDs.count(); ++s) { | 352 for (int s = 0; s < fHWBoundTextureUniqueIDs.count(); ++s) { |
| 353 fHWBoundTextureUniqueIDs[s] = SK_InvalidUniqueID; | 353 fHWBoundTextureUniqueIDs[s] = SK_InvalidUniqueID; |
| 354 } | 354 } |
| (...skipping 3129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3484 this->setVertexArrayID(gpu, 0); | 3484 this->setVertexArrayID(gpu, 0); |
| 3485 } | 3485 } |
| 3486 int attrCount = gpu->glCaps().maxVertexAttributes(); | 3486 int attrCount = gpu->glCaps().maxVertexAttributes(); |
| 3487 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 3487 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
| 3488 fDefaultVertexArrayAttribState.resize(attrCount); | 3488 fDefaultVertexArrayAttribState.resize(attrCount); |
| 3489 } | 3489 } |
| 3490 attribState = &fDefaultVertexArrayAttribState; | 3490 attribState = &fDefaultVertexArrayAttribState; |
| 3491 } | 3491 } |
| 3492 return attribState; | 3492 return attribState; |
| 3493 } | 3493 } |
| OLD | NEW |