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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 * @param batch the batch to draw | 257 * @param batch the batch to draw |
258 */ | 258 */ |
259 void drawBatch(const GrClip&, const GrPaint&, GrDrawBatch*); | 259 void drawBatch(const GrClip&, const GrPaint&, GrDrawBatch*); |
260 | 260 |
261 const GrSurfaceDesc& desc() const { return fRenderTarget->desc(); } | 261 const GrSurfaceDesc& desc() const { return fRenderTarget->desc(); } |
262 int width() const { return fRenderTarget->width(); } | 262 int width() const { return fRenderTarget->width(); } |
263 int height() const { return fRenderTarget->height(); } | 263 int height() const { return fRenderTarget->height(); } |
264 int numColorSamples() const { return fRenderTarget->numColorSamples(); } | 264 int numColorSamples() const { return fRenderTarget->numColorSamples(); } |
265 bool isGammaCorrect() const { return fSurfaceProps.isGammaCorrect(); } | 265 bool isGammaCorrect() const { return fSurfaceProps.isGammaCorrect(); } |
266 | 266 |
| 267 bool wasAbandoned() const; |
| 268 |
267 GrRenderTarget* accessRenderTarget() { return fRenderTarget.get(); } | 269 GrRenderTarget* accessRenderTarget() { return fRenderTarget.get(); } |
268 | 270 |
269 sk_sp<GrRenderTarget> renderTarget() { return fRenderTarget; } | 271 sk_sp<GrRenderTarget> renderTarget() { return fRenderTarget; } |
270 | 272 |
271 sk_sp<GrTexture> asTexture() { return sk_ref_sp(fRenderTarget->asTexture());
} | 273 sk_sp<GrTexture> asTexture() { return sk_ref_sp(fRenderTarget->asTexture());
} |
272 | 274 |
273 // Provides access to functions that aren't part of the public API. | 275 // Provides access to functions that aren't part of the public API. |
274 GrDrawContextPriv drawContextPriv(); | 276 GrDrawContextPriv drawContextPriv(); |
275 const GrDrawContextPriv drawContextPriv() const; | 277 const GrDrawContextPriv drawContextPriv() const; |
276 | 278 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 GrContext* fContext; | 325 GrContext* fContext; |
324 | 326 |
325 SkSurfaceProps fSurfaceProps; | 327 SkSurfaceProps fSurfaceProps; |
326 GrAuditTrail* fAuditTrail; | 328 GrAuditTrail* fAuditTrail; |
327 | 329 |
328 // In debug builds we guard against improper thread handling | 330 // In debug builds we guard against improper thread handling |
329 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) | 331 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) |
330 }; | 332 }; |
331 | 333 |
332 #endif | 334 #endif |
OLD | NEW |