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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 int width() const { return fRenderTarget->width(); } | 276 int width() const { return fRenderTarget->width(); } |
277 int height() const { return fRenderTarget->height(); } | 277 int height() const { return fRenderTarget->height(); } |
278 int numColorSamples() const { return fRenderTarget->numColorSamples(); } | 278 int numColorSamples() const { return fRenderTarget->numColorSamples(); } |
| 279 bool allowSRGBInputs() const { return fSurfaceProps.allowSRGBInputs(); } |
279 | 280 |
280 GrRenderTarget* accessRenderTarget() { return fRenderTarget; } | 281 GrRenderTarget* accessRenderTarget() { return fRenderTarget; } |
281 | 282 |
282 // Provides access to functions that aren't part of the public API. | 283 // Provides access to functions that aren't part of the public API. |
283 GrDrawContextPriv drawContextPriv(); | 284 GrDrawContextPriv drawContextPriv(); |
284 const GrDrawContextPriv drawContextPriv() const; | 285 const GrDrawContextPriv drawContextPriv() const; |
285 | 286 |
286 protected: | 287 protected: |
287 GrDrawContext(GrContext*, GrDrawingManager*, GrRenderTarget*, | 288 GrDrawContext(GrContext*, GrDrawingManager*, GrRenderTarget*, |
288 const SkSurfaceProps* surfaceProps, GrAuditTrail*, GrSingleOwn
er*); | 289 const SkSurfaceProps* surfaceProps, GrAuditTrail*, GrSingleOwn
er*); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 GrContext* fContext; | 332 GrContext* fContext; |
332 | 333 |
333 SkSurfaceProps fSurfaceProps; | 334 SkSurfaceProps fSurfaceProps; |
334 GrAuditTrail* fAuditTrail; | 335 GrAuditTrail* fAuditTrail; |
335 | 336 |
336 // In debug builds we guard against improper thread handling | 337 // In debug builds we guard against improper thread handling |
337 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) | 338 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) |
338 }; | 339 }; |
339 | 340 |
340 #endif | 341 #endif |
OLD | NEW |