Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(396)

Unified Diff: src/gpu/GrBlurUtils.cpp

Issue 2296193005: Add a makeDrawContextWithFallback that handles config fallback (Closed)
Patch Set: update Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/GrBlurUtils.cpp
diff --git a/src/gpu/GrBlurUtils.cpp b/src/gpu/GrBlurUtils.cpp
index 2b7540da0abc6d40829aa3ee7890995022527d3e..412deece078cbc679316f32901ff51311768a8d7 100644
--- a/src/gpu/GrBlurUtils.cpp
+++ b/src/gpu/GrBlurUtils.cpp
@@ -104,17 +104,10 @@ static sk_sp<GrTexture> create_mask_GPU(GrContext* context,
sampleCnt = 0;
}
- // We actually only need A8, but it often isn't supported as a
- // render target so default to RGBA_8888
- GrPixelConfig config = kRGBA_8888_GrPixelConfig;
- if (context->caps()->isConfigRenderable(kAlpha_8_GrPixelConfig, sampleCnt > 0)) {
- config = kAlpha_8_GrPixelConfig;
- }
-
sk_sp<GrDrawContext> drawContext(context->makeDrawContext(SkBackingFit::kApprox,
maskRect.width(),
maskRect.height(),
- config,
+ kAlpha_8_GrPixelConfig,
nullptr,
sampleCnt));
if (!drawContext) {

Powered by Google App Engine
This is Rietveld 408576698