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

Unified Diff: src/core/SkImageFilter.cpp

Issue 1584933002: Refactor to use GrWrapTextureInBitmap more (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix no-gpu build Created 4 years, 11 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') | src/core/SkMaskFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkImageFilter.cpp
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index b068644d556c6fb42a8a9b0ef399bdc1ca8ddafa..489a52bf8751363b7313016f92b5cc25dd7dff82 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -368,7 +368,7 @@ bool SkImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Cont
if (drawContext) {
drawContext->fillRectToRect(clip, paint, SkMatrix::I(), dstRect, srcRect);
- WrapTexture(dst, bounds.width(), bounds.height(), result);
+ GrWrapTextureInBitmap(dst, bounds.width(), bounds.height(), false, result);
return true;
}
}
@@ -502,12 +502,6 @@ SkImageFilter* SkImageFilter::newWithLocalMatrix(const SkMatrix& matrix) const {
#if SK_SUPPORT_GPU
-void SkImageFilter::WrapTexture(GrTexture* texture, int width, int height, SkBitmap* result) {
- SkImageInfo info = SkImageInfo::MakeN32Premul(width, height);
- result->setInfo(info);
- result->setPixelRef(new SkGrPixelRef(info, texture))->unref();
-}
-
bool SkImageFilter::filterInputGPU(int index, SkImageFilter::Proxy* proxy,
const SkBitmap& src, const Context& ctx,
SkBitmap* result, SkIPoint* offset) const {
« no previous file with comments | « include/core/SkImageFilter.h ('k') | src/core/SkMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698