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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 GL_CALL(Disable(GR_GL_DITHER)); | 326 GL_CALL(Disable(GR_GL_DITHER)); |
327 } | 327 } |
328 | 328 |
329 if (resetBits & kMSAAEnable_GrGLBackendState) { | 329 if (resetBits & kMSAAEnable_GrGLBackendState) { |
330 fMSAAEnabled = kUnknown_TriState; | 330 fMSAAEnabled = kUnknown_TriState; |
331 | 331 |
332 // In mixed samples mode coverage modulation allows the coverage to be c
onverted to | 332 // In mixed samples mode coverage modulation allows the coverage to be c
onverted to |
333 // "opacity", which can then be blended into the color buffer to accompl
ish antialiasing. | 333 // "opacity", which can then be blended into the color buffer to accompl
ish antialiasing. |
334 // Enable coverage modulation suitable for premultiplied alpha colors. | 334 // Enable coverage modulation suitable for premultiplied alpha colors. |
335 // This state has no effect when not rendering to a mixed sampled target
. | 335 // This state has no effect when not rendering to a mixed sampled target
. |
336 if (this->glCaps().shaderCaps()->mixedSamplesSupport()) { | 336 if (this->caps()->mixedSamplesSupport()) { |
337 GL_CALL(CoverageModulation(GR_GL_RGBA)); | 337 GL_CALL(CoverageModulation(GR_GL_RGBA)); |
338 } | 338 } |
339 } | 339 } |
340 | 340 |
341 fHWActiveTextureUnitIdx = -1; // invalid | 341 fHWActiveTextureUnitIdx = -1; // invalid |
342 | 342 |
343 if (resetBits & kTextureBinding_GrGLBackendState) { | 343 if (resetBits & kTextureBinding_GrGLBackendState) { |
344 for (int s = 0; s < fHWBoundTextureUniqueIDs.count(); ++s) { | 344 for (int s = 0; s < fHWBoundTextureUniqueIDs.count(); ++s) { |
345 fHWBoundTextureUniqueIDs[s] = SK_InvalidUniqueID; | 345 fHWBoundTextureUniqueIDs[s] = SK_InvalidUniqueID; |
346 } | 346 } |
(...skipping 2981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3328 this->setVertexArrayID(gpu, 0); | 3328 this->setVertexArrayID(gpu, 0); |
3329 } | 3329 } |
3330 int attrCount = gpu->glCaps().maxVertexAttributes(); | 3330 int attrCount = gpu->glCaps().maxVertexAttributes(); |
3331 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 3331 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
3332 fDefaultVertexArrayAttribState.resize(attrCount); | 3332 fDefaultVertexArrayAttribState.resize(attrCount); |
3333 } | 3333 } |
3334 attribState = &fDefaultVertexArrayAttribState; | 3334 attribState = &fDefaultVertexArrayAttribState; |
3335 } | 3335 } |
3336 return attribState; | 3336 return attribState; |
3337 } | 3337 } |
OLD | NEW |