diff options
author | Robert Phillips <robertphillips@google.com> | 2018-02-13 17:03:00 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-14 12:42:18 +0000 |
commit | fc711a2b0143aa4f559ef041068af1c04d7dab85 (patch) | |
tree | 3cd87b121b87566b9837112badccd5aa958f75f5 /include/gpu/GrCaps.h | |
parent | 6ce969472e2ede1e3d6549579c095a12c2d576ca (diff) |
Add SkCharacterization creation helper to GrContextThreadSafeProxy (take 2)
TBR=bsalomon@google.com
Change-Id: Id96d4fdbb6889065f10a4a7e0c22a03ad9aa5fef
Reviewed-on: https://skia-review.googlesource.com/107000
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include/gpu/GrCaps.h')
-rw-r--r-- | include/gpu/GrCaps.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h index 0f03f162f0..1b81b18fcb 100644 --- a/include/gpu/GrCaps.h +++ b/include/gpu/GrCaps.h @@ -15,6 +15,7 @@ #include "SkRefCnt.h" #include "SkString.h" +class GrBackendFormat; class GrBackendRenderTarget; class GrBackendTexture; struct GrContextOptions; @@ -200,7 +201,7 @@ public: bool validateSurfaceDesc(const GrSurfaceDesc&, GrMipMapped) const; /** - * Returns true if the GrBackendTexutre can we used with the supplied SkColorType. If it is + * Returns true if the GrBackendTexture can be used with the supplied SkColorType. If it is * compatible, the passed in GrPixelConfig will be set to a config that matches the backend * format and requested SkColorType. */ @@ -209,6 +210,12 @@ public: virtual bool validateBackendRenderTarget(const GrBackendRenderTarget&, SkColorType, GrPixelConfig*) const = 0; + // TODO: replace validateBackendTexture and validateBackendRenderTarget with calls to + // getConfigFromBackendFormat? + // TODO: it seems like we could pass the full SkImageInfo and validate its colorSpace too + virtual bool getConfigFromBackendFormat(const GrBackendFormat& format, SkColorType ct, + GrPixelConfig*) const = 0; + protected: /** Subclasses must call this at the end of their constructors in order to apply caps overrides requested by the client. Note that overrides will only reduce the caps never |