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

Unified Diff: src/image/SkImage_Base.h

Issue 2155063002: use special-image for imagefilters and save/restore layer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 4 years, 5 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
« src/core/SkCanvas.cpp ('K') | « src/gpu/SkGpuDevice.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Base.h
diff --git a/src/image/SkImage_Base.h b/src/image/SkImage_Base.h
index c01d9af63528efb18900ad0fa9a3bd55af3bdda1..fd52a55de1c2fe49a2c1b6d6c105b775c0921985 100644
--- a/src/image/SkImage_Base.h
+++ b/src/image/SkImage_Base.h
@@ -67,6 +67,11 @@ public:
return this->getROPixels(bitmap, kAllow_CachingHint);
}
+ virtual bool canBeImageFiltered() const {
robertphillips 2016/07/18 17:01:58 Make this live ?
reed1 2016/07/18 22:06:07 Done.
+ // bitmap.info().colorType() == kN32_SkColorType && !bitmap.info().gammaCloseToSRGB()
+ return true;
+ }
+
// Call when this image is part of the key to a resourcecache entry. This allows the cache
// to know automatically those entries can be purged when this SkImage deleted.
void notifyAddedToCache() const {
« src/core/SkCanvas.cpp ('K') | « src/gpu/SkGpuDevice.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698