aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLCaps.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/gl/GrGLCaps.cpp')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 93a7e614fd..066bf03512 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -2046,7 +2046,7 @@ bool GrGLCaps::initDescForDstCopy(const GrRenderTargetProxy* src, GrSurfaceDesc*
// If the src is a texture, we can implement the blit as a draw assuming the config is
// renderable.
- if (src->asTextureProxy() && this->isConfigRenderable(src->config(), false)) {
+ if (src->asTextureProxy() && !this->isConfigRenderable(src->config())) {
desc->fOrigin = kBottomLeft_GrSurfaceOrigin;
desc->fFlags = kRenderTarget_GrSurfaceFlag;
desc->fConfig = src->config();
@@ -2468,10 +2468,10 @@ void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {
}
}
-int GrGLCaps::getSampleCount(int requestedCount, GrPixelConfig config) const {
+int GrGLCaps::getRenderTargetSampleCount(int requestedCount, GrPixelConfig config) const {
requestedCount = SkTMax(1, requestedCount);
int count = fConfigTable[config].fColorSampleCounts.count();
- if (!count || !this->isConfigRenderable(config, requestedCount > 1)) {
+ if (!count) {
return 0;
}
@@ -2487,6 +2487,14 @@ int GrGLCaps::getSampleCount(int requestedCount, GrPixelConfig config) const {
return 0;
}
+int GrGLCaps::maxRenderTargetSampleCount(GrPixelConfig config) const {
+ const auto& table = fConfigTable[config].fColorSampleCounts;
+ if (!table.count()) {
+ return 0;
+ }
+ return table[table.count() - 1];
+}
+
bool validate_sized_format(GrGLenum format, SkColorType ct, GrPixelConfig* config,
GrGLStandard standard) {
*config = kUnknown_GrPixelConfig;