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

Unified Diff: src/effects/SkBlurMaskFilter.cpp

Issue 2316153002: Cherry pick fix for skbug.com/5734 to M54 (Closed)
Patch Set: Cherry pick of fix for skbug.com/5734 to M54 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBlurMaskFilter.cpp
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp
index d2781dbe41d70e1039c88b09f642d1e89c2b84d6..24d6f04c22089deafdd68f0387800cde5d44b783 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -1120,10 +1120,17 @@ static sk_sp<GrTexture> find_or_create_rrect_blur_mask(GrContext* context,
sk_sp<GrTexture> mask(context->textureProvider()->findAndRefTextureByUniqueKey(key));
if (!mask) {
+ GrPixelConfig config;
+ if (context->caps()->isConfigRenderable(kAlpha_8_GrPixelConfig, false)) {
+ config = kAlpha_8_GrPixelConfig;
+ } else {
+ config = kRGBA_8888_GrPixelConfig;
+ }
+
// TODO: this could be approx but the texture coords will need to be updated
sk_sp<GrDrawContext> dc(context->makeDrawContext(SkBackingFit::kExact,
size.fWidth, size.fHeight,
- kAlpha_8_GrPixelConfig, nullptr));
+ config, nullptr));
if (!dc) {
return nullptr;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698