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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 * TODO: Figure out a better model that allows us to roll this method into d
rawBatch. | 270 * TODO: Figure out a better model that allows us to roll this method into d
rawBatch. |
271 */ | 271 */ |
272 void drawPathBatch(const GrPipelineBuilder&, GrDrawPathBatchBase*); | 272 void drawPathBatch(const GrPipelineBuilder&, GrDrawPathBatchBase*); |
273 | 273 |
274 int width() const { return fRenderTarget->width(); } | 274 int width() const { return fRenderTarget->width(); } |
275 int height() const { return fRenderTarget->height(); } | 275 int height() const { return fRenderTarget->height(); } |
276 int numColorSamples() const { return fRenderTarget->numColorSamples(); } | 276 int numColorSamples() const { return fRenderTarget->numColorSamples(); } |
277 | 277 |
278 GrRenderTarget* accessRenderTarget() { return fRenderTarget; } | 278 GrRenderTarget* accessRenderTarget() { return fRenderTarget; } |
279 | 279 |
| 280 ////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 281 // Functions intended for internal use only. |
| 282 void internal_drawBatch(const GrPipelineBuilder& pipelineBuilder, GrDrawBatc
h* batch); |
| 283 |
280 private: | 284 private: |
281 friend class GrAtlasTextBlob; // for access to drawBatch | 285 friend class GrAtlasTextBlob; // for access to drawBatch |
282 friend class GrDrawingManager; // for ctor | 286 friend class GrDrawingManager; // for ctor |
283 | 287 |
284 SkDEBUGCODE(void validate() const;) | 288 SkDEBUGCODE(void validate() const;) |
285 | 289 |
286 GrDrawContext(GrDrawingManager*, GrRenderTarget*, const SkSurfaceProps* surf
aceProps, | 290 GrDrawContext(GrDrawingManager*, GrRenderTarget*, const SkSurfaceProps* surf
aceProps, |
287 GrSingleOwner*); | 291 GrSingleOwner*); |
288 | 292 |
289 void internalDrawPath(GrPipelineBuilder*, | 293 void internalDrawPath(GrPipelineBuilder*, |
(...skipping 17 matching lines...) Expand all Loading... |
307 GrDrawTarget* fDrawTarget; | 311 GrDrawTarget* fDrawTarget; |
308 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMana
ger | 312 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMana
ger |
309 | 313 |
310 SkSurfaceProps fSurfaceProps; | 314 SkSurfaceProps fSurfaceProps; |
311 | 315 |
312 // In debug builds we guard against improper thread handling | 316 // In debug builds we guard against improper thread handling |
313 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) | 317 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) |
314 }; | 318 }; |
315 | 319 |
316 #endif | 320 #endif |
OLD | NEW |