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

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

Issue 1594483003: Texturing support for RECTANGLE textures. (Closed) Base URL: https://skia.googlesource.com/skia.git@rectangle
Patch Set: fix float->int warnings 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
« no previous file with comments | « src/gpu/GrTextureParamsAdjuster.cpp ('k') | src/gpu/gl/GrGLGpu.h » ('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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 if (ctxInfo.hasExtension("GL_OES_EGL_image_external")) { 213 if (ctxInfo.hasExtension("GL_OES_EGL_image_external")) {
214 if (ctxInfo.glslGeneration() == k110_GrGLSLGeneration) { 214 if (ctxInfo.glslGeneration() == k110_GrGLSLGeneration) {
215 fExternalTextureSupport = true; 215 fExternalTextureSupport = true;
216 } else if (ctxInfo.hasExtension("GL_OES_EGL_image_external_essl3") || 216 } else if (ctxInfo.hasExtension("GL_OES_EGL_image_external_essl3") ||
217 ctxInfo.hasExtension("OES_EGL_image_external_essl3")) { 217 ctxInfo.hasExtension("OES_EGL_image_external_essl3")) {
218 // At least one driver has been found that has this extension withou t the "GL_" prefix. 218 // At least one driver has been found that has this extension withou t the "GL_" prefix.
219 fExternalTextureSupport = true; 219 fExternalTextureSupport = true;
220 } 220 }
221 } 221 }
222 222
223 if ((kGL_GrGLStandard == standard && version >= GR_GL_VER(3, 2)) || 223 if ((kGL_GrGLStandard == standard && version >= GR_GL_VER(3, 1)) ||
224 ctxInfo.hasExtension("GL_ARB_texture_rectangle")) { 224 ctxInfo.hasExtension("GL_ARB_texture_rectangle")) {
225 fRectangleTextureSupport = true; 225 // We also require textureSize() support for rectangle 2D samplers which was added in GLSL
226 // 1.40.
227 if (ctxInfo.glslGeneration() >= k140_GrGLSLGeneration) {
228 fRectangleTextureSupport = true;
229 }
226 } 230 }
227 231
228 if (kGL_GrGLStandard == standard) { 232 if (kGL_GrGLStandard == standard) {
229 if (version >= GR_GL_VER(3,3) || ctxInfo.hasExtension("GL_ARB_texture_sw izzle")) { 233 if (version >= GR_GL_VER(3,3) || ctxInfo.hasExtension("GL_ARB_texture_sw izzle")) {
230 fTextureSwizzleSupport = true; 234 fTextureSwizzleSupport = true;
231 } 235 }
232 } else { 236 } else {
233 if (version >= GR_GL_VER(3,0)) { 237 if (version >= GR_GL_VER(3,0)) {
234 fTextureSwizzleSupport = true; 238 fTextureSwizzleSupport = true;
235 } 239 }
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1579 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { 1583 for (int j = 0; j < kExternalFormatUsageCnt; ++j) {
1580 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != 1584 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] !=
1581 fConfigTable[i].fFormats.fExternalFormat[j]); 1585 fConfigTable[i].fFormats.fExternalFormat[j]);
1582 } 1586 }
1583 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType); 1587 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType);
1584 } 1588 }
1585 #endif 1589 #endif
1586 } 1590 }
1587 1591
1588 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} 1592 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {}
OLDNEW
« no previous file with comments | « src/gpu/GrTextureParamsAdjuster.cpp ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698