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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 725243004: Disable LCD text explicitly in SkPictureImageFilter::onFilterImage() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: surface props plumbing 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/gpu/SkGpuDevice.h ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 34964d53d69eda1f94ce3f4319dda6e2c3b25a80..2c5b625de2395d449182e33768139a02fb9a8789 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1348,12 +1348,12 @@ void SkGpuDevice::internalDrawBitmap(const SkBitmap& bitmap,
fContext->drawRectToRect(grPaint, dstRect, paintRect);
}
-static bool filter_texture(SkBaseDevice* device, GrContext* context,
- GrTexture* texture, const SkImageFilter* filter,
- const SkImageFilter::Context& ctx,
- SkBitmap* result, SkIPoint* offset) {
+bool SkGpuDevice::filterTexture(GrContext* context, GrTexture* texture,
+ const SkImageFilter* filter,
+ const SkImageFilter::Context& ctx,
+ SkBitmap* result, SkIPoint* offset) {
SkASSERT(filter);
reed1 2014/11/20 17:21:44 lets add a comment/bug to somehow get the "real" p
f(malita) 2014/11/20 18:35:21 Done.
- SkDeviceImageFilterProxy proxy(device);
+ SkDeviceImageFilterProxy proxy(this, SkSurfaceProps(0, getLeakyProperties().pixelGeometry()));
if (filter->canFilterImageGPU()) {
// Save the render target and set it to NULL, so we don't accidentally draw to it in the
@@ -1395,8 +1395,8 @@ void SkGpuDevice::drawSprite(const SkDraw& draw, const SkBitmap& bitmap,
// This cache is transient, and is freed (along with all its contained
// textures) when it goes out of scope.
SkImageFilter::Context ctx(matrix, clipBounds, cache);
- if (filter_texture(this, fContext, texture, filter, ctx, &filteredBitmap,
- &offset)) {
+ if (this->filterTexture(fContext, texture, filter, ctx, &filteredBitmap,
+ &offset)) {
texture = (GrTexture*) filteredBitmap.getTexture();
w = filteredBitmap.width();
h = filteredBitmap.height();
@@ -1506,8 +1506,8 @@ void SkGpuDevice::drawDevice(const SkDraw& draw, SkBaseDevice* device,
// textures) when it goes out of scope.
SkAutoTUnref<SkImageFilter::Cache> cache(getImageFilterCache());
SkImageFilter::Context ctx(matrix, clipBounds, cache);
- if (filter_texture(this, fContext, devTex, filter, ctx, &filteredBitmap,
- &offset)) {
+ if (this->filterTexture(fContext, devTex, filter, ctx, &filteredBitmap,
+ &offset)) {
devTex = filteredBitmap.getTexture();
w = filteredBitmap.width();
h = filteredBitmap.height();
@@ -1559,7 +1559,7 @@ bool SkGpuDevice::filterImage(const SkImageFilter* filter, const SkBitmap& src,
// must be pushed upstack.
AutoBitmapTexture abt(fContext, src, NULL, &texture);
- return filter_texture(this, fContext, texture, filter, ctx, result, offset);
+ return this->filterTexture(fContext, texture, filter, ctx, result, offset);
}
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/gpu/SkGpuDevice.h ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698