diff options
Diffstat (limited to 'src/image/SkSurface_Gpu.cpp')
-rw-r--r-- | src/image/SkSurface_Gpu.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp index e811c3a72f..8d81665511 100644 --- a/src/image/SkSurface_Gpu.cpp +++ b/src/image/SkSurface_Gpu.cpp @@ -334,11 +334,7 @@ bool validate_backend_texture(GrContext* ctx, const GrBackendTexture& tex, GrPix return false; } - if (!ctx->caps()->isConfigRenderable(*config, sampleCnt > 1)) { - return false; - } - - if (ctx->caps()->getSampleCount(sampleCnt, *config) != sampleCnt) { + if (ctx->caps()->getRenderTargetSampleCount(sampleCnt, *config) != sampleCnt) { return false; } @@ -411,7 +407,11 @@ bool validate_backend_render_target(GrContext* ctx, const GrBackendRenderTarget& return false; } - if (!ctx->caps()->isConfigRenderable(*config, false)) { + if (rt.sampleCnt() > 1) { + if (ctx->caps()->maxRenderTargetSampleCount(*config) <= 1) { + return false; + } + } else if (ctx->caps()->isConfigRenderable(*config)) { return false; } |