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

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

Issue 22887022: Always support NPOT tiling/MIPs on ES3 (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 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 #include "GrGLContext.h" 10 #include "GrGLContext.h"
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 } 265 }
266 266
267 if (kDesktop_GrGLBinding == binding) { 267 if (kDesktop_GrGLBinding == binding) {
268 if (ctxInfo.version() >= GR_GL_VER(2,0) || 268 if (ctxInfo.version() >= GR_GL_VER(2,0) ||
269 ctxInfo.hasExtension("GL_ARB_texture_non_power_of_two")) { 269 ctxInfo.hasExtension("GL_ARB_texture_non_power_of_two")) {
270 fNPOTTextureTileSupport = true; 270 fNPOTTextureTileSupport = true;
271 } else { 271 } else {
272 fNPOTTextureTileSupport = false; 272 fNPOTTextureTileSupport = false;
273 } 273 }
274 } else { 274 } else {
275 // Unextended ES2 supports NPOT textures with clamp_to_edge and non-mip filters only 275 // Unextended ES2 supports NPOT textures with clamp_to_edge and non-mip filters only
jvanverth1 2013/08/16 17:19:10 Change the comment? Otherwise, lgtm.
bsalomon 2013/08/16 18:04:19 Done.
276 fNPOTTextureTileSupport = ctxInfo.hasExtension("GL_OES_texture_npot"); 276 fNPOTTextureTileSupport = ctxInfo.version() >= GR_GL_VER(3,0) ||
277 ctxInfo.hasExtension("GL_OES_texture_npot");
277 } 278 }
278 279
279 fHWAALineSupport = (kDesktop_GrGLBinding == binding); 280 fHWAALineSupport = (kDesktop_GrGLBinding == binding);
280 281
281 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize); 282 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize);
282 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); 283 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize);
283 // Our render targets are always created with textures as the color 284 // Our render targets are always created with textures as the color
284 // attachment, hence this min: 285 // attachment, hence this min:
285 fMaxRenderTargetSize = GrMin(fMaxTextureSize, fMaxRenderTargetSize); 286 fMaxRenderTargetSize = GrMin(fMaxTextureSize, fMaxRenderTargetSize);
286 287
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); 591 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO"));
591 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); 592 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO"));
592 GrPrintf("Fragment coord conventions support: %s\n", 593 GrPrintf("Fragment coord conventions support: %s\n",
593 (fFragCoordsConventionSupport ? "YES": "NO")); 594 (fFragCoordsConventionSupport ? "YES": "NO"));
594 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? " YES": "NO")); 595 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? " YES": "NO"));
595 GrPrintf("Use non-VBO for dynamic data: %s\n", 596 GrPrintf("Use non-VBO for dynamic data: %s\n",
596 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); 597 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO"));
597 GrPrintf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO")); 598 GrPrintf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO"));
598 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : " NO")); 599 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : " NO"));
599 } 600 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698