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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 * - The sides (along the shrink axis) and center are not drawn | 246 * - The sides (along the shrink axis) and center are not drawn |
247 */ | 247 */ |
248 void drawImageNine(const GrClip&, | 248 void drawImageNine(const GrClip&, |
249 const GrPaint& paint, | 249 const GrPaint& paint, |
250 const SkMatrix& viewMatrix, | 250 const SkMatrix& viewMatrix, |
251 int imageWidth, | 251 int imageWidth, |
252 int imageHeight, | 252 int imageHeight, |
253 const SkIRect& center, | 253 const SkIRect& center, |
254 const SkRect& dst); | 254 const SkRect& dst); |
255 | 255 |
| 256 /** |
| 257 * After this returns any pending surface IO will be issued to the backend 3
D API and |
| 258 * if the surface has MSAA it will be resolved. |
| 259 */ |
| 260 void prepareForExternalIO(); |
| 261 |
256 bool isStencilBufferMultisampled() const { | 262 bool isStencilBufferMultisampled() const { |
257 return fRenderTarget->isStencilBufferMultisampled(); | 263 return fRenderTarget->isStencilBufferMultisampled(); |
258 } | 264 } |
259 bool isUnifiedMultisampled() const { return fRenderTarget->isUnifiedMultisam
pled(); } | 265 bool isUnifiedMultisampled() const { return fRenderTarget->isUnifiedMultisam
pled(); } |
260 bool hasMixedSamples() const { return fRenderTarget->hasMixedSamples(); } | 266 bool hasMixedSamples() const { return fRenderTarget->hasMixedSamples(); } |
261 | 267 |
262 bool mustUseHWAA(const GrPaint& paint) const { | 268 bool mustUseHWAA(const GrPaint& paint) const { |
263 return paint.isAntiAlias() && fRenderTarget->isUnifiedMultisampled(); | 269 return paint.isAntiAlias() && fRenderTarget->isUnifiedMultisampled(); |
264 } | 270 } |
265 | 271 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 | 372 |
367 sk_sp<SkColorSpace> fColorSpace; | 373 sk_sp<SkColorSpace> fColorSpace; |
368 SkSurfaceProps fSurfaceProps; | 374 SkSurfaceProps fSurfaceProps; |
369 GrAuditTrail* fAuditTrail; | 375 GrAuditTrail* fAuditTrail; |
370 | 376 |
371 // In debug builds we guard against improper thread handling | 377 // In debug builds we guard against improper thread handling |
372 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) | 378 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) |
373 }; | 379 }; |
374 | 380 |
375 #endif | 381 #endif |
OLD | NEW |