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

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

Issue 1750833003: Disabling calls to TexParameteri when the values do not exist on ES2. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Making the check for mipmap lod part of caps. Created 4 years, 9 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
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | 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 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 fBaseInstanceSupport = false; 45 fBaseInstanceSupport = false;
46 fUseNonVBOVertexAndIndexDynamicData = false; 46 fUseNonVBOVertexAndIndexDynamicData = false;
47 fIsCoreProfile = false; 47 fIsCoreProfile = false;
48 fBindFragDataLocationSupport = false; 48 fBindFragDataLocationSupport = false;
49 fExternalTextureSupport = false; 49 fExternalTextureSupport = false;
50 fRectangleTextureSupport = false; 50 fRectangleTextureSupport = false;
51 fTextureSwizzleSupport = false; 51 fTextureSwizzleSupport = false;
52 fSRGBWriteControl = false; 52 fSRGBWriteControl = false;
53 fRGBA8888PixelsOpsAreSlow = false; 53 fRGBA8888PixelsOpsAreSlow = false;
54 fPartialFBOReadIsSlow = false; 54 fPartialFBOReadIsSlow = false;
55 fMipMapLevelAndLodControlSupport = false;
55 56
56 fBlitFramebufferSupport = kNone_BlitFramebufferSupport; 57 fBlitFramebufferSupport = kNone_BlitFramebufferSupport;
57 58
58 fShaderCaps.reset(new GrGLSLCaps(contextOptions)); 59 fShaderCaps.reset(new GrGLSLCaps(contextOptions));
59 60
60 this->init(contextOptions, ctxInfo, glInterface); 61 this->init(contextOptions, ctxInfo, glInterface);
61 } 62 }
62 63
63 void GrGLCaps::init(const GrContextOptions& contextOptions, 64 void GrGLCaps::init(const GrContextOptions& contextOptions,
64 const GrGLContextInfo& ctxInfo, 65 const GrGLContextInfo& ctxInfo,
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 if (kGL_GrGLStandard == standard) { 240 if (kGL_GrGLStandard == standard) {
240 if (version >= GR_GL_VER(3,3) || ctxInfo.hasExtension("GL_ARB_texture_sw izzle")) { 241 if (version >= GR_GL_VER(3,3) || ctxInfo.hasExtension("GL_ARB_texture_sw izzle")) {
241 fTextureSwizzleSupport = true; 242 fTextureSwizzleSupport = true;
242 } 243 }
243 } else { 244 } else {
244 if (version >= GR_GL_VER(3,0)) { 245 if (version >= GR_GL_VER(3,0)) {
245 fTextureSwizzleSupport = true; 246 fTextureSwizzleSupport = true;
246 } 247 }
247 } 248 }
248 249
250 if (kGL_GrGLStandard == standard) {
251 fMipMapLevelAndLodControlSupport = true;
bsalomon 2016/03/01 21:48:37 Sorry should have asked this earlier, but does thi
cblume 2016/03/01 21:53:01 OpenGL 2.1 supports this, yes. If you go to the Op
252 } else if (kGLES_GrGLStandard == standard) {
253 if (version >= GR_GL_VER(3,0)) {
254 fMipMapLevelAndLodControlSupport = true;
255 }
256 }
257
249 #ifdef SK_BUILD_FOR_WIN 258 #ifdef SK_BUILD_FOR_WIN
250 // We're assuming that on Windows Chromium we're using ANGLE. 259 // We're assuming that on Windows Chromium we're using ANGLE.
251 bool isANGLE = kANGLE_GrGLDriver == ctxInfo.driver() || 260 bool isANGLE = kANGLE_GrGLDriver == ctxInfo.driver() ||
252 kChromium_GrGLDriver == ctxInfo.driver(); 261 kChromium_GrGLDriver == ctxInfo.driver();
253 // Angle has slow read/write pixel paths for 32bit RGBA (but fast for BGRA). 262 // Angle has slow read/write pixel paths for 32bit RGBA (but fast for BGRA).
254 fRGBA8888PixelsOpsAreSlow = isANGLE; 263 fRGBA8888PixelsOpsAreSlow = isANGLE;
255 // On DX9 ANGLE reading a partial FBO is slow. TODO: Check whether this is s till true and 264 // On DX9 ANGLE reading a partial FBO is slow. TODO: Check whether this is s till true and
256 // check DX11 ANGLE. 265 // check DX11 ANGLE.
257 fPartialFBOReadIsSlow = isANGLE; 266 fPartialFBOReadIsSlow = isANGLE;
258 #endif 267 #endif
(...skipping 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after
1790 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { 1799 for (int j = 0; j < kExternalFormatUsageCnt; ++j) {
1791 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != 1800 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] !=
1792 fConfigTable[i].fFormats.fExternalFormat[j]); 1801 fConfigTable[i].fFormats.fExternalFormat[j]);
1793 } 1802 }
1794 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType); 1803 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType);
1795 } 1804 }
1796 #endif 1805 #endif
1797 } 1806 }
1798 1807
1799 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} 1808 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {}
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698