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

Unified Diff: src/effects/SkPictureImageFilter.cpp

Issue 725243004: Disable LCD text explicitly in SkPictureImageFilter::onFilterImage() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: comment Created 6 years, 1 month 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/SkDeviceImageFilterProxy.h ('k') | src/gpu/SkGpuDevice.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkPictureImageFilter.cpp
diff --git a/src/effects/SkPictureImageFilter.cpp b/src/effects/SkPictureImageFilter.cpp
index 0c95b328c0f8d44f4d6e7f76b34288effa5767ef..da5597d69905385bb4fc610cd22aa60735b72724 100644
--- a/src/effects/SkPictureImageFilter.cpp
+++ b/src/effects/SkPictureImageFilter.cpp
@@ -9,6 +9,7 @@
#include "SkDevice.h"
#include "SkCanvas.h"
#include "SkReadBuffer.h"
+#include "SkSurfaceProps.h"
#include "SkWriteBuffer.h"
#include "SkValidationUtils.h"
@@ -97,8 +98,10 @@ bool SkPictureImageFilter::onFilterImage(Proxy* proxy, const SkBitmap&, const Co
return false;
}
- SkCanvas canvas(device.get());
- SkPaint paint;
+ // Pass explicit surface props, as the simplified canvas constructor discards device properties.
+ // FIXME: switch back to the public constructor (and unfriend) after
+ // https://code.google.com/p/skia/issues/detail?id=3142 is fixed.
+ SkCanvas canvas(device.get(), proxy->surfaceProps(), SkCanvas::kDefault_InitFlags);
canvas.translate(-SkIntToScalar(bounds.fLeft), -SkIntToScalar(bounds.fTop));
canvas.concat(ctx.ctm());
« no previous file with comments | « src/core/SkDeviceImageFilterProxy.h ('k') | src/gpu/SkGpuDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698