| 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 void drawBatch(const GrClip&, const GrPaint&, GrDrawBatch*); | 252 void drawBatch(const GrClip&, const GrPaint&, GrDrawBatch*); |
| 253 | 253 |
| 254 private: | 254 private: |
| 255 friend class GrAtlasTextContext; // for access to drawBatch | 255 friend class GrAtlasTextContext; // for access to drawBatch |
| 256 friend class GrDrawingManager; // for ctor | 256 friend class GrDrawingManager; // for ctor |
| 257 | 257 |
| 258 SkDEBUGCODE(void validate() const;) | 258 SkDEBUGCODE(void validate() const;) |
| 259 | 259 |
| 260 GrDrawContext(GrDrawingManager*, GrRenderTarget*, const SkSurfaceProps* surf
aceProps); | 260 GrDrawContext(GrDrawingManager*, GrRenderTarget*, const SkSurfaceProps* surf
aceProps); |
| 261 | 261 |
| 262 void internalDrawPath(GrDrawTarget*, | 262 void internalDrawPath(GrPipelineBuilder*, |
| 263 GrPipelineBuilder*, | |
| 264 const SkMatrix& viewMatrix, | 263 const SkMatrix& viewMatrix, |
| 265 GrColor, | 264 GrColor, |
| 266 bool useAA, | 265 bool useAA, |
| 267 const SkPath&, | 266 const SkPath&, |
| 268 const GrStrokeInfo&); | 267 const GrStrokeInfo&); |
| 269 | 268 |
| 270 // This entry point allows the GrTextContext-derived classes to add their ba
tches to | 269 // This entry point allows the GrTextContext-derived classes to add their ba
tches to |
| 271 // the drawTarget. | 270 // the drawTarget. |
| 272 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* batch); | 271 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* batch); |
| 273 | 272 |
| 274 GrDrawTarget* getDrawTarget(); | 273 GrDrawTarget* getDrawTarget(); |
| 275 | 274 |
| 276 GrDrawingManager* fDrawingManager; | 275 GrDrawingManager* fDrawingManager; |
| 277 GrRenderTarget* fRenderTarget; | 276 GrRenderTarget* fRenderTarget; |
| 278 | 277 |
| 279 // In MDB-mode the drawTarget can be closed by some other drawContext that h
as picked | 278 // In MDB-mode the drawTarget can be closed by some other drawContext that h
as picked |
| 280 // it up. For this reason, the drawTarget should only ever be accessed via '
getDrawTarget'. | 279 // it up. For this reason, the drawTarget should only ever be accessed via '
getDrawTarget'. |
| 281 GrDrawTarget* fDrawTarget; | 280 GrDrawTarget* fDrawTarget; |
| 282 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMana
ger | 281 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMana
ger |
| 283 | 282 |
| 284 SkSurfaceProps fSurfaceProps; | 283 SkSurfaceProps fSurfaceProps; |
| 285 }; | 284 }; |
| 286 | 285 |
| 287 #endif | 286 #endif |
| OLD | NEW |