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

Unified Diff: src/gpu/GrClipStackClip.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/GrClipStackClip.cpp
diff --git a/src/gpu/GrClipStackClip.cpp b/src/gpu/GrClipStackClip.cpp
index 003b4a5d439bb63782dd1370ea6bc7a0f94b4172..6103fd4532ce3b000adc88cabe8ccf6d62c8aac0 100644
--- a/src/gpu/GrClipStackClip.cpp
+++ b/src/gpu/GrClipStackClip.cpp
@@ -413,16 +413,10 @@ sk_sp<GrTexture> GrClipStackClip::CreateAlphaClipMask(GrContext* context,
return sk_sp<GrTexture>(texture);
}
- // There's no texture in the cache. Let's try to allocate it then.
- GrPixelConfig config = kRGBA_8888_GrPixelConfig;
- if (context->caps()->isConfigRenderable(kAlpha_8_GrPixelConfig, false)) {
- config = kAlpha_8_GrPixelConfig;
- }
-
sk_sp<GrDrawContext> dc(context->makeDrawContext(SkBackingFit::kApprox,
reducedClip.width(),
reducedClip.height(),
- config, nullptr));
+ kAlpha_8_GrPixelConfig, nullptr));
if (!dc) {
return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698