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

Unified Diff: src/core/SkCanvas.cpp

Issue 1002603003: disable LCD for layers w/ filters (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update gm Created 5 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
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 11dc739f4c4dc6aa0509f8ba404a56fa246817e4..8426f090ec5949653ab516ffca3f7d33a317c338 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -918,10 +918,12 @@ void SkCanvas::internalSaveLayer(const SkRect* bounds, const SkPaint* paint, Sav
}
bool isOpaque = !SkToBool(flags & kHasAlphaLayer_SaveFlag);
- if (isOpaque && paint) {
+ SkPixelGeometry geo = fProps.pixelGeometry();
+ if (paint) {
// TODO: perhaps add a query to filters so we might preserve opaqueness...
if (paint->getImageFilter() || paint->getColorFilter()) {
isOpaque = false;
+ geo = kUnknown_SkPixelGeometry;
}
}
SkImageInfo info = SkImageInfo::MakeN32(ir.width(), ir.height(),
@@ -942,8 +944,7 @@ void SkCanvas::internalSaveLayer(const SkRect* bounds, const SkPaint* paint, Sav
usage = SkBaseDevice::kPossible_TileUsage;
}
#endif
- device = device->onCreateDevice(SkBaseDevice::CreateInfo(info, usage, fProps.pixelGeometry()),
- paint);
+ device = device->onCreateDevice(SkBaseDevice::CreateInfo(info, usage, geo), paint);
if (NULL == device) {
SkErrorInternals::SetError( kInternalError_SkError,
"Unable to create device for layer.");
« gm/imagefiltersbase.cpp ('K') | « gm/imagefiltersbase.cpp ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698