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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 1831603002: Revert of Switch SkBlurImageFilter over to new onFilterImage interface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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
« no previous file with comments | « 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/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 6fa56da6868398ed0422bea8d0df63f63aa57e84..823e9b84ff88de04b09e82417477f4d9e044be76 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -221,38 +221,6 @@
return texture->asRenderTarget();
}
-// This method ensures that we always have a texture-backed "bitmap" when we finally
-// call through to the base impl so that the image filtering code will take the
-// gpu-specific paths. This mirrors SkCanvas::internalDrawDevice (the other
-// use of SkImageFilter::filterImage) in that the source and dest will have
-// homogenous backing (e.g., raster or gpu).
-void SkGpuDevice::drawBitmapAsSpriteWithImageFilter(const SkDraw& draw, const SkBitmap& bitmap,
- int x, int y, const SkPaint& paint) {
- if (bitmap.getTexture()) {
- INHERITED::drawBitmapAsSpriteWithImageFilter(draw, bitmap, x, y, paint);
- return;
- }
-
- SkAutoLockPixels alp(bitmap, !bitmap.getTexture());
- if (!bitmap.getTexture() && !bitmap.readyToDraw()) {
- return;
- }
-
- GrTexture* texture;
- // draw sprite neither filters nor tiles.
- AutoBitmapTexture abt(fContext, bitmap, GrTextureParams::ClampNoFilter(), &texture);
- if (!texture) {
- return;
- }
-
- SkBitmap newBitmap;
-
- GrWrapTextureInBitmap(texture, texture->width(), texture->height(),
- bitmap.isOpaque(), &newBitmap);
-
- INHERITED::drawBitmapAsSpriteWithImageFilter(draw, newBitmap, x, y, paint);
-}
-
///////////////////////////////////////////////////////////////////////////////
bool SkGpuDevice::onReadPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
« no previous file with comments | « src/gpu/SkGpuDevice.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698