| 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 void drawBatch(const GrClip&, const GrPaint&, GrDrawBatch*); | 266 void drawBatch(const GrClip&, const GrPaint&, GrDrawBatch*); |
| 267 | 267 |
| 268 /** | 268 /** |
| 269 * Draws a path batch. This needs to be separate from drawBatch because we i
nstall path stencil | 269 * Draws a path batch. This needs to be separate from drawBatch because we i
nstall path stencil |
| 270 * settings late. | 270 * settings late. |
| 271 * | 271 * |
| 272 * TODO: Figure out a better model that allows us to roll this method into d
rawBatch. | 272 * TODO: Figure out a better model that allows us to roll this method into d
rawBatch. |
| 273 */ | 273 */ |
| 274 void drawPathBatch(const GrPipelineBuilder&, GrDrawPathBatchBase*); | 274 void drawPathBatch(const GrPipelineBuilder&, GrDrawPathBatchBase*); |
| 275 | 275 |
| 276 const GrSurfaceDesc& desc() const { return fRenderTarget->desc(); } | |
| 277 int width() const { return fRenderTarget->width(); } | 276 int width() const { return fRenderTarget->width(); } |
| 278 int height() const { return fRenderTarget->height(); } | 277 int height() const { return fRenderTarget->height(); } |
| 279 int numColorSamples() const { return fRenderTarget->numColorSamples(); } | 278 int numColorSamples() const { return fRenderTarget->numColorSamples(); } |
| 280 bool isGammaCorrect() const { return fSurfaceProps.isGammaCorrect(); } | 279 bool isGammaCorrect() const { return fSurfaceProps.isGammaCorrect(); } |
| 281 | 280 |
| 282 GrRenderTarget* accessRenderTarget() { return fRenderTarget.get(); } | 281 GrRenderTarget* accessRenderTarget() { return fRenderTarget.get(); } |
| 283 | 282 |
| 284 sk_sp<GrRenderTarget> renderTarget() { return fRenderTarget; } | 283 sk_sp<GrRenderTarget> renderTarget() { return fRenderTarget; } |
| 285 | 284 |
| 286 sk_sp<GrTexture> asTexture() { return sk_ref_sp(fRenderTarget->asTexture());
} | 285 sk_sp<GrTexture> asTexture() { return sk_ref_sp(fRenderTarget->asTexture());
} |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 GrContext* fContext; | 336 GrContext* fContext; |
| 338 | 337 |
| 339 SkSurfaceProps fSurfaceProps; | 338 SkSurfaceProps fSurfaceProps; |
| 340 GrAuditTrail* fAuditTrail; | 339 GrAuditTrail* fAuditTrail; |
| 341 | 340 |
| 342 // In debug builds we guard against improper thread handling | 341 // In debug builds we guard against improper thread handling |
| 343 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) | 342 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) |
| 344 }; | 343 }; |
| 345 | 344 |
| 346 #endif | 345 #endif |
| OLD | NEW |