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

Unified Diff: src/core/SkBlurImageFilter.cpp

Issue 2514543002: Defer more renderTargetContexts in the GPU image filter paths - take 2 (Closed)
Patch Set: Add more bullet proofing Created 4 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 | « include/gpu/GrContext.h ('k') | src/core/SkGpuBlurUtils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBlurImageFilter.cpp
diff --git a/src/core/SkBlurImageFilter.cpp b/src/core/SkBlurImageFilter.cpp
index 7590fdcc578e0fdc02712f4257844c99181a3c0a..7d51a364d51025c0de59b088ac5b26ba893b3b61 100644
--- a/src/core/SkBlurImageFilter.cpp
+++ b/src/core/SkBlurImageFilter.cpp
@@ -15,6 +15,7 @@
#if SK_SUPPORT_GPU
#include "GrContext.h"
+#include "GrTextureProxy.h"
#include "SkGr.h"
#endif
@@ -110,8 +111,8 @@ static void get_box3_params(SkScalar s, int *kernelSize, int* kernelSize3, int *
}
sk_sp<SkSpecialImage> SkBlurImageFilterImpl::onFilterImage(SkSpecialImage* source,
- const Context& ctx,
- SkIPoint* offset) const {
+ const Context& ctx,
+ SkIPoint* offset) const {
SkIPoint inputOffset = SkIPoint::Make(0, 0);
sk_sp<SkSpecialImage> input(this->filterInput(0, source, ctx, &inputOffset));
@@ -167,9 +168,11 @@ sk_sp<SkSpecialImage> SkBlurImageFilterImpl::onFilterImage(SkSpecialImage* sourc
}
// TODO: Get the colorSpace from the renderTargetContext (once it has one)
- return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(dstBounds.width(), dstBounds.height()),
+ return SkSpecialImage::MakeDeferredFromGpu(
+ context,
+ SkIRect::MakeWH(dstBounds.width(), dstBounds.height()),
kNeedNewImageUniqueID_SpecialImage,
- renderTargetContext->asTexture(),
+ sk_ref_sp(renderTargetContext->asDeferredTexture()),
sk_ref_sp(input->getColorSpace()), &source->props());
}
#endif
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/core/SkGpuBlurUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698