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

Unified Diff: src/core/SkSpecialImage.cpp

Issue 1782083002: Switch SkColorFilterImageFilter over to new onFilterImage interface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Handle empty SkBitmaps in makeTextureImage Created 4 years, 9 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 | « include/effects/SkColorFilterImageFilter.h ('k') | src/effects/SkColorFilterImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkSpecialImage.cpp
diff --git a/src/core/SkSpecialImage.cpp b/src/core/SkSpecialImage.cpp
index dfbde75dc7eea30813401f1e45ecde11893d48a8..0a25034af6cf02e7fa1b2ffae7d88df16e809e73 100644
--- a/src/core/SkSpecialImage.cpp
+++ b/src/core/SkSpecialImage.cpp
@@ -67,6 +67,10 @@ sk_sp<SkSpecialImage> SkSpecialImage::makeTextureImage(SkImageFilter::Proxy* pro
return nullptr;
}
+ if (bmp.empty()) {
+ return SkSpecialImage::MakeFromRaster(proxy, SkIRect::MakeEmpty(), bmp);
+ }
+
SkAutoTUnref<GrTexture> resultTex(
GrRefCachedBitmapTexture(context, bmp, GrTextureParams::ClampNoFilter()));
if (!resultTex) {
« no previous file with comments | « include/effects/SkColorFilterImageFilter.h ('k') | src/effects/SkColorFilterImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698