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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 const SkRect& dst); | 251 const SkRect& dst); |
252 | 252 |
253 /** | 253 /** |
254 * Draws a batch | 254 * Draws a batch |
255 * | 255 * |
256 * @param paint describes how to color pixels. | 256 * @param paint describes how to color pixels. |
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 bool hasMixedSamples() const { return fRenderTarget->hasMixedSamples(); } |
| 262 |
261 const GrSurfaceDesc& desc() const { return fRenderTarget->desc(); } | 263 const GrSurfaceDesc& desc() const { return fRenderTarget->desc(); } |
262 int width() const { return fRenderTarget->width(); } | 264 int width() const { return fRenderTarget->width(); } |
263 int height() const { return fRenderTarget->height(); } | 265 int height() const { return fRenderTarget->height(); } |
264 GrPixelConfig config() const { return fRenderTarget->config(); } | 266 GrPixelConfig config() const { return fRenderTarget->config(); } |
265 bool isUnifiedMultisampled() const { return fRenderTarget->isUnifiedMultisam
pled(); } | 267 bool isUnifiedMultisampled() const { return fRenderTarget->isUnifiedMultisam
pled(); } |
266 int numColorSamples() const { return fRenderTarget->numColorSamples(); } | 268 int numColorSamples() const { return fRenderTarget->numColorSamples(); } |
267 bool isGammaCorrect() const { return fSurfaceProps.isGammaCorrect(); } | 269 bool isGammaCorrect() const { return fSurfaceProps.isGammaCorrect(); } |
268 const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; } | 270 const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; } |
269 | 271 |
270 bool wasAbandoned() const; | 272 bool wasAbandoned() const; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 GrContext* fContext; | 329 GrContext* fContext; |
328 | 330 |
329 SkSurfaceProps fSurfaceProps; | 331 SkSurfaceProps fSurfaceProps; |
330 GrAuditTrail* fAuditTrail; | 332 GrAuditTrail* fAuditTrail; |
331 | 333 |
332 // In debug builds we guard against improper thread handling | 334 // In debug builds we guard against improper thread handling |
333 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) | 335 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) |
334 }; | 336 }; |
335 | 337 |
336 #endif | 338 #endif |
OLD | NEW |