Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/gpu/gl/GrGLGpu.cpp

Issue 1410383011: Loosen requirements for mixed samples support (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698