Index: src/gpu/GrLayerHoister.cpp |
diff --git a/src/gpu/GrLayerHoister.cpp b/src/gpu/GrLayerHoister.cpp |
index 2c45a7f9e55a008532cc89a26d5cb9c51489bb16..842ab56dfbdd1c84d09206a27f4216043af2963e 100644 |
--- a/src/gpu/GrLayerHoister.cpp |
+++ b/src/gpu/GrLayerHoister.cpp |
@@ -12,7 +12,6 @@ |
#include "SkBigPicture.h" |
#include "SkCanvas.h" |
#include "SkGpuDevice.h" |
-#include "SkGrPixelRef.h" |
#include "SkLayerInfo.h" |
#include "SkRecordDraw.h" |
#include "SkSurface.h" |
@@ -277,15 +276,6 @@ void GrLayerHoister::DrawLayersToAtlas(GrContext* context, |
} |
} |
-SkBitmap wrap_texture(GrTexture* texture) { |
- SkASSERT(texture); |
- |
- SkBitmap result; |
- result.setInfo(texture->surfacePriv().info(kPremul_SkAlphaType)); |
- result.setPixelRef(new SkGrPixelRef(result.info(), texture))->unref(); |
- return result; |
-} |
- |
void GrLayerHoister::FilterLayer(GrContext* context, |
SkGpuDevice* device, |
const GrHoistedLayer& info) { |
@@ -314,7 +304,9 @@ void GrLayerHoister::FilterLayer(GrContext* context, |
SkImageFilter::Context filterContext(totMat, clipBounds, cache); |
SkImageFilter::DeviceProxy proxy(device); |
- const SkBitmap src = wrap_texture(layer->texture()); |
+ SkBitmap src; |
+ GrWrapTextureInBitmap(layer->texture(), layer->texture()->width(), layer->texture()->height(), |
+ false, &src); |
if (!layer->filter()->filterImage(&proxy, src, filterContext, &filteredBitmap, &offset)) { |
// Filtering failed. Press on with the unfiltered version. |