diff options
author | 2018-02-03 00:25:12 +0000 | |
---|---|---|
committer | 2018-02-03 00:25:20 +0000 | |
commit | 3a2cc2c2ec124de36d2544b2a523ef1dd317ca32 (patch) | |
tree | df3154eabde3275c5a6b88f66233b9a3984bd04f /include/gpu/GrCaps.h | |
parent | 5bb82cbecd740d21b92e8d2944280ab6eb6af7a6 (diff) |
Revert "Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""""
This reverts commit 5bb82cbecd740d21b92e8d2944280ab6eb6af7a6.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend.""""
>
> This reverts commit 18c52a7b52211de5d0dcd86dc048adef758c6c75.
>
> Also relands "More sample count cleanup:" and "Add new GrContext queries for imagability, surfacability, and max sample count of color types"
>
>
> Bug: skia:
> Change-Id: I4028105a3a1f16ce3944e134619eb6245af6b947
> Reviewed-on: https://skia-review.googlesource.com/102940
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=egdaniel@google.com,bsalomon@google.com
Change-Id: Idee23be2f1719f0bdc9305043e95a2d589bee8d1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/103220
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include/gpu/GrCaps.h')
-rw-r--r-- | include/gpu/GrCaps.h | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h index 0f03f162f0..f4d6e06280 100644 --- a/include/gpu/GrCaps.h +++ b/include/gpu/GrCaps.h @@ -134,6 +134,10 @@ public: int maxRasterSamples() const { return fMaxRasterSamples; } + // Find a sample count greater than or equal to the requested count which is supported for a + // color buffer of the given config. If MSAA is not support for the config we will return 0. + virtual int getSampleCount(int requestedCount, GrPixelConfig config) const = 0; + int maxWindowRectangles() const { return fMaxWindowRectangles; } // A tuned, platform-specific value for the maximum number of analytic fragment processors we @@ -141,32 +145,9 @@ public: int maxClipAnalyticFPs() const { return fMaxClipAnalyticFPs; } virtual bool isConfigTexturable(GrPixelConfig) const = 0; - + virtual bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const = 0; // Returns whether a texture of the given config can be copied to a texture of the same config. - virtual bool isConfigCopyable(GrPixelConfig) const = 0; - - // Returns the maximum supported sample count for a config. 0 means the config is not renderable - // 1 means the config is renderable but doesn't support MSAA. - virtual int maxRenderTargetSampleCount(GrPixelConfig) const = 0; - - bool isConfigRenderable(GrPixelConfig config) const { - return this->maxRenderTargetSampleCount(config) > 0; - } - - // TODO: Remove this after Flutter updated to no longer use it. - bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const { - return this->maxRenderTargetSampleCount(config) > (withMSAA ? 1 : 0); - } - - // Find a sample count greater than or equal to the requested count which is supported for a - // color buffer of the given config or 0 if no such sample count is supported. If the requested - // sample count is 1 then 1 will be returned if non-MSAA rendering is supported, otherwise 0. - // For historical reasons requestedCount==0 is handled identically to requestedCount==1. - virtual int getRenderTargetSampleCount(int requestedCount, GrPixelConfig) const = 0; - // TODO: Remove. Legacy name used by Chrome. - int getSampleCount(int requestedCount, GrPixelConfig config) const { - return this->getRenderTargetSampleCount(requestedCount, config); - } + virtual bool isConfigCopyable(GrPixelConfig config) const = 0; bool suppressPrints() const { return fSuppressPrints; } @@ -197,8 +178,6 @@ public: virtual bool initDescForDstCopy(const GrRenderTargetProxy* src, GrSurfaceDesc* desc, bool* rectsMustMatch, bool* disallowSubrect) const = 0; - bool validateSurfaceDesc(const GrSurfaceDesc&, GrMipMapped) const; - /** * Returns true if the GrBackendTexutre can we used with the supplied SkColorType. If it is * compatible, the passed in GrPixelConfig will be set to a config that matches the backend |