diff options
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rw-r--r-- | src/gpu/GrContext.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index 0d481ac6ef..05908f4889 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -420,6 +420,18 @@ size_t GrContext::getResourceCachePurgeableBytes() const { //////////////////////////////////////////////////////////////////////////////// +bool GrContext::colorTypeSupportedAsImage(SkColorType colorType) const { + GrPixelConfig config = SkImageInfo2GrPixelConfig(colorType, nullptr, *this->caps()); + return this->caps()->isConfigTexturable(config); +} + +int GrContext::maxSurfaceSampleCountForColorType(SkColorType colorType) const { + GrPixelConfig config = SkImageInfo2GrPixelConfig(colorType, nullptr, *this->caps()); + return this->caps()->maxRenderTargetSampleCount(config); +} + +//////////////////////////////////////////////////////////////////////////////// + void GrContext::TextBlobCacheOverBudgetCB(void* data) { SkASSERT(data); // TextBlobs are drawn at the SkGpuDevice level, therefore they cannot rely on |