aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrRenderTarget.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/gpu/GrRenderTarget.h')
-rw-r--r--include/gpu/GrRenderTarget.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/include/gpu/GrRenderTarget.h b/include/gpu/GrRenderTarget.h
index 05d1239f84..fdf6f9cddc 100644
--- a/include/gpu/GrRenderTarget.h
+++ b/include/gpu/GrRenderTarget.h
@@ -32,16 +32,14 @@ public:
// GrRenderTarget
bool isStencilBufferMultisampled() const { return fDesc.fSampleCnt > 0; }
- /**
- * For our purposes, "Mixed Sampled" means the stencil buffer is multisampled but the color
- * buffer is not.
- */
- bool isMixedSampled() const { return fFlags & Flags::kMixedSampled; }
-
- /**
- * "Unified Sampled" means the stencil and color buffers are both multisampled.
- */
- bool isUnifiedMultisampled() const { return fDesc.fSampleCnt > 0 && !this->isMixedSampled(); }
+ GrFSAAType fsaaType() const {
+ if (!fDesc.fSampleCnt) {
+ SkASSERT(!(fFlags & Flags::kMixedSampled));
+ return GrFSAAType::kNone;
+ }
+ return (fFlags & Flags::kMixedSampled) ? GrFSAAType::kMixedSamples
+ : GrFSAAType::kUnifiedMSAA;
+ }
/**
* Returns the number of samples/pixel in the stencil buffer (Zero if non-MSAA).
@@ -51,7 +49,9 @@ public:
/**
* Returns the number of samples/pixel in the color buffer (Zero if non-MSAA or mixed sampled).
*/
- int numColorSamples() const { return this->isMixedSampled() ? 0 : fDesc.fSampleCnt; }
+ int numColorSamples() const {
+ return GrFSAAType::kMixedSamples == this->fsaaType() ? 0 : fDesc.fSampleCnt;
+ }
/**
* Call to indicate the multisample contents were modified such that the