diff options
author | Brian Salomon <bsalomon@google.com> | 2018-04-05 12:46:09 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-05 17:21:32 +0000 |
commit | f932a6328a3985495e3377f34a542b22be1e1ced (patch) | |
tree | 267153be2317129a3ef755882cd45e265eb82b3b /src/gpu/GrContext.cpp | |
parent | c659c2c30d2a33392f62bb9a27ff04a07d216976 (diff) |
Add maxTextureSize()/maxRenderTargetSize() to GrContext
This provides an alternative way to access these values which will allow removal GrContext::caps() from public API
Change-Id: I53d3c00563da8847e1fc14aea9750dc9fd90d1e5
Reviewed-on: https://skia-review.googlesource.com/118962
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rw-r--r-- | src/gpu/GrContext.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index f401f86a56..613a05b22e 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -308,6 +308,10 @@ size_t GrContext::getResourceCachePurgeableBytes() const { //////////////////////////////////////////////////////////////////////////////// +int GrContext::maxTextureSize() const { return this->caps()->maxTextureSize(); } + +int GrContext::maxRenderTargetSize() const { return this->caps()->maxRenderTargetSize(); } + bool GrContext::colorTypeSupportedAsImage(SkColorType colorType) const { GrPixelConfig config = SkImageInfo2GrPixelConfig(colorType, nullptr, *this->caps()); return this->caps()->isConfigTexturable(config); |