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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 | 244 |
245 | 245 |
246 /** | 246 /** |
247 * Draws a batch | 247 * Draws a batch |
248 * | 248 * |
249 * @param paint describes how to color pixels. | 249 * @param paint describes how to color pixels. |
250 * @param batch the batch to draw | 250 * @param batch the batch to draw |
251 */ | 251 */ |
252 void drawBatch(const GrClip&, const GrPaint&, GrDrawBatch*); | 252 void drawBatch(const GrClip&, const GrPaint&, GrDrawBatch*); |
253 | 253 |
| 254 GrRenderTarget* rt_remove_me() { return fRenderTarget; } |
| 255 |
254 private: | 256 private: |
255 friend class GrAtlasTextContext; // for access to drawBatch | 257 friend class GrAtlasTextContext; // for access to drawBatch |
256 friend class GrDrawingManager; // for ctor | 258 friend class GrDrawingManager; // for ctor |
257 | 259 |
258 SkDEBUGCODE(void validate() const;) | 260 SkDEBUGCODE(void validate() const;) |
259 | 261 |
260 GrDrawContext(GrDrawingManager*, GrRenderTarget*, const SkSurfaceProps* surf
aceProps); | 262 GrDrawContext(GrDrawingManager*, GrRenderTarget*, const SkSurfaceProps* surf
aceProps); |
261 | 263 |
262 void internalDrawPath(GrPipelineBuilder*, | 264 void internalDrawPath(GrPipelineBuilder*, |
263 const SkMatrix& viewMatrix, | 265 const SkMatrix& viewMatrix, |
(...skipping 13 matching lines...) Expand all Loading... |
277 | 279 |
278 // In MDB-mode the drawTarget can be closed by some other drawContext that h
as picked | 280 // In MDB-mode the drawTarget can be closed by some other drawContext that h
as picked |
279 // it up. For this reason, the drawTarget should only ever be accessed via '
getDrawTarget'. | 281 // it up. For this reason, the drawTarget should only ever be accessed via '
getDrawTarget'. |
280 GrDrawTarget* fDrawTarget; | 282 GrDrawTarget* fDrawTarget; |
281 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMana
ger | 283 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMana
ger |
282 | 284 |
283 SkSurfaceProps fSurfaceProps; | 285 SkSurfaceProps fSurfaceProps; |
284 }; | 286 }; |
285 | 287 |
286 #endif | 288 #endif |
OLD | NEW |