| 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 * the dash information (intervals, count, phase). | 252 * the dash information (intervals, count, phase). |
| 253 */ | 253 */ |
| 254 void drawOval(GrRenderTarget*, | 254 void drawOval(GrRenderTarget*, |
| 255 const GrClip&, | 255 const GrClip&, |
| 256 const GrPaint& paint, | 256 const GrPaint& paint, |
| 257 const SkMatrix& viewMatrix, | 257 const SkMatrix& viewMatrix, |
| 258 const SkRect& oval, | 258 const SkRect& oval, |
| 259 const GrStrokeInfo& strokeInfo); | 259 const GrStrokeInfo& strokeInfo); |
| 260 | 260 |
| 261 | 261 |
| 262 /** |
| 263 * Draws a batch |
| 264 * |
| 265 * @param paint describes how to color pixels. |
| 266 * @param batch the batch to draw |
| 267 */ |
| 268 void drawBatch(GrRenderTarget*, const GrClip&, const GrPaint&, GrBatch*); |
| 269 |
| 262 private: | 270 private: |
| 263 friend class GrAtlasTextContext; // for access to drawBatch | 271 friend class GrAtlasTextContext; // for access to drawBatch |
| 264 friend class GrContext; // for ctor | 272 friend class GrContext; // for ctor |
| 265 | 273 |
| 266 GrDrawContext(GrContext*, GrDrawTarget*, const SkSurfaceProps&); | 274 GrDrawContext(GrContext*, GrDrawTarget*, const SkSurfaceProps&); |
| 267 | 275 |
| 268 GrTextContext* createTextContext(GrRenderTarget*, const SkSurfaceProps&); | 276 GrTextContext* createTextContext(GrRenderTarget*, const SkSurfaceProps&); |
| 269 | 277 |
| 270 // Checks if the context has been abandoned and if the rendertarget is owned
by this context | 278 // Checks if the context has been abandoned and if the rendertarget is owned
by this context |
| 271 bool prepareToDraw(GrRenderTarget* rt); | 279 bool prepareToDraw(GrRenderTarget* rt); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 283 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrBatch* batch); | 291 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrBatch* batch); |
| 284 | 292 |
| 285 GrContext* fContext; // owning context -> no ref | 293 GrContext* fContext; // owning context -> no ref |
| 286 GrDrawTarget* fDrawTarget; | 294 GrDrawTarget* fDrawTarget; |
| 287 GrTextContext* fTextContext; // lazily created | 295 GrTextContext* fTextContext; // lazily created |
| 288 | 296 |
| 289 SkSurfaceProps fSurfaceProps; | 297 SkSurfaceProps fSurfaceProps; |
| 290 }; | 298 }; |
| 291 | 299 |
| 292 #endif | 300 #endif |
| OLD | NEW |