| 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 17 matching lines...) Expand all Loading... |
| 28 class GrPaint; | 28 class GrPaint; |
| 29 class GrPathProcessor; | 29 class GrPathProcessor; |
| 30 class GrPipelineBuilder; | 30 class GrPipelineBuilder; |
| 31 class GrRenderTarget; | 31 class GrRenderTarget; |
| 32 class GrStyle; | 32 class GrStyle; |
| 33 class GrSurface; | 33 class GrSurface; |
| 34 struct GrUserStencilSettings; | 34 struct GrUserStencilSettings; |
| 35 class SkDrawFilter; | 35 class SkDrawFilter; |
| 36 struct SkIPoint; | 36 struct SkIPoint; |
| 37 struct SkIRect; | 37 struct SkIRect; |
| 38 class SkLatticeIter; | |
| 39 class SkMatrix; | 38 class SkMatrix; |
| 40 class SkPaint; | 39 class SkPaint; |
| 41 class SkPath; | 40 class SkPath; |
| 42 struct SkPoint; | 41 struct SkPoint; |
| 43 struct SkRect; | 42 struct SkRect; |
| 44 class SkRRect; | 43 class SkRRect; |
| 45 struct SkRSXform; | 44 struct SkRSXform; |
| 46 class SkTextBlob; | 45 class SkTextBlob; |
| 47 | 46 |
| 48 /* | 47 /* |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 * @param oval the bounding rect of the oval. | 224 * @param oval the bounding rect of the oval. |
| 226 * @param style style to apply to the oval. Currently path effects a
re not allowed. | 225 * @param style style to apply to the oval. Currently path effects a
re not allowed. |
| 227 */ | 226 */ |
| 228 void drawOval(const GrClip&, | 227 void drawOval(const GrClip&, |
| 229 const GrPaint& paint, | 228 const GrPaint& paint, |
| 230 const SkMatrix& viewMatrix, | 229 const SkMatrix& viewMatrix, |
| 231 const SkRect& oval, | 230 const SkRect& oval, |
| 232 const GrStyle& style); | 231 const GrStyle& style); |
| 233 | 232 |
| 234 /** | 233 /** |
| 235 * Draw the image as a set of rects, specified by |iter|. | 234 * Draw the image stretched differentially to fit into dst. |
| 235 * center is a rect within the image, and logically divides the image |
| 236 * into 9 sections (3x3). For example, if the middle pixel of a [5x5] |
| 237 * image is the "center", then the center-rect should be [2, 2, 3, 3]. |
| 238 * |
| 239 * If the dst is >= the image size, then... |
| 240 * - The 4 corners are not stretched at all. |
| 241 * - The sides are stretched in only one axis. |
| 242 * - The center is stretched in both axes. |
| 243 * Else, for each axis where dst < image, |
| 244 * - The corners shrink proportionally |
| 245 * - The sides (along the shrink axis) and center are not drawn |
| 236 */ | 246 */ |
| 237 void drawImageLattice(const GrClip&, | 247 void drawImageNine(const GrClip&, |
| 238 const GrPaint& paint, | 248 const GrPaint& paint, |
| 239 const SkMatrix& viewMatrix, | 249 const SkMatrix& viewMatrix, |
| 240 int imageWidth, | 250 int imageWidth, |
| 241 int imageHeight, | 251 int imageHeight, |
| 242 std::unique_ptr<SkLatticeIter> iter, | 252 const SkIRect& center, |
| 243 const SkRect& dst); | 253 const SkRect& dst); |
| 244 | 254 |
| 245 /** | 255 /** |
| 246 * After this returns any pending surface IO will be issued to the backend 3
D API and | 256 * After this returns any pending surface IO will be issued to the backend 3
D API and |
| 247 * if the surface has MSAA it will be resolved. | 257 * if the surface has MSAA it will be resolved. |
| 248 */ | 258 */ |
| 249 void prepareForExternalIO(); | 259 void prepareForExternalIO(); |
| 250 | 260 |
| 251 bool isStencilBufferMultisampled() const { | 261 bool isStencilBufferMultisampled() const { |
| 252 return fRenderTarget->isStencilBufferMultisampled(); | 262 return fRenderTarget->isStencilBufferMultisampled(); |
| 253 } | 263 } |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 | 371 |
| 362 sk_sp<SkColorSpace> fColorSpace; | 372 sk_sp<SkColorSpace> fColorSpace; |
| 363 SkSurfaceProps fSurfaceProps; | 373 SkSurfaceProps fSurfaceProps; |
| 364 GrAuditTrail* fAuditTrail; | 374 GrAuditTrail* fAuditTrail; |
| 365 | 375 |
| 366 // In debug builds we guard against improper thread handling | 376 // In debug builds we guard against improper thread handling |
| 367 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) | 377 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) |
| 368 }; | 378 }; |
| 369 | 379 |
| 370 #endif | 380 #endif |
| OLD | NEW |