| OLD | NEW |
| 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 |
| 11 #include "GrDrawTarget.h" | 11 #include "GrDrawTarget.h" |
| 12 #include "GrContext.h" | 12 #include "GrContext.h" |
| 13 #include "GrDrawTargetCaps.h" | 13 #include "GrDrawTargetCaps.h" |
| 14 #include "GrPath.h" | 14 #include "GrPath.h" |
| 15 #include "GrRenderTarget.h" | 15 #include "GrRenderTarget.h" |
| 16 #include "GrTexture.h" | 16 #include "GrTexture.h" |
| 17 #include "GrVertexBuffer.h" | 17 #include "GrVertexBuffer.h" |
| 18 | 18 |
| 19 #include "SkStrokeRec.h" | 19 #include "SkStrokeRec.h" |
| 20 | 20 |
| 21 SK_DEFINE_INST_COUNT(GrDrawTarget) | |
| 22 | |
| 23 //////////////////////////////////////////////////////////////////////////////// | 21 //////////////////////////////////////////////////////////////////////////////// |
| 24 | 22 |
| 25 GrDrawTarget::DrawInfo& GrDrawTarget::DrawInfo::operator =(const DrawInfo& di) { | 23 GrDrawTarget::DrawInfo& GrDrawTarget::DrawInfo::operator =(const DrawInfo& di) { |
| 26 fPrimitiveType = di.fPrimitiveType; | 24 fPrimitiveType = di.fPrimitiveType; |
| 27 fStartVertex = di.fStartVertex; | 25 fStartVertex = di.fStartVertex; |
| 28 fStartIndex = di.fStartIndex; | 26 fStartIndex = di.fStartIndex; |
| 29 fVertexCount = di.fVertexCount; | 27 fVertexCount = di.fVertexCount; |
| 30 fIndexCount = di.fIndexCount; | 28 fIndexCount = di.fIndexCount; |
| 31 | 29 |
| 32 fInstanceCount = di.fInstanceCount; | 30 fInstanceCount = di.fInstanceCount; |
| (...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 955 | 953 |
| 956 void GrDrawTarget::initCopySurfaceDstDesc(const GrSurface* src, GrTextureDesc* d
esc) { | 954 void GrDrawTarget::initCopySurfaceDstDesc(const GrSurface* src, GrTextureDesc* d
esc) { |
| 957 // 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. |
| 958 desc->fOrigin = kDefault_GrSurfaceOrigin; | 956 desc->fOrigin = kDefault_GrSurfaceOrigin; |
| 959 desc->fFlags = kRenderTarget_GrTextureFlagBit | kNoStencil_GrTextureFlagBit; | 957 desc->fFlags = kRenderTarget_GrTextureFlagBit | kNoStencil_GrTextureFlagBit; |
| 960 desc->fConfig = src->config(); | 958 desc->fConfig = src->config(); |
| 961 } | 959 } |
| 962 | 960 |
| 963 /////////////////////////////////////////////////////////////////////////////// | 961 /////////////////////////////////////////////////////////////////////////////// |
| 964 | 962 |
| 965 SK_DEFINE_INST_COUNT(GrDrawTargetCaps) | |
| 966 | |
| 967 void GrDrawTargetCaps::reset() { | 963 void GrDrawTargetCaps::reset() { |
| 968 f8BitPaletteSupport = false; | 964 f8BitPaletteSupport = false; |
| 969 fNPOTTextureTileSupport = false; | 965 fNPOTTextureTileSupport = false; |
| 970 fTwoSidedStencilSupport = false; | 966 fTwoSidedStencilSupport = false; |
| 971 fStencilWrapOpsSupport = false; | 967 fStencilWrapOpsSupport = false; |
| 972 fHWAALineSupport = false; | 968 fHWAALineSupport = false; |
| 973 fShaderDerivativeSupport = false; | 969 fShaderDerivativeSupport = false; |
| 974 fGeometryShaderSupport = false; | 970 fGeometryShaderSupport = false; |
| 975 fDualSourceBlendingSupport = false; | 971 fDualSourceBlendingSupport = false; |
| 976 fBufferLockSupport = false; | 972 fBufferLockSupport = false; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1050 for (size_t i = 0; i < SK_ARRAY_COUNT(kConfigNames); ++i) { | 1046 for (size_t i = 0; i < SK_ARRAY_COUNT(kConfigNames); ++i) { |
| 1051 if (i != kUnknown_GrPixelConfig) { | 1047 if (i != kUnknown_GrPixelConfig) { |
| 1052 r.appendf("%s is renderable: %s, with MSAA: %s\n", | 1048 r.appendf("%s is renderable: %s, with MSAA: %s\n", |
| 1053 kConfigNames[i], | 1049 kConfigNames[i], |
| 1054 gNY[fConfigRenderSupport[i][0]], | 1050 gNY[fConfigRenderSupport[i][0]], |
| 1055 gNY[fConfigRenderSupport[i][1]]); | 1051 gNY[fConfigRenderSupport[i][1]]); |
| 1056 } | 1052 } |
| 1057 } | 1053 } |
| 1058 return r; | 1054 return r; |
| 1059 } | 1055 } |
| OLD | NEW |