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

Unified Diff: src/core/SkBlurImageFilter.cpp

Issue 2215323003: Start using RenderTargetProxy (omnibus) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update 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/private/GrTextureProxy.h ('k') | src/core/SkGpuBlurUtils.h » ('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 d531b443934ddbdfe3a218e2b84510f3e4058653..13d6038bb680f5c85db4a9bdc8ab8e9a72311ab2 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));
@@ -135,7 +136,7 @@ sk_sp<SkSpecialImage> SkBlurImageFilterImpl::onFilterImage(SkSpecialImage* sourc
#if SK_SUPPORT_GPU
if (source->isTextureBacked()) {
GrContext* context = source->getContext();
- sk_sp<GrTexture> inputTexture(input->asTextureRef(context));
+ sk_sp<GrTextureProxy> inputTexture(input->asTextureProxy(context));
SkASSERT(inputTexture);
if (0 == sigma.x() && 0 == sigma.y()) {
@@ -165,10 +166,12 @@ 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()),
- kNeedNewImageUniqueID_SpecialImage,
- renderTargetContext->asTexture(),
- sk_ref_sp(input->getColorSpace()), &source->props());
+ return SkSpecialImage::MakeDeferredFromGpu(SkIRect::MakeWH(dstBounds.width(),
+ dstBounds.height()),
+ kNeedNewImageUniqueID_SpecialImage,
+ renderTargetContext->asDeferredTexture(),
+ sk_ref_sp(input->getColorSpace()),
+ &source->props());
}
#endif
« no previous file with comments | « include/private/GrTextureProxy.h ('k') | src/core/SkGpuBlurUtils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698