| 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 */ | 270 */ |
| 271 void drawPathBatch(const GrPipelineBuilder&, GrDrawPathBatchBase*); | 271 void drawPathBatch(const GrPipelineBuilder&, GrDrawPathBatchBase*); |
| 272 | 272 |
| 273 int width() const { return fRenderTarget->width(); } | 273 int width() const { return fRenderTarget->width(); } |
| 274 int height() const { return fRenderTarget->height(); } | 274 int height() const { return fRenderTarget->height(); } |
| 275 int numColorSamples() const { return fRenderTarget->numColorSamples(); } | 275 int numColorSamples() const { return fRenderTarget->numColorSamples(); } |
| 276 | 276 |
| 277 GrRenderTarget* accessRenderTarget() { return fRenderTarget; } | 277 GrRenderTarget* accessRenderTarget() { return fRenderTarget; } |
| 278 | 278 |
| 279 private: | 279 private: |
| 280 friend class GrAtlasTextContext; // for access to drawBatch | 280 friend class GrAtlasTextBlob; // for access to drawBatch |
| 281 friend class GrDrawingManager; // for ctor | 281 friend class GrDrawingManager; // for ctor |
| 282 | 282 |
| 283 SkDEBUGCODE(void validate() const;) | 283 SkDEBUGCODE(void validate() const;) |
| 284 | 284 |
| 285 GrDrawContext(GrDrawingManager*, GrRenderTarget*, const SkSurfaceProps* surf
aceProps); | 285 GrDrawContext(GrDrawingManager*, GrRenderTarget*, const SkSurfaceProps* surf
aceProps); |
| 286 | 286 |
| 287 void internalDrawPath(GrPipelineBuilder*, | 287 void internalDrawPath(GrPipelineBuilder*, |
| 288 const SkMatrix& viewMatrix, | 288 const SkMatrix& viewMatrix, |
| 289 GrColor, | 289 GrColor, |
| 290 bool useAA, | 290 bool useAA, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 302 | 302 |
| 303 // In MDB-mode the drawTarget can be closed by some other drawContext that h
as picked | 303 // In MDB-mode the drawTarget can be closed by some other drawContext that h
as picked |
| 304 // it up. For this reason, the drawTarget should only ever be accessed via '
getDrawTarget'. | 304 // it up. For this reason, the drawTarget should only ever be accessed via '
getDrawTarget'. |
| 305 GrDrawTarget* fDrawTarget; | 305 GrDrawTarget* fDrawTarget; |
| 306 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMana
ger | 306 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMana
ger |
| 307 | 307 |
| 308 SkSurfaceProps fSurfaceProps; | 308 SkSurfaceProps fSurfaceProps; |
| 309 }; | 309 }; |
| 310 | 310 |
| 311 #endif | 311 #endif |
| OLD | NEW |