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

Unified Diff: src/core/SkSpecialImage.cpp

Issue 1785643003: Switch SkBlurImageFilter over to new onFilterImage interface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT 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 | « src/core/SkDevice.cpp ('k') | src/effects/SkBlurImageFilter.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..f49f22859ac4fe4138eaf8a40fbf35841b80fd76 100644
--- a/src/core/SkSpecialImage.cpp
+++ b/src/core/SkSpecialImage.cpp
@@ -325,10 +325,15 @@ public:
bool onPeekPixels(SkPixmap* pixmap) const override {
const SkImageInfo info = fBitmap.info();
- if ((kUnknown_SkColorType == info.colorType()) || !fBitmap.getPixels()) {
+
+ if (kUnknown_SkColorType == info.colorType()) {
return false;
}
+ if (!fBitmap.peekPixels(pixmap)) {
+ fBitmap.lockPixels();
+ }
+
return fBitmap.peekPixels(pixmap);
}
« no previous file with comments | « src/core/SkDevice.cpp ('k') | src/effects/SkBlurImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698