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

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

Issue 174123003: Add hooks for GL_EXT_debug_marker in gpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 10 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 #include "GrGLContext.h" 10 #include "GrGLContext.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 // ES3 has no limitations. 294 // ES3 has no limitations.
295 fNPOTTextureTileSupport = ctxInfo.version() >= GR_GL_VER(3,0) || 295 fNPOTTextureTileSupport = ctxInfo.version() >= GR_GL_VER(3,0) ||
296 ctxInfo.hasExtension("GL_OES_texture_npot"); 296 ctxInfo.hasExtension("GL_OES_texture_npot");
297 // ES2 supports MIP mapping for POT textures but our caps don't allow fo r limited MIP 297 // ES2 supports MIP mapping for POT textures but our caps don't allow fo r limited MIP
298 // support. The OES extension or ES 3.0 allow for MIPS on NPOT textures. So, apparently, 298 // support. The OES extension or ES 3.0 allow for MIPS on NPOT textures. So, apparently,
299 // does the undocumented GL_IMG_texture_npot extension. This extension d oes not seem to 299 // does the undocumented GL_IMG_texture_npot extension. This extension d oes not seem to
300 // to alllow arbitrary wrap modes, however. 300 // to alllow arbitrary wrap modes, however.
301 fMipMapSupport = fNPOTTextureTileSupport || ctxInfo.hasExtension("GL_IMG _texture_npot"); 301 fMipMapSupport = fNPOTTextureTileSupport || ctxInfo.hasExtension("GL_IMG _texture_npot");
302 } 302 }
303 303
304
bsalomon 2014/02/20 22:14:13 ?
305
304 fHWAALineSupport = (kGL_GrGLStandard == standard); 306 fHWAALineSupport = (kGL_GrGLStandard == standard);
305 307
306 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize); 308 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize);
307 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); 309 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize);
308 // Our render targets are always created with textures as the color 310 // Our render targets are always created with textures as the color
309 // attachment, hence this min: 311 // attachment, hence this min:
310 fMaxRenderTargetSize = GrMin(fMaxTextureSize, fMaxRenderTargetSize); 312 fMaxRenderTargetSize = GrMin(fMaxTextureSize, fMaxRenderTargetSize);
311 313
312 fPathRenderingSupport = ctxInfo.hasExtension("GL_NV_path_rendering"); 314 fPathRenderingSupport = ctxInfo.hasExtension("GL_NV_path_rendering");
313 SkASSERT(!fPathRenderingSupport || fFixedFunctionSupport); 315 SkASSERT(!fPathRenderingSupport || fFixedFunctionSupport);
314 316
317 fDebugMarkerSupport = ctxInfo.hasExtension("GL_EXT_debug_marker");
318
315 fDstReadInShaderSupport = kNone_FBFetchType != fFBFetchType; 319 fDstReadInShaderSupport = kNone_FBFetchType != fFBFetchType;
316 320
317 // Disable scratch texture reuse on Mali and Adreno devices 321 // Disable scratch texture reuse on Mali and Adreno devices
318 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor() && 322 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor() &&
319 kQualcomm_GrGLVendor != ctxInfo.vendor(); 323 kQualcomm_GrGLVendor != ctxInfo.vendor();
320 324
321 // Enable supported shader-related caps 325 // Enable supported shader-related caps
322 if (kGL_GrGLStandard == standard) { 326 if (kGL_GrGLStandard == standard) {
323 fDualSourceBlendingSupport = ctxInfo.version() >= GR_GL_VER(3,3) || 327 fDualSourceBlendingSupport = ctxInfo.version() >= GR_GL_VER(3,3) ||
324 ctxInfo.hasExtension("GL_ARB_blend_func_ext ended"); 328 ctxInfo.hasExtension("GL_ARB_blend_func_ext ended");
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); 658 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO"));
655 r.appendf("Fragment coord conventions support: %s\n", 659 r.appendf("Fragment coord conventions support: %s\n",
656 (fFragCoordsConventionSupport ? "YES": "NO")); 660 (fFragCoordsConventionSupport ? "YES": "NO"));
657 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO")); 661 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO"));
658 r.appendf("Use non-VBO for dynamic data: %s\n", 662 r.appendf("Use non-VBO for dynamic data: %s\n",
659 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); 663 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO"));
660 r.appendf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : "NO")); 664 r.appendf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : "NO"));
661 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO ")); 665 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO "));
662 return r; 666 return r;
663 } 667 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698