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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 const GrPaint& paint, | 219 const GrPaint& paint, |
220 const SkMatrix& viewMatrix, | 220 const SkMatrix& viewMatrix, |
221 const SkRect& oval, | 221 const SkRect& oval, |
222 const GrStrokeInfo& strokeInfo); | 222 const GrStrokeInfo& strokeInfo); |
223 | 223 |
224 | 224 |
225 private: | 225 private: |
226 friend class GrContext; // for ctor | 226 friend class GrContext; // for ctor |
227 | 227 |
228 GrDrawContext(GrContext* context, GrDrawTarget* drawTarget); | 228 GrDrawContext(GrContext* context, GrDrawTarget* drawTarget); |
| 229 ~GrDrawContext() override; |
229 | 230 |
230 // Sets the paint. Returns true on success; false on failure. | 231 // Sets the paint. Returns true on success; false on failure. |
231 bool prepareToDraw(GrPipelineBuilder*, | 232 bool prepareToDraw(GrPipelineBuilder*, |
232 GrRenderTarget* rt, | 233 GrRenderTarget* rt, |
233 const GrClip&, | 234 const GrClip&, |
234 const GrPaint* paint); | 235 const GrPaint* paint); |
235 | 236 |
236 // A simpler version of the above which just returns true on success; false
on failure. | 237 // A simpler version of the above which just returns true on success; false
on failure. |
237 // Clip is *NOT* set | 238 // Clip is *NOT* set |
238 bool prepareToDraw(GrRenderTarget* rt); | 239 bool prepareToDraw(GrRenderTarget* rt); |
239 | 240 |
240 void internalDrawPath(GrDrawTarget*, | 241 void internalDrawPath(GrDrawTarget*, |
241 GrPipelineBuilder*, | 242 GrPipelineBuilder*, |
242 const SkMatrix& viewMatrix, | 243 const SkMatrix& viewMatrix, |
243 GrColor, | 244 GrColor, |
244 bool useAA, | 245 bool useAA, |
245 const SkPath&, | 246 const SkPath&, |
246 const GrStrokeInfo&); | 247 const GrStrokeInfo&); |
247 | 248 |
248 GrContext* fContext; // owning context -> no ref | 249 GrContext* fContext; // owning context -> no ref |
249 SkAutoTUnref<GrDrawTarget> fDrawTarget; | 250 GrDrawTarget* fDrawTarget; |
250 }; | 251 }; |
251 | 252 |
252 #endif | 253 #endif |
OLD | NEW |