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

Unified Diff: src/core/SkCanvas.cpp

Issue 1128823010: Revert of antialias matrix-image-filter to get smooth diagonals (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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/core/SkImageFilter.h ('k') | src/core/SkDeviceImageFilterProxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 8849aba9151f5475dc1a6cec25cdde8e2370375e..34d6aaa0ab4ddbb9ae5f158a846d77636c326642 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -992,8 +992,6 @@
flags |= kClipToLayer_SaveFlag;
#endif
- SkImageFilter* imgf = paint ? paint->getImageFilter() : NULL;
-
// do this before we create the layer. We don't call the public save() since
// that would invoke a possibly overridden virtual
this->internalSave();
@@ -1001,7 +999,7 @@
fDeviceCMDirty = true;
SkIRect ir;
- if (!this->clipRectBounds(bounds, flags, &ir, imgf)) {
+ if (!this->clipRectBounds(bounds, flags, &ir, paint ? paint->getImageFilter() : NULL)) {
return;
}
@@ -1015,7 +1013,7 @@
SkPixelGeometry geo = fProps.pixelGeometry();
if (paint) {
// TODO: perhaps add a query to filters so we might preserve opaqueness...
- if (imgf || paint->getColorFilter()) {
+ if (paint->getImageFilter() || paint->getColorFilter()) {
isOpaque = false;
geo = kUnknown_SkPixelGeometry;
}
@@ -1031,10 +1029,7 @@
bool forceSpriteOnRestore = false;
{
- SkBaseDevice::TileUsage usage = SkBaseDevice::kNever_TileUsage;
- if (imgf && imgf->mayDrawWithMatrix()) {
- usage = SkBaseDevice::kPossible_TileUsage;
- }
+ const SkBaseDevice::TileUsage usage = SkBaseDevice::kNever_TileUsage;
const SkBaseDevice::CreateInfo createInfo = SkBaseDevice::CreateInfo(info, usage, geo);
SkBaseDevice* newDev = device->onCreateDevice(createInfo, paint);
if (NULL == newDev) {
« no previous file with comments | « include/core/SkImageFilter.h ('k') | src/core/SkDeviceImageFilterProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698