| 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 * | 271 * |
| 272 * @param paint describes how to color pixels. | 272 * @param paint describes how to color pixels. |
| 273 * @param batch the batch to draw | 273 * @param batch the batch to draw |
| 274 */ | 274 */ |
| 275 void drawBatch(const GrClip&, const GrPaint&, GrDrawBatch*); | 275 void drawBatch(const GrClip&, const GrPaint&, GrDrawBatch*); |
| 276 | 276 |
| 277 int width() const { return fRenderTarget->width(); } | 277 int width() const { return fRenderTarget->width(); } |
| 278 int height() const { return fRenderTarget->height(); } | 278 int height() const { return fRenderTarget->height(); } |
| 279 int numColorSamples() const { return fRenderTarget->numColorSamples(); } | 279 int numColorSamples() const { return fRenderTarget->numColorSamples(); } |
| 280 | 280 |
| 281 GrRenderTarget* accessRenderTarget() { return fRenderTarget; } |
| 282 |
| 281 private: | 283 private: |
| 282 friend class GrAtlasTextContext; // for access to drawBatch | 284 friend class GrAtlasTextContext; // for access to drawBatch |
| 283 friend class GrDrawingManager; // for ctor | 285 friend class GrDrawingManager; // for ctor |
| 284 | 286 |
| 285 SkDEBUGCODE(void validate() const;) | 287 SkDEBUGCODE(void validate() const;) |
| 286 | 288 |
| 287 GrDrawContext(GrDrawingManager*, GrRenderTarget*, const SkSurfaceProps* surf
aceProps); | 289 GrDrawContext(GrDrawingManager*, GrRenderTarget*, const SkSurfaceProps* surf
aceProps); |
| 288 | 290 |
| 289 void internalDrawPath(GrPipelineBuilder*, | 291 void internalDrawPath(GrPipelineBuilder*, |
| 290 const SkMatrix& viewMatrix, | 292 const SkMatrix& viewMatrix, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 304 | 306 |
| 305 // In MDB-mode the drawTarget can be closed by some other drawContext that h
as picked | 307 // In MDB-mode the drawTarget can be closed by some other drawContext that h
as picked |
| 306 // it up. For this reason, the drawTarget should only ever be accessed via '
getDrawTarget'. | 308 // it up. For this reason, the drawTarget should only ever be accessed via '
getDrawTarget'. |
| 307 GrDrawTarget* fDrawTarget; | 309 GrDrawTarget* fDrawTarget; |
| 308 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMana
ger | 310 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMana
ger |
| 309 | 311 |
| 310 SkSurfaceProps fSurfaceProps; | 312 SkSurfaceProps fSurfaceProps; |
| 311 }; | 313 }; |
| 312 | 314 |
| 313 #endif | 315 #endif |
| OLD | NEW |