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

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

Issue 216503004: SK_SUPPORT_LEGACY_GRTYPES to hide duplicate types from SkTypes.h (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 8 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
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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 // to alllow arbitrary wrap modes, however. 305 // to alllow arbitrary wrap modes, however.
306 fMipMapSupport = fNPOTTextureTileSupport || ctxInfo.hasExtension("GL_IMG _texture_npot"); 306 fMipMapSupport = fNPOTTextureTileSupport || ctxInfo.hasExtension("GL_IMG _texture_npot");
307 } 307 }
308 308
309 fHWAALineSupport = (kGL_GrGLStandard == standard); 309 fHWAALineSupport = (kGL_GrGLStandard == standard);
310 310
311 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize); 311 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize);
312 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); 312 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize);
313 // Our render targets are always created with textures as the color 313 // Our render targets are always created with textures as the color
314 // attachment, hence this min: 314 // attachment, hence this min:
315 fMaxRenderTargetSize = GrMin(fMaxTextureSize, fMaxRenderTargetSize); 315 fMaxRenderTargetSize = SkTMin(fMaxTextureSize, fMaxRenderTargetSize);
316 316
317 fPathRenderingSupport = ctxInfo.hasExtension("GL_NV_path_rendering"); 317 fPathRenderingSupport = ctxInfo.hasExtension("GL_NV_path_rendering");
318 SkASSERT(!fPathRenderingSupport || fFixedFunctionSupport); 318 SkASSERT(!fPathRenderingSupport || fFixedFunctionSupport);
319 319
320 fGpuTracingSupport = ctxInfo.hasExtension("GL_EXT_debug_marker"); 320 fGpuTracingSupport = ctxInfo.hasExtension("GL_EXT_debug_marker");
321 321
322 fDstReadInShaderSupport = kNone_FBFetchType != fFBFetchType; 322 fDstReadInShaderSupport = kNone_FBFetchType != fFBFetchType;
323 323
324 // Disable scratch texture reuse on Mali and Adreno devices 324 // Disable scratch texture reuse on Mali and Adreno devices
325 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor() && 325 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor() &&
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 "IMG MS To Texture", 615 "IMG MS To Texture",
616 "EXT MS To Texture", 616 "EXT MS To Texture",
617 }; 617 };
618 GR_STATIC_ASSERT(0 == kNone_MSFBOType); 618 GR_STATIC_ASSERT(0 == kNone_MSFBOType);
619 GR_STATIC_ASSERT(1 == kDesktop_ARB_MSFBOType); 619 GR_STATIC_ASSERT(1 == kDesktop_ARB_MSFBOType);
620 GR_STATIC_ASSERT(2 == kDesktop_EXT_MSFBOType); 620 GR_STATIC_ASSERT(2 == kDesktop_EXT_MSFBOType);
621 GR_STATIC_ASSERT(3 == kES_3_0_MSFBOType); 621 GR_STATIC_ASSERT(3 == kES_3_0_MSFBOType);
622 GR_STATIC_ASSERT(4 == kES_Apple_MSFBOType); 622 GR_STATIC_ASSERT(4 == kES_Apple_MSFBOType);
623 GR_STATIC_ASSERT(5 == kES_IMG_MsToTexture_MSFBOType); 623 GR_STATIC_ASSERT(5 == kES_IMG_MsToTexture_MSFBOType);
624 GR_STATIC_ASSERT(6 == kES_EXT_MsToTexture_MSFBOType); 624 GR_STATIC_ASSERT(6 == kES_EXT_MsToTexture_MSFBOType);
625 GR_STATIC_ASSERT(GR_ARRAY_COUNT(kMSFBOExtStr) == kLast_MSFBOType + 1); 625 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kMSFBOExtStr) == kLast_MSFBOType + 1);
626 626
627 static const char* kFBFetchTypeStr[] = { 627 static const char* kFBFetchTypeStr[] = {
628 "None", 628 "None",
629 "EXT", 629 "EXT",
630 "NV", 630 "NV",
631 }; 631 };
632 GR_STATIC_ASSERT(0 == kNone_FBFetchType); 632 GR_STATIC_ASSERT(0 == kNone_FBFetchType);
633 GR_STATIC_ASSERT(1 == kEXT_FBFetchType); 633 GR_STATIC_ASSERT(1 == kEXT_FBFetchType);
634 GR_STATIC_ASSERT(2 == kNV_FBFetchType); 634 GR_STATIC_ASSERT(2 == kNV_FBFetchType);
635 GR_STATIC_ASSERT(GR_ARRAY_COUNT(kFBFetchTypeStr) == kLast_FBFetchType + 1); 635 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kFBFetchTypeStr) == kLast_FBFetchType + 1);
636 636
637 637
638 r.appendf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO")); 638 r.appendf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO"));
639 r.appendf("Fixed Function Support: %s\n", (fFixedFunctionSupport ? "YES" : " NO")); 639 r.appendf("Fixed Function Support: %s\n", (fFixedFunctionSupport ? "YES" : " NO"));
640 r.appendf("MSAA Type: %s\n", kMSFBOExtStr[fMSFBOType]); 640 r.appendf("MSAA Type: %s\n", kMSFBOExtStr[fMSFBOType]);
641 r.appendf("FB Fetch Type: %s\n", kFBFetchTypeStr[fFBFetchType]); 641 r.appendf("FB Fetch Type: %s\n", kFBFetchTypeStr[fFBFetchType]);
642 r.appendf("Max FS Uniform Vectors: %d\n", fMaxFragmentUniformVectors); 642 r.appendf("Max FS Uniform Vectors: %d\n", fMaxFragmentUniformVectors);
643 r.appendf("Max FS Texture Units: %d\n", fMaxFragmentTextureUnits); 643 r.appendf("Max FS Texture Units: %d\n", fMaxFragmentTextureUnits);
644 if (fFixedFunctionSupport) { 644 if (fFixedFunctionSupport) {
645 r.appendf("Max Fixed Function Texture Coords: %d\n", fMaxFixedFunctionTe xtureCoords); 645 r.appendf("Max Fixed Function Texture Coords: %d\n", fMaxFixedFunctionTe xtureCoords);
(...skipping 16 matching lines...) Expand all
662 r.appendf("Fragment coord conventions support: %s\n", 662 r.appendf("Fragment coord conventions support: %s\n",
663 (fFragCoordsConventionSupport ? "YES": "NO")); 663 (fFragCoordsConventionSupport ? "YES": "NO"));
664 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO")); 664 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO"));
665 r.appendf("Use non-VBO for dynamic data: %s\n", 665 r.appendf("Use non-VBO for dynamic data: %s\n",
666 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); 666 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO"));
667 r.appendf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : "NO")); 667 r.appendf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : "NO"));
668 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO ")); 668 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO "));
669 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES" : "NO")); 669 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES" : "NO"));
670 return r; 670 return r;
671 } 671 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698