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

Side by Side Diff: src/gpu/GrDrawTarget.cpp

Issue 102853005: Add detection of mip support (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: remove extra space Created 7 years 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 | src/gpu/GrDrawTargetCaps.h » ('j') | 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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 // Make the dst of the copy be a render target because the default copySurfa ce draws to the dst. 955 // Make the dst of the copy be a render target because the default copySurfa ce draws to the dst.
956 desc->fOrigin = kDefault_GrSurfaceOrigin; 956 desc->fOrigin = kDefault_GrSurfaceOrigin;
957 desc->fFlags = kRenderTarget_GrTextureFlagBit | kNoStencil_GrTextureFlagBit; 957 desc->fFlags = kRenderTarget_GrTextureFlagBit | kNoStencil_GrTextureFlagBit;
958 desc->fConfig = src->config(); 958 desc->fConfig = src->config();
959 } 959 }
960 960
961 /////////////////////////////////////////////////////////////////////////////// 961 ///////////////////////////////////////////////////////////////////////////////
962 962
963 void GrDrawTargetCaps::reset() { 963 void GrDrawTargetCaps::reset() {
964 f8BitPaletteSupport = false; 964 f8BitPaletteSupport = false;
965 fMipMapSupport = false;
965 fNPOTTextureTileSupport = false; 966 fNPOTTextureTileSupport = false;
966 fTwoSidedStencilSupport = false; 967 fTwoSidedStencilSupport = false;
967 fStencilWrapOpsSupport = false; 968 fStencilWrapOpsSupport = false;
968 fHWAALineSupport = false; 969 fHWAALineSupport = false;
969 fShaderDerivativeSupport = false; 970 fShaderDerivativeSupport = false;
970 fGeometryShaderSupport = false; 971 fGeometryShaderSupport = false;
971 fDualSourceBlendingSupport = false; 972 fDualSourceBlendingSupport = false;
972 fBufferLockSupport = false; 973 fBufferLockSupport = false;
973 fPathRenderingSupport = false; 974 fPathRenderingSupport = false;
974 fDstReadInShaderSupport = false; 975 fDstReadInShaderSupport = false;
975 fReuseScratchTextures = true; 976 fReuseScratchTextures = true;
976 977
977 fMaxRenderTargetSize = 0; 978 fMaxRenderTargetSize = 0;
978 fMaxTextureSize = 0; 979 fMaxTextureSize = 0;
979 fMaxSampleCount = 0; 980 fMaxSampleCount = 0;
980 981
981 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport)); 982 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport));
982 } 983 }
983 984
984 GrDrawTargetCaps& GrDrawTargetCaps::operator=(const GrDrawTargetCaps& other) { 985 GrDrawTargetCaps& GrDrawTargetCaps::operator=(const GrDrawTargetCaps& other) {
985 f8BitPaletteSupport = other.f8BitPaletteSupport; 986 f8BitPaletteSupport = other.f8BitPaletteSupport;
987 fMipMapSupport = other.fMipMapSupport;
986 fNPOTTextureTileSupport = other.fNPOTTextureTileSupport; 988 fNPOTTextureTileSupport = other.fNPOTTextureTileSupport;
987 fTwoSidedStencilSupport = other.fTwoSidedStencilSupport; 989 fTwoSidedStencilSupport = other.fTwoSidedStencilSupport;
988 fStencilWrapOpsSupport = other.fStencilWrapOpsSupport; 990 fStencilWrapOpsSupport = other.fStencilWrapOpsSupport;
989 fHWAALineSupport = other.fHWAALineSupport; 991 fHWAALineSupport = other.fHWAALineSupport;
990 fShaderDerivativeSupport = other.fShaderDerivativeSupport; 992 fShaderDerivativeSupport = other.fShaderDerivativeSupport;
991 fGeometryShaderSupport = other.fGeometryShaderSupport; 993 fGeometryShaderSupport = other.fGeometryShaderSupport;
992 fDualSourceBlendingSupport = other.fDualSourceBlendingSupport; 994 fDualSourceBlendingSupport = other.fDualSourceBlendingSupport;
993 fBufferLockSupport = other.fBufferLockSupport; 995 fBufferLockSupport = other.fBufferLockSupport;
994 fPathRenderingSupport = other.fPathRenderingSupport; 996 fPathRenderingSupport = other.fPathRenderingSupport;
995 fDstReadInShaderSupport = other.fDstReadInShaderSupport; 997 fDstReadInShaderSupport = other.fDstReadInShaderSupport;
996 fReuseScratchTextures = other.fReuseScratchTextures; 998 fReuseScratchTextures = other.fReuseScratchTextures;
997 999
998 fMaxRenderTargetSize = other.fMaxRenderTargetSize; 1000 fMaxRenderTargetSize = other.fMaxRenderTargetSize;
999 fMaxTextureSize = other.fMaxTextureSize; 1001 fMaxTextureSize = other.fMaxTextureSize;
1000 fMaxSampleCount = other.fMaxSampleCount; 1002 fMaxSampleCount = other.fMaxSampleCount;
1001 1003
1002 memcpy(fConfigRenderSupport, other.fConfigRenderSupport, sizeof(fConfigRende rSupport)); 1004 memcpy(fConfigRenderSupport, other.fConfigRenderSupport, sizeof(fConfigRende rSupport));
1003 1005
1004 return *this; 1006 return *this;
1005 } 1007 }
1006 1008
1007 SkString GrDrawTargetCaps::dump() const { 1009 SkString GrDrawTargetCaps::dump() const {
1008 SkString r; 1010 SkString r;
1009 static const char* gNY[] = {"NO", "YES"}; 1011 static const char* gNY[] = {"NO", "YES"};
1010 r.appendf("8 Bit Palette Support : %s\n", gNY[f8BitPaletteSupport]); 1012 r.appendf("8 Bit Palette Support : %s\n", gNY[f8BitPaletteSupport]);
1013 r.appendf("MIP Map Support : %s\n", gNY[fMipMapSupport]);
1011 r.appendf("NPOT Texture Tile Support : %s\n", gNY[fNPOTTextureTileSupport] ); 1014 r.appendf("NPOT Texture Tile Support : %s\n", gNY[fNPOTTextureTileSupport] );
1012 r.appendf("Two Sided Stencil Support : %s\n", gNY[fTwoSidedStencilSupport] ); 1015 r.appendf("Two Sided Stencil Support : %s\n", gNY[fTwoSidedStencilSupport] );
1013 r.appendf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSupport]) ; 1016 r.appendf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSupport]) ;
1014 r.appendf("HW AA Lines Support : %s\n", gNY[fHWAALineSupport]); 1017 r.appendf("HW AA Lines Support : %s\n", gNY[fHWAALineSupport]);
1015 r.appendf("Shader Derivative Support : %s\n", gNY[fShaderDerivativeSupport ]); 1018 r.appendf("Shader Derivative Support : %s\n", gNY[fShaderDerivativeSupport ]);
1016 r.appendf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport]) ; 1019 r.appendf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport]) ;
1017 r.appendf("Dual Source Blending Support: %s\n", gNY[fDualSourceBlendingSuppo rt]); 1020 r.appendf("Dual Source Blending Support: %s\n", gNY[fDualSourceBlendingSuppo rt]);
1018 r.appendf("Buffer Lock Support : %s\n", gNY[fBufferLockSupport]); 1021 r.appendf("Buffer Lock Support : %s\n", gNY[fBufferLockSupport]);
1019 r.appendf("Path Rendering Support : %s\n", gNY[fPathRenderingSupport]); 1022 r.appendf("Path Rendering Support : %s\n", gNY[fPathRenderingSupport]);
1020 r.appendf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderSupport] ); 1023 r.appendf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderSupport] );
(...skipping 25 matching lines...) Expand all
1046 for (size_t i = 0; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 1049 for (size_t i = 0; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
1047 if (i != kUnknown_GrPixelConfig) { 1050 if (i != kUnknown_GrPixelConfig) {
1048 r.appendf("%s is renderable: %s, with MSAA: %s\n", 1051 r.appendf("%s is renderable: %s, with MSAA: %s\n",
1049 kConfigNames[i], 1052 kConfigNames[i],
1050 gNY[fConfigRenderSupport[i][0]], 1053 gNY[fConfigRenderSupport[i][0]],
1051 gNY[fConfigRenderSupport[i][1]]); 1054 gNY[fConfigRenderSupport[i][1]]);
1052 } 1055 }
1053 } 1056 }
1054 return r; 1057 return r;
1055 } 1058 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrDrawTargetCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698