diff options
author | Brian Salomon <bsalomon@google.com> | 2018-02-02 06:53:26 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-02 12:19:52 +0000 |
commit | 18c52a7b52211de5d0dcd86dc048adef758c6c75 (patch) | |
tree | 087aeca9b428687dc7e17578310db1f9621e59ea /src/gpu/mtl/GrMtlCaps.h | |
parent | 85ae7159c9c8a9186a4c7e74304eabb35bca9a79 (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 'src/gpu/mtl/GrMtlCaps.h')
-rw-r--r-- | src/gpu/mtl/GrMtlCaps.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gpu/mtl/GrMtlCaps.h b/src/gpu/mtl/GrMtlCaps.h index 935cb07822..6204eaac5a 100644 --- a/src/gpu/mtl/GrMtlCaps.h +++ b/src/gpu/mtl/GrMtlCaps.h @@ -24,12 +24,20 @@ public: GrMtlCaps(const GrContextOptions& contextOptions, id<MTLDevice> device, MTLFeatureSet featureSet); + int getSampleCount(int requestedCount, GrPixelConfig config) const override; + bool isConfigTexturable(GrPixelConfig config) const override { return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kTextureable_Flag); } - int getRenderTargetSampleCount(int requestedCount, GrPixelConfig) const override; - int maxRenderTargetSampleCount(GrPixelConfig) const override; + bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const override { + if (withMSAA) { + return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kRenderable_Flag) && + SkToBool(fConfigTable[config].fFlags & ConfigInfo::kMSAA_Flag); + } else { + return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kRenderable_Flag); + } + } bool isConfigCopyable(GrPixelConfig config) const override { return true; |