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 72353003: Avoid printing draw target info to stderr while running unit tests (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 if (format.fInternalFormat == 579 if (format.fInternalFormat ==
580 fStencilFormats[i].fInternalFormat) { 580 fStencilFormats[i].fInternalFormat) {
581 return fStencilVerifiedColorConfigs[i].isVerified(config); 581 return fStencilVerifiedColorConfigs[i].isVerified(config);
582 } 582 }
583 } 583 }
584 GrCrash("Why are we seeing a stencil format that " 584 GrCrash("Why are we seeing a stencil format that "
585 "GLCaps doesn't know about."); 585 "GLCaps doesn't know about.");
586 return false; 586 return false;
587 } 587 }
588 588
589 void GrGLCaps::print() const { 589 SkString GrGLCaps::dump() const {
590 590
591 INHERITED::print(); 591 SkString r = INHERITED::dump();
592 592
593 GrPrintf("--- GL-Specific ---\n"); 593 r.appendf("--- GL-Specific ---\n");
594 for (int i = 0; i < fStencilFormats.count(); ++i) { 594 for (int i = 0; i < fStencilFormats.count(); ++i) {
595 GrPrintf("Stencil Format %d, stencil bits: %02d, total bits: %02d\n", 595 r.appendf("Stencil Format %d, stencil bits: %02d, total bits: %02d\n",
596 i, 596 i,
597 fStencilFormats[i].fStencilBits, 597 fStencilFormats[i].fStencilBits,
598 fStencilFormats[i].fTotalBits); 598 fStencilFormats[i].fTotalBits);
599 } 599 }
600 600
601 static const char* kMSFBOExtStr[] = { 601 static const char* kMSFBOExtStr[] = {
602 "None", 602 "None",
603 "ARB", 603 "ARB",
604 "EXT", 604 "EXT",
605 "ES 3.0", 605 "ES 3.0",
(...skipping 14 matching lines...) Expand all
620 "None", 620 "None",
621 "EXT", 621 "EXT",
622 "NV", 622 "NV",
623 }; 623 };
624 GR_STATIC_ASSERT(0 == kNone_FBFetchType); 624 GR_STATIC_ASSERT(0 == kNone_FBFetchType);
625 GR_STATIC_ASSERT(1 == kEXT_FBFetchType); 625 GR_STATIC_ASSERT(1 == kEXT_FBFetchType);
626 GR_STATIC_ASSERT(2 == kNV_FBFetchType); 626 GR_STATIC_ASSERT(2 == kNV_FBFetchType);
627 GR_STATIC_ASSERT(GR_ARRAY_COUNT(kFBFetchTypeStr) == kLast_FBFetchType + 1); 627 GR_STATIC_ASSERT(GR_ARRAY_COUNT(kFBFetchTypeStr) == kLast_FBFetchType + 1);
628 628
629 629
630 GrPrintf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO")); 630 r.appendf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO"));
631 GrPrintf("Fixed Function Support: %s\n", (fFixedFunctionSupport ? "YES" : "N O")); 631 r.appendf("Fixed Function Support: %s\n", (fFixedFunctionSupport ? "YES" : " NO"));
632 GrPrintf("MSAA Type: %s\n", kMSFBOExtStr[fMSFBOType]); 632 r.appendf("MSAA Type: %s\n", kMSFBOExtStr[fMSFBOType]);
633 GrPrintf("FB Fetch Type: %s\n", kFBFetchTypeStr[fFBFetchType]); 633 r.appendf("FB Fetch Type: %s\n", kFBFetchTypeStr[fFBFetchType]);
634 GrPrintf("Max FS Uniform Vectors: %d\n", fMaxFragmentUniformVectors); 634 r.appendf("Max FS Uniform Vectors: %d\n", fMaxFragmentUniformVectors);
635 GrPrintf("Max FS Texture Units: %d\n", fMaxFragmentTextureUnits); 635 r.appendf("Max FS Texture Units: %d\n", fMaxFragmentTextureUnits);
636 if (fFixedFunctionSupport) { 636 if (fFixedFunctionSupport) {
637 GrPrintf("Max Fixed Function Texture Coords: %d\n", fMaxFixedFunctionTex tureCoords); 637 r.appendf("Max Fixed Function Texture Coords: %d\n", fMaxFixedFunctionTe xtureCoords);
638 } 638 }
639 GrPrintf("Max Vertex Attributes: %d\n", fMaxVertexAttributes); 639 r.appendf("Max Vertex Attributes: %d\n", fMaxVertexAttributes);
640 GrPrintf("Support RGBA8 Render Buffer: %s\n", (fRGBA8RenderbufferSupport ? " YES": "NO")); 640 r.appendf("Support RGBA8 Render Buffer: %s\n", (fRGBA8RenderbufferSupport ? "YES": "NO"));
641 GrPrintf("BGRA support: %s\n", (fBGRAFormatSupport ? "YES": "NO")); 641 r.appendf("BGRA support: %s\n", (fBGRAFormatSupport ? "YES": "NO"));
642 GrPrintf("BGRA is an internal format: %s\n", (fBGRAIsInternalFormat ? "YES": "NO")); 642 r.appendf("BGRA is an internal format: %s\n", (fBGRAIsInternalFormat ? "YES" : "NO"));
643 GrPrintf("Support texture swizzle: %s\n", (fTextureSwizzleSupport ? "YES": " NO")); 643 r.appendf("Support texture swizzle: %s\n", (fTextureSwizzleSupport ? "YES": "NO"));
644 GrPrintf("Unpack Row length support: %s\n", (fUnpackRowLengthSupport ? "YES" : "NO")); 644 r.appendf("Unpack Row length support: %s\n", (fUnpackRowLengthSupport ? "YES ": "NO"));
645 GrPrintf("Unpack Flip Y support: %s\n", (fUnpackFlipYSupport ? "YES": "NO")) ; 645 r.appendf("Unpack Flip Y support: %s\n", (fUnpackFlipYSupport ? "YES": "NO") );
646 GrPrintf("Pack Row length support: %s\n", (fPackRowLengthSupport ? "YES": "N O")); 646 r.appendf("Pack Row length support: %s\n", (fPackRowLengthSupport ? "YES": " NO"));
647 GrPrintf("Pack Flip Y support: %s\n", (fPackFlipYSupport ? "YES": "NO")); 647 r.appendf("Pack Flip Y support: %s\n", (fPackFlipYSupport ? "YES": "NO"));
648 648
649 GrPrintf("Texture Usage support: %s\n", (fTextureUsageSupport ? "YES": "NO") ); 649 r.appendf("Texture Usage support: %s\n", (fTextureUsageSupport ? "YES": "NO" ));
650 GrPrintf("Texture Storage support: %s\n", (fTexStorageSupport ? "YES": "NO") ); 650 r.appendf("Texture Storage support: %s\n", (fTexStorageSupport ? "YES": "NO" ));
651 GrPrintf("GL_R support: %s\n", (fTextureRedSupport ? "YES": "NO")); 651 r.appendf("GL_R support: %s\n", (fTextureRedSupport ? "YES": "NO"));
652 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); 652 r.appendf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO"));
653 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); 653 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO"));
654 GrPrintf("Fragment coord conventions support: %s\n", 654 r.appendf("Fragment coord conventions support: %s\n",
655 (fFragCoordsConventionSupport ? "YES": "NO")); 655 (fFragCoordsConventionSupport ? "YES": "NO"));
656 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? " YES": "NO")); 656 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO"));
657 GrPrintf("Use non-VBO for dynamic data: %s\n", 657 r.appendf("Use non-VBO for dynamic data: %s\n",
658 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); 658 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO"));
659 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : " NO")); 659 r.appendf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : "NO"));
660 GrPrintf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO" )); 660 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO "));
661 return r;
661 } 662 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | tests/GrDrawTargetTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698