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

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

Issue 1592803002: Differentiate maxColorSamples and maxStencilSamples in GrCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 months 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
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 "GrGLCaps.h" 9 #include "GrGLCaps.h"
10 10
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor() && 395 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor() &&
396 kQualcomm_GrGLVendor != ctxInfo.vendor(); 396 kQualcomm_GrGLVendor != ctxInfo.vendor();
397 397
398 #if 0 398 #if 0
399 fReuseScratchBuffers = kARM_GrGLVendor != ctxInfo.vendor() && 399 fReuseScratchBuffers = kARM_GrGLVendor != ctxInfo.vendor() &&
400 kQualcomm_GrGLVendor != ctxInfo.vendor(); 400 kQualcomm_GrGLVendor != ctxInfo.vendor();
401 #endif 401 #endif
402 402
403 // initFSAASupport() must have been called before this point 403 // initFSAASupport() must have been called before this point
404 if (GrGLCaps::kES_IMG_MsToTexture_MSFBOType == fMSFBOType) { 404 if (GrGLCaps::kES_IMG_MsToTexture_MSFBOType == fMSFBOType) {
405 GR_GL_GetIntegerv(gli, GR_GL_MAX_SAMPLES_IMG, &fMaxSampleCount); 405 GR_GL_GetIntegerv(gli, GR_GL_MAX_SAMPLES_IMG, &fMaxColorSampleCount);
406 } else if (GrGLCaps::kNone_MSFBOType != fMSFBOType) { 406 } else if (GrGLCaps::kNone_MSFBOType != fMSFBOType) {
407 GR_GL_GetIntegerv(gli, GR_GL_MAX_SAMPLES, &fMaxSampleCount); 407 GR_GL_GetIntegerv(gli, GR_GL_MAX_SAMPLES, &fMaxColorSampleCount);
408 } 408 }
409 fMaxStencilSampleCount = fMaxColorSampleCount;
409 410
410 if (kPowerVR54x_GrGLRenderer == ctxInfo.renderer() || 411 if (kPowerVR54x_GrGLRenderer == ctxInfo.renderer() ||
411 kPowerVRRogue_GrGLRenderer == ctxInfo.renderer() || 412 kPowerVRRogue_GrGLRenderer == ctxInfo.renderer() ||
412 kAdreno3xx_GrGLRenderer == ctxInfo.renderer()) { 413 kAdreno3xx_GrGLRenderer == ctxInfo.renderer()) {
413 fUseDrawInsteadOfClear = true; 414 fUseDrawInsteadOfClear = true;
414 } 415 }
415 416
416 if (kAdreno4xx_GrGLRenderer == ctxInfo.renderer()) { 417 if (kAdreno4xx_GrGLRenderer == ctxInfo.renderer()) {
417 fUseDrawInsteadOfPartialRenderTargetWrite = true; 418 fUseDrawInsteadOfPartialRenderTargetWrite = true;
418 } 419 }
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1579 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { 1580 for (int j = 0; j < kExternalFormatUsageCnt; ++j) {
1580 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != 1581 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] !=
1581 fConfigTable[i].fFormats.fExternalFormat[j]); 1582 fConfigTable[i].fFormats.fExternalFormat[j]);
1582 } 1583 }
1583 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType); 1584 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType);
1584 } 1585 }
1585 #endif 1586 #endif
1586 } 1587 }
1587 1588
1588 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} 1589 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698