Chromium Code Reviews| Index: include/gpu/GrCaps.h |
| diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h |
| index 05da8d7cadf40d5af5eafa185b03ad761c8b7029..809a6c576e54d231718d50d566db5a4ee53d9b1c 100644 |
| --- a/include/gpu/GrCaps.h |
| +++ b/include/gpu/GrCaps.h |
| @@ -143,6 +143,9 @@ public: |
| bool oversizedStencilSupport() const { return fOversizedStencilSupport; } |
| bool textureBarrierSupport() const { return fTextureBarrierSupport; } |
| bool usesMixedSamples() const { return fUsesMixedSamples; } |
| + /** "Raster multisample" is a special HW mode where the rasterizer runs more samples than are in |
| + the target framebuffer. */ |
| + bool rasterMultisampleSupport() const { return fRasterMultisampleSupport; } |
| bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; } |
| bool useDrawInsteadOfPartialRenderTargetWrite() const { |
| @@ -220,7 +223,11 @@ public: |
| return SkTMin(this->maxColorSampleCount(), this->maxStencilSampleCount()); |
| } |
| } |
| - |
| + // This can only be called if raster multisample is supported. |
| + int maxRasterSamples() const { |
|
bsalomon
2016/02/04 21:30:01
Maybe this could be simplified and just return 0 i
|
| + SkASSERT(this->rasterMultisampleSupport()); |
| + return fMaxRasterSamples; |
| + } |
| virtual bool isConfigTexturable(GrPixelConfig config) const = 0; |
| virtual bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const = 0; |
| @@ -268,6 +275,7 @@ protected: |
| bool fOversizedStencilSupport : 1; |
| bool fTextureBarrierSupport : 1; |
| bool fUsesMixedSamples : 1; |
| + bool fRasterMultisampleSupport : 1; |
| bool fSupportsInstancedDraws : 1; |
| bool fFullClearIsFree : 1; |
| bool fMustClearUploadedBufferData : 1; |
| @@ -291,6 +299,7 @@ protected: |
| int fMaxTileSize; |
| int fMaxColorSampleCount; |
| int fMaxStencilSampleCount; |
| + int fMaxRasterSamples; |
| private: |
| virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; |