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

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: update comment 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 268
269 if (kDesktop_GrGLBinding == binding) { 269 if (kDesktop_GrGLBinding == binding) {
270 if (ctxInfo.version() >= GR_GL_VER(2,0) || 270 if (ctxInfo.version() >= GR_GL_VER(2,0) ||
271 ctxInfo.hasExtension("GL_ARB_texture_non_power_of_two")) { 271 ctxInfo.hasExtension("GL_ARB_texture_non_power_of_two")) {
272 fNPOTTextureTileSupport = true; 272 fNPOTTextureTileSupport = true;
273 } else { 273 } else {
274 fNPOTTextureTileSupport = false; 274 fNPOTTextureTileSupport = false;
275 } 275 }
276 } else { 276 } else {
277 // Unextended ES2 supports NPOT textures with clamp_to_edge and non-mip filters only 277 // Unextended ES2 supports NPOT textures with clamp_to_edge and non-mip filters only
278 fNPOTTextureTileSupport = ctxInfo.hasExtension("GL_OES_texture_npot"); 278 // ES3 has no limitations.
279 fNPOTTextureTileSupport = ctxInfo.version() >= GR_GL_VER(3,0) ||
280 ctxInfo.hasExtension("GL_OES_texture_npot");
279 } 281 }
280 282
281 fHWAALineSupport = (kDesktop_GrGLBinding == binding); 283 fHWAALineSupport = (kDesktop_GrGLBinding == binding);
282 284
283 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize); 285 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize);
284 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); 286 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize);
285 // Our render targets are always created with textures as the color 287 // Our render targets are always created with textures as the color
286 // attachment, hence this min: 288 // attachment, hence this min:
287 fMaxRenderTargetSize = GrMin(fMaxTextureSize, fMaxRenderTargetSize); 289 fMaxRenderTargetSize = GrMin(fMaxTextureSize, fMaxRenderTargetSize);
288 290
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); 594 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO"));
593 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); 595 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO"));
594 GrPrintf("Fragment coord conventions support: %s\n", 596 GrPrintf("Fragment coord conventions support: %s\n",
595 (fFragCoordsConventionSupport ? "YES": "NO")); 597 (fFragCoordsConventionSupport ? "YES": "NO"));
596 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? " YES": "NO")); 598 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? " YES": "NO"));
597 GrPrintf("Use non-VBO for dynamic data: %s\n", 599 GrPrintf("Use non-VBO for dynamic data: %s\n",
598 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); 600 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO"));
599 GrPrintf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO")); 601 GrPrintf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO"));
600 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : " NO")); 602 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : " NO"));
601 } 603 }
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