| 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; |
| 38 class SkMatrix; | 39 class SkMatrix; |
| 39 class SkPaint; | 40 class SkPaint; |
| 40 class SkPath; | 41 class SkPath; |
| 41 struct SkPoint; | 42 struct SkPoint; |
| 42 struct SkRect; | 43 struct SkRect; |
| 43 class SkRRect; | 44 class SkRRect; |
| 44 struct SkRSXform; | 45 struct SkRSXform; |
| 45 class SkTextBlob; | 46 class SkTextBlob; |
| 46 | 47 |
| 47 /* | 48 /* |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 * @param oval the bounding rect of the oval. | 225 * @param oval the bounding rect of the oval. |
| 225 * @param style style to apply to the oval. Currently path effects a
re not allowed. | 226 * @param style style to apply to the oval. Currently path effects a
re not allowed. |
| 226 */ | 227 */ |
| 227 void drawOval(const GrClip&, | 228 void drawOval(const GrClip&, |
| 228 const GrPaint& paint, | 229 const GrPaint& paint, |
| 229 const SkMatrix& viewMatrix, | 230 const SkMatrix& viewMatrix, |
| 230 const SkRect& oval, | 231 const SkRect& oval, |
| 231 const GrStyle& style); | 232 const GrStyle& style); |
| 232 | 233 |
| 233 /** | 234 /** |
| 234 * Draw the image stretched differentially to fit into dst. | 235 * Draw the image as a set of rects, specified by |iter|. |
| 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 | |
| 246 */ | 236 */ |
| 247 void drawImageNine(const GrClip&, | 237 void drawImageLattice(const GrClip&, |
| 248 const GrPaint& paint, | 238 const GrPaint& paint, |
| 249 const SkMatrix& viewMatrix, | 239 const SkMatrix& viewMatrix, |
| 250 int imageWidth, | 240 int imageWidth, |
| 251 int imageHeight, | 241 int imageHeight, |
| 252 const SkIRect& center, | 242 std::unique_ptr<SkLatticeIter> iter, |
| 253 const SkRect& dst); | 243 const SkRect& dst); |
| 254 | 244 |
| 255 /** | 245 /** |
| 256 * After this returns any pending surface IO will be issued to the backend 3
D API and | 246 * After this returns any pending surface IO will be issued to the backend 3
D API and |
| 257 * if the surface has MSAA it will be resolved. | 247 * if the surface has MSAA it will be resolved. |
| 258 */ | 248 */ |
| 259 void prepareForExternalIO(); | 249 void prepareForExternalIO(); |
| 260 | 250 |
| 261 bool isStencilBufferMultisampled() const { | 251 bool isStencilBufferMultisampled() const { |
| 262 return fRenderTarget->isStencilBufferMultisampled(); | 252 return fRenderTarget->isStencilBufferMultisampled(); |
| 263 } | 253 } |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 | 361 |
| 372 sk_sp<SkColorSpace> fColorSpace; | 362 sk_sp<SkColorSpace> fColorSpace; |
| 373 SkSurfaceProps fSurfaceProps; | 363 SkSurfaceProps fSurfaceProps; |
| 374 GrAuditTrail* fAuditTrail; | 364 GrAuditTrail* fAuditTrail; |
| 375 | 365 |
| 376 // In debug builds we guard against improper thread handling | 366 // In debug builds we guard against improper thread handling |
| 377 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) | 367 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) |
| 378 }; | 368 }; |
| 379 | 369 |
| 380 #endif | 370 #endif |
| OLD | NEW |