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 #include "GrDrawTarget.h" | 9 #include "GrDrawTarget.h" |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 SkASSERT(fStartIndex >= 0); | 87 SkASSERT(fStartIndex >= 0); |
88 } | 88 } |
89 | 89 |
90 //////////////////////////////////////////////////////////////////////////////// | 90 //////////////////////////////////////////////////////////////////////////////// |
91 | 91 |
92 #define DEBUG_INVAL_BUFFER 0xdeadcafe | 92 #define DEBUG_INVAL_BUFFER 0xdeadcafe |
93 #define DEBUG_INVAL_START_IDX -1 | 93 #define DEBUG_INVAL_START_IDX -1 |
94 | 94 |
95 GrDrawTarget::GrDrawTarget(GrContext* context) | 95 GrDrawTarget::GrDrawTarget(GrContext* context) |
96 : fContext(context) | 96 : fContext(context) |
97 , fGpuTraceMarkerCount(0) | 97 , fGpuTraceMarkerCount(0) { |
98 , fPool(2 << 16, 2 << 16) { | |
99 SkASSERT(context); | 98 SkASSERT(context); |
100 GeometrySrcState& geoSrc = fGeoSrcStateStack.push_back(); | 99 GeometrySrcState& geoSrc = fGeoSrcStateStack.push_back(); |
101 #ifdef SK_DEBUG | 100 #ifdef SK_DEBUG |
102 geoSrc.fVertexCount = DEBUG_INVAL_START_IDX; | 101 geoSrc.fVertexCount = DEBUG_INVAL_START_IDX; |
103 geoSrc.fVertexBuffer = (GrVertexBuffer*)DEBUG_INVAL_BUFFER; | 102 geoSrc.fVertexBuffer = (GrVertexBuffer*)DEBUG_INVAL_BUFFER; |
104 geoSrc.fIndexCount = DEBUG_INVAL_START_IDX; | 103 geoSrc.fIndexCount = DEBUG_INVAL_START_IDX; |
105 geoSrc.fIndexBuffer = (GrIndexBuffer*)DEBUG_INVAL_BUFFER; | 104 geoSrc.fIndexBuffer = (GrIndexBuffer*)DEBUG_INVAL_BUFFER; |
106 #endif | 105 #endif |
107 geoSrc.fVertexSrc = kNone_GeometrySrcType; | 106 geoSrc.fVertexSrc = kNone_GeometrySrcType; |
108 geoSrc.fIndexSrc = kNone_GeometrySrcType; | 107 geoSrc.fIndexSrc = kNone_GeometrySrcType; |
(...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1261 GrPipelineBuilder::AutoRestoreFragmentProcessors* a
rfp, | 1260 GrPipelineBuilder::AutoRestoreFragmentProcessors* a
rfp, |
1262 GrPipelineBuilder::AutoRestoreStencil* ars, | 1261 GrPipelineBuilder::AutoRestoreStencil* ars, |
1263 GrScissorState* scissorState, | 1262 GrScissorState* scissorState, |
1264 const SkRect* devBounds) { | 1263 const SkRect* devBounds) { |
1265 return fClipMaskManager.setupClipping(pipelineBuilder, | 1264 return fClipMaskManager.setupClipping(pipelineBuilder, |
1266 arfp, | 1265 arfp, |
1267 ars, | 1266 ars, |
1268 scissorState, | 1267 scissorState, |
1269 devBounds); | 1268 devBounds); |
1270 } | 1269 } |
OLD | NEW |