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 |
11 #include "GrColor.h" | 11 #include "GrColor.h" |
12 #include "GrContext.h" | |
12 #include "GrRenderTarget.h" | 13 #include "GrRenderTarget.h" |
13 #include "SkRefCnt.h" | 14 #include "SkRefCnt.h" |
14 #include "SkRegion.h" | 15 #include "SkRegion.h" |
15 #include "SkSurfaceProps.h" | 16 #include "SkSurfaceProps.h" |
16 #include "../private/GrSingleOwner.h" | 17 #include "../private/GrSingleOwner.h" |
17 | 18 |
18 class GrAtlasTextContext; | 19 class GrAtlasTextContext; |
19 class GrAuditTrail; | 20 class GrAuditTrail; |
20 class GrClip; | 21 class GrClip; |
21 class GrContext; | 22 class GrContext; |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
257 * @param batch the batch to draw | 258 * @param batch the batch to draw |
258 */ | 259 */ |
259 void drawBatch(const GrClip&, const GrPaint&, GrDrawBatch*); | 260 void drawBatch(const GrClip&, const GrPaint&, GrDrawBatch*); |
260 | 261 |
261 bool isStencilBufferMultisampled() const { | 262 bool isStencilBufferMultisampled() const { |
262 return fRenderTarget->isStencilBufferMultisampled(); | 263 return fRenderTarget->isStencilBufferMultisampled(); |
263 } | 264 } |
264 bool isUnifiedMultisampled() const { return fRenderTarget->isUnifiedMultisam pled(); } | 265 bool isUnifiedMultisampled() const { return fRenderTarget->isUnifiedMultisam pled(); } |
265 bool hasMixedSamples() const { return fRenderTarget->hasMixedSamples(); } | 266 bool hasMixedSamples() const { return fRenderTarget->hasMixedSamples(); } |
266 | 267 |
268 const GrCaps* caps() const { return fContext->caps(); } | |
bsalomon
2016/06/07 19:32:09
IIRC, Rob is fairly adamant that we don't expose c
| |
267 const GrSurfaceDesc& desc() const { return fRenderTarget->desc(); } | 269 const GrSurfaceDesc& desc() const { return fRenderTarget->desc(); } |
268 int width() const { return fRenderTarget->width(); } | 270 int width() const { return fRenderTarget->width(); } |
269 int height() const { return fRenderTarget->height(); } | 271 int height() const { return fRenderTarget->height(); } |
270 GrPixelConfig config() const { return fRenderTarget->config(); } | 272 GrPixelConfig config() const { return fRenderTarget->config(); } |
271 int numColorSamples() const { return fRenderTarget->numColorSamples(); } | 273 int numColorSamples() const { return fRenderTarget->numColorSamples(); } |
272 bool isGammaCorrect() const { return fSurfaceProps.isGammaCorrect(); } | 274 bool isGammaCorrect() const { return fSurfaceProps.isGammaCorrect(); } |
273 const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; } | 275 const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; } |
274 | 276 |
275 bool wasAbandoned() const; | 277 bool wasAbandoned() const; |
276 | 278 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
350 GrContext* fContext; | 352 GrContext* fContext; |
351 | 353 |
352 SkSurfaceProps fSurfaceProps; | 354 SkSurfaceProps fSurfaceProps; |
353 GrAuditTrail* fAuditTrail; | 355 GrAuditTrail* fAuditTrail; |
354 | 356 |
355 // In debug builds we guard against improper thread handling | 357 // In debug builds we guard against improper thread handling |
356 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) | 358 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) |
357 }; | 359 }; |
358 | 360 |
359 #endif | 361 #endif |
OLD | NEW |