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

Unified Diff: src/image/SkImage_Gpu.cpp

Issue 1404483002: post-commit fixes to applyFilter CL (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Gpu.cpp
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index 529df3abbd7bdbd5c9cd5a54cfc09dedb6ef8e69..f7a73b9e0130ab9257856e0e125ef4b1f2b5fc0f 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -186,7 +186,6 @@ SkImage* SkImage_Gpu::onNewSubset(const SkIRect& subset) const {
///////////////////////////////////////////////////////////////////////////////////////////////////
-#include "SkBitmapDevice.h"
#include "SkGrPixelRef.h"
#include "SkImageFilter.h"
@@ -227,11 +226,8 @@ SkImage* SkImage_Gpu::onApplyFilter(SkImageFilter* filter, SkIPoint* offsetResul
return this->INHERITED::onApplyFilter(filter, offsetResult, forceResultToOriginalSize);
}
- const SkImageInfo info = make_info(this->width(), this->height(), this->isOpaque());
- SkAutoTUnref<SkGrPixelRef> pr(new SkGrPixelRef(info, fTexture));
SkBitmap src;
- src.setInfo(info);
- src.setPixelRef(pr, 0, 0);
+ GrWrapTextureInBitmap(fTexture, this->width(), this->height(), this->isOpaque(), &src);
GrContext* context = fTexture->getContext();
SkGpuImageFilterProxy proxy(context);
@@ -241,7 +237,7 @@ SkImage* SkImage_Gpu::onApplyFilter(SkImageFilter* filter, SkIPoint* offsetResul
SkBitmap dst;
if (filter->filterImageGPU(&proxy, src, ctx, &dst, offsetResult)) {
- return new SkImage_Gpu(dst.width(), dst.height(), kNeedNewImageUniqueID, info.alphaType(),
+ return new SkImage_Gpu(dst.width(), dst.height(), kNeedNewImageUniqueID, dst.alphaType(),
dst.getTexture(), SkSurface::kNo_Budgeted);
}
return nullptr;
« no previous file with comments | « include/core/SkImageFilter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698