OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 GrDrawContext_DEFINED | 8 #ifndef GrDrawContext_DEFINED |
9 #define GrDrawContext_DEFINED | 9 #define GrDrawContext_DEFINED |
10 | 10 |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 ////////////////////////////////////////////////////////////////////////////
/////////////////// | 281 ////////////////////////////////////////////////////////////////////////////
/////////////////// |
282 // Functions intended for internal use only. | 282 // Functions intended for internal use only. |
283 void internal_drawBatch(const GrPipelineBuilder& pipelineBuilder, GrDrawBatc
h* batch); | 283 void internal_drawBatch(const GrPipelineBuilder& pipelineBuilder, GrDrawBatc
h* batch); |
284 | 284 |
285 private: | 285 private: |
286 friend class GrAtlasTextBlob; // for access to drawBatch | 286 friend class GrAtlasTextBlob; // for access to drawBatch |
287 friend class GrDrawingManager; // for ctor | 287 friend class GrDrawingManager; // for ctor |
288 | 288 |
289 SkDEBUGCODE(void validate() const;) | 289 SkDEBUGCODE(void validate() const;) |
290 | 290 |
291 GrDrawContext(GrDrawingManager*, GrRenderTarget*, const SkSurfaceProps* surf
aceProps, | 291 GrDrawContext(GrContext*, GrDrawingManager*, GrRenderTarget*, |
292 GrAuditTrail*, GrSingleOwner*); | 292 const SkSurfaceProps* surfaceProps, GrAuditTrail*, GrSingleOwn
er*); |
293 | 293 |
294 void internalDrawPath(GrPipelineBuilder*, | 294 void internalDrawPath(GrPipelineBuilder*, |
295 const SkMatrix& viewMatrix, | 295 const SkMatrix& viewMatrix, |
296 GrColor, | 296 GrColor, |
297 bool useAA, | 297 bool useAA, |
298 const SkPath&, | 298 const SkPath&, |
299 const GrStrokeInfo&); | 299 const GrStrokeInfo&); |
300 | 300 |
301 // This entry point allows the GrTextContext-derived classes to add their ba
tches to | 301 // This entry point allows the GrTextContext-derived classes to add their ba
tches to |
302 // the drawTarget. | 302 // the drawTarget. |
303 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* batch); | 303 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* batch); |
304 | 304 |
305 GrDrawTarget* getDrawTarget(); | 305 GrDrawTarget* getDrawTarget(); |
306 | 306 |
307 GrDrawingManager* fDrawingManager; | 307 GrDrawingManager* fDrawingManager; |
308 GrRenderTarget* fRenderTarget; | 308 GrRenderTarget* fRenderTarget; |
309 | 309 |
310 // In MDB-mode the drawTarget can be closed by some other drawContext that h
as picked | 310 // In MDB-mode the drawTarget can be closed by some other drawContext that h
as picked |
311 // it up. For this reason, the drawTarget should only ever be accessed via '
getDrawTarget'. | 311 // it up. For this reason, the drawTarget should only ever be accessed via '
getDrawTarget'. |
312 GrDrawTarget* fDrawTarget; | 312 GrDrawTarget* fDrawTarget; |
313 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMana
ger | 313 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMana
ger |
| 314 GrContext* fContext; |
314 | 315 |
315 SkSurfaceProps fSurfaceProps; | 316 SkSurfaceProps fSurfaceProps; |
316 GrAuditTrail* fAuditTrail; | 317 GrAuditTrail* fAuditTrail; |
317 | 318 |
318 // In debug builds we guard against improper thread handling | 319 // In debug builds we guard against improper thread handling |
319 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) | 320 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) |
320 }; | 321 }; |
321 | 322 |
322 #endif | 323 #endif |
OLD | NEW |