| 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 15 matching lines...) Expand all Loading... |
| 26 class GrTextContext; | 26 class GrTextContext; |
| 27 class SkDrawFilter; | 27 class SkDrawFilter; |
| 28 struct SkIPoint; | 28 struct SkIPoint; |
| 29 struct SkIRect; | 29 struct SkIRect; |
| 30 class SkMatrix; | 30 class SkMatrix; |
| 31 class SkPaint; | 31 class SkPaint; |
| 32 class SkPath; | 32 class SkPath; |
| 33 struct SkPoint; | 33 struct SkPoint; |
| 34 struct SkRect; | 34 struct SkRect; |
| 35 class SkRRect; | 35 class SkRRect; |
| 36 struct SkRSXform; |
| 36 class SkTextBlob; | 37 class SkTextBlob; |
| 37 | 38 |
| 38 /* | 39 /* |
| 39 * A helper object to orchestrate draws | 40 * A helper object to orchestrate draws |
| 40 */ | 41 */ |
| 41 class SK_API GrDrawContext : public SkRefCnt { | 42 class SK_API GrDrawContext : public SkRefCnt { |
| 42 public: | 43 public: |
| 43 ~GrDrawContext() override; | 44 ~GrDrawContext() override; |
| 44 | 45 |
| 45 void copySurface(GrRenderTarget* dst, GrSurface* src, | 46 void copySurface(GrRenderTarget* dst, GrSurface* src, |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 const SkMatrix& viewMatrix, | 216 const SkMatrix& viewMatrix, |
| 216 GrPrimitiveType primitiveType, | 217 GrPrimitiveType primitiveType, |
| 217 int vertexCount, | 218 int vertexCount, |
| 218 const SkPoint positions[], | 219 const SkPoint positions[], |
| 219 const SkPoint texs[], | 220 const SkPoint texs[], |
| 220 const GrColor colors[], | 221 const GrColor colors[], |
| 221 const uint16_t indices[], | 222 const uint16_t indices[], |
| 222 int indexCount); | 223 int indexCount); |
| 223 | 224 |
| 224 /** | 225 /** |
| 226 * Draws textured sprites from an atlas with a paint. |
| 227 * |
| 228 * @param paint describes how to color pixels. |
| 229 * @param viewMatrix transformation matrix |
| 230 * @param spriteCount number of sprites. |
| 231 * @param xform array of compressed transformation data, require
d. |
| 232 * @param texRect array of texture rectangles used to access the p
aint. |
| 233 * @param colors optional array of per-sprite colors, supercedes |
| 234 * the paint's color field. |
| 235 */ |
| 236 void drawAtlas(GrRenderTarget*, |
| 237 const GrClip&, |
| 238 const GrPaint& paint, |
| 239 const SkMatrix& viewMatrix, |
| 240 int spriteCount, |
| 241 const SkRSXform xform[], |
| 242 const SkRect texRect[], |
| 243 const SkColor colors[]); |
| 244 |
| 245 /** |
| 225 * Draws an oval. | 246 * Draws an oval. |
| 226 * | 247 * |
| 227 * @param paint describes how to color pixels. | 248 * @param paint describes how to color pixels. |
| 228 * @param viewMatrix transformation matrix | 249 * @param viewMatrix transformation matrix |
| 229 * @param oval the bounding rect of the oval. | 250 * @param oval the bounding rect of the oval. |
| 230 * @param strokeInfo the stroke information (width, join, cap) and | 251 * @param strokeInfo the stroke information (width, join, cap) and |
| 231 * the dash information (intervals, count, phase). | 252 * the dash information (intervals, count, phase). |
| 232 */ | 253 */ |
| 233 void drawOval(GrRenderTarget*, | 254 void drawOval(GrRenderTarget*, |
| 234 const GrClip&, | 255 const GrClip&, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 262 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrBatch* batch); | 283 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrBatch* batch); |
| 263 | 284 |
| 264 GrContext* fContext; // owning context -> no ref | 285 GrContext* fContext; // owning context -> no ref |
| 265 GrDrawTarget* fDrawTarget; | 286 GrDrawTarget* fDrawTarget; |
| 266 GrTextContext* fTextContext; // lazily created | 287 GrTextContext* fTextContext; // lazily created |
| 267 | 288 |
| 268 SkSurfaceProps fSurfaceProps; | 289 SkSurfaceProps fSurfaceProps; |
| 269 }; | 290 }; |
| 270 | 291 |
| 271 #endif | 292 #endif |
| OLD | NEW |