aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrRenderTarget.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-02-02 06:53:26 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-02 12:19:52 +0000
commit18c52a7b52211de5d0dcd86dc048adef758c6c75 (patch)
tree087aeca9b428687dc7e17578310db1f9621e59ea /include/gpu/GrRenderTarget.h
parent85ae7159c9c8a9186a4c7e74304eabb35bca9a79 (diff)
Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""
This reverts commit d0d7270fcc32546005b8e847df516cb11592cd30. Revert "More sample count cleanup:" This reverts commit d653cac70ed17983125ceed053138c09f1401846. Revert "Add new GrContext queries for imagability, surfacability, and max sample count of color types" This reverts commit 85ae7159c9c8a9186a4c7e74304eabb35bca9a79. Need to understand NVPR perf changes before relanding Change-Id: I0db075fb42438ef2a1f9885df184dce52892ac4b Reviewed-on: https://skia-review.googlesource.com/102780 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include/gpu/GrRenderTarget.h')
-rw-r--r--include/gpu/GrRenderTarget.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/gpu/GrRenderTarget.h b/include/gpu/GrRenderTarget.h
index 9be6e1d8d0..4eee7f63ce 100644
--- a/include/gpu/GrRenderTarget.h
+++ b/include/gpu/GrRenderTarget.h
@@ -33,11 +33,10 @@ public:
const GrRenderTarget* asRenderTarget() const override { return this; }
// GrRenderTarget
- bool isStencilBufferMultisampled() const { return fSampleCnt > 1; }
+ bool isStencilBufferMultisampled() const { return fSampleCnt > 0; }
GrFSAAType fsaaType() const {
- SkASSERT(fSampleCnt >= 1);
- if (fSampleCnt <= 1) {
+ if (!fSampleCnt) {
SkASSERT(!(fFlags & GrRenderTargetFlags::kMixedSampled));
return GrFSAAType::kNone;
}
@@ -54,7 +53,7 @@ public:
* Returns the number of samples/pixel in the color buffer (Zero if non-MSAA or mixed sampled).
*/
int numColorSamples() const {
- return GrFSAAType::kMixedSamples == this->fsaaType() ? 1 : fSampleCnt;
+ return GrFSAAType::kMixedSamples == this->fsaaType() ? 0 : fSampleCnt;
}
/**