| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 #ifndef GrDrawTarget_DEFINED | 8 #ifndef GrDrawTarget_DEFINED |
| 9 #define GrDrawTarget_DEFINED | 9 #define GrDrawTarget_DEFINED |
| 10 | 10 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 * src bounds then pixel values in the dst rect corresponding to area clipp
ed | 137 * src bounds then pixel values in the dst rect corresponding to area clipp
ed |
| 138 * by the src rect are not overwritten. This method is not guaranteed to suc
ceed | 138 * by the src rect are not overwritten. This method is not guaranteed to suc
ceed |
| 139 * depending on the type of surface, configs, etc, and the backend-specific | 139 * depending on the type of surface, configs, etc, and the backend-specific |
| 140 * limitations. | 140 * limitations. |
| 141 */ | 141 */ |
| 142 bool copySurface(GrSurface* dst, | 142 bool copySurface(GrSurface* dst, |
| 143 GrSurface* src, | 143 GrSurface* src, |
| 144 const SkIRect& srcRect, | 144 const SkIRect& srcRect, |
| 145 const SkIPoint& dstPoint); | 145 const SkIPoint& dstPoint); |
| 146 | 146 |
| 147 /** | |
| 148 * Gets the shape rendering object if it is supported on this platform. | |
| 149 */ | |
| 150 gr_instanced::InstancedRendering* instancedRendering() const { return fInsta
ncedRendering; } | |
| 151 | |
| 152 private: | 147 private: |
| 153 friend class GrDrawingManager; // for resetFlag & TopoSortTraits | 148 friend class GrDrawingManager; // for resetFlag & TopoSortTraits |
| 154 friend class GrDrawContextPriv; // for clearStencilClip | 149 friend class GrDrawContextPriv; // for clearStencilClip |
| 155 | 150 |
| 156 enum Flags { | 151 enum Flags { |
| 157 kClosed_Flag = 0x01, //!< This drawTarget can't accept any more bat
ches | 152 kClosed_Flag = 0x01, //!< This drawTarget can't accept any more bat
ches |
| 158 | 153 |
| 159 kWasOutput_Flag = 0x02, //!< Flag for topological sorting | 154 kWasOutput_Flag = 0x02, //!< Flag for topological sorting |
| 160 kTempMark_Flag = 0x04, //!< Flag for topological sorting | 155 kTempMark_Flag = 0x04, //!< Flag for topological sorting |
| 161 }; | 156 }; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 const GrClip&, | 202 const GrClip&, |
| 208 const GrPipelineOptimizations& optimizations, | 203 const GrPipelineOptimizations& optimizations, |
| 209 GrXferProcessor::DstTexture*, | 204 GrXferProcessor::DstTexture*, |
| 210 const SkRect& batchBounds); | 205 const SkRect& batchBounds); |
| 211 | 206 |
| 212 void addDependency(GrDrawTarget* dependedOn); | 207 void addDependency(GrDrawTarget* dependedOn); |
| 213 | 208 |
| 214 // Used only by drawContextPriv. | 209 // Used only by drawContextPriv. |
| 215 void clearStencilClip(const SkIRect&, bool insideClip, GrRenderTarget*); | 210 void clearStencilClip(const SkIRect&, bool insideClip, GrRenderTarget*); |
| 216 | 211 |
| 217 SkSTArray<256, SkAutoTUnref<GrBatch>, true> fBatches; | 212 SkSTArray<256, SkAutoTUnref<GrBatch>, true> fBatches; |
| 218 // The context is only in service of the clip mask manager, remove once CMM
doesn't need this. | 213 // The context is only in service of the clip mask manager, remove once CMM
doesn't need this. |
| 219 GrContext* fContext; | 214 GrContext* fContext; |
| 220 GrGpu* fGpu; | 215 GrGpu* fGpu; |
| 221 GrResourceProvider* fResourceProvider; | 216 GrResourceProvider* fResourceProvider; |
| 222 GrAuditTrail* fAuditTrail; | 217 GrAuditTrail* fAuditTrail; |
| 223 | 218 |
| 224 SkDEBUGCODE(int fDebugID;) | 219 SkDEBUGCODE(int fDebugID;) |
| 225 uint32_t fFlags; | 220 uint32_t fFlags; |
| 226 | 221 |
| 227 // 'this' drawTarget relies on the output of the drawTargets in 'fDependenci
es' | 222 // 'this' drawTarget relies on the output of the drawTargets in 'fDependenci
es' |
| 228 SkTDArray<GrDrawTarget*> fDependencies; | 223 SkTDArray<GrDrawTarget*> fDependencies; |
| 229 GrRenderTarget* fRenderTarget; | 224 GrRenderTarget* fRenderTarget; |
| 230 | 225 |
| 231 bool fClipBatchToBounds; | 226 bool fClipBatchToBounds; |
| 232 bool fDrawBatchBounds; | 227 bool fDrawBatchBounds; |
| 233 int fMaxBatchLookback; | 228 int fMaxBatchLookback; |
| 234 int fMaxBatchLookahead; | 229 int fMaxBatchLookahead; |
| 235 | |
| 236 SkAutoTDelete<gr_instanced::InstancedRendering> fInstancedRendering; | |
| 237 | 230 |
| 238 typedef SkRefCnt INHERITED; | 231 typedef SkRefCnt INHERITED; |
| 239 }; | 232 }; |
| 240 | 233 |
| 241 #endif | 234 #endif |
| OLD | NEW |