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

Unified Diff: src/effects/SkLightingImageFilter.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 | « src/effects/SkDisplacementMapEffect.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkLightingImageFilter.cpp
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index 703930d6e7639f6ac8fe1ea4dcfec76327ee70ce..55cf4b266a165d1b1ef84e319e1d335f01fec0e8 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -21,6 +21,7 @@
#include "GrFragmentProcessor.h"
#include "GrInvariantOutput.h"
#include "GrPaint.h"
+#include "GrTextureProxy.h"
#include "SkGr.h"
#include "SkGrPriv.h"
#include "effects/GrSingleTextureEffect.h"
@@ -413,8 +414,8 @@ sk_sp<SkSpecialImage> SkLightingImageFilterInternal::filterImageGPU(
sk_sp<GrTexture> inputTexture(input->asTextureRef(context));
SkASSERT(inputTexture);
- sk_sp<GrRenderTargetContext> renderTargetContext(context->makeRenderTargetContext(
- SkBackingFit::kApprox,offsetBounds.width(), offsetBounds.height(),
+ sk_sp<GrRenderTargetContext> renderTargetContext(context->makeDeferredRenderTargetContext(
+ SkBackingFit::kApprox, offsetBounds.width(), offsetBounds.height(),
GrRenderableConfigForColorSpace(outputProperties.colorSpace()),
sk_ref_sp(outputProperties.colorSpace())));
if (!renderTargetContext) {
@@ -458,10 +459,11 @@ sk_sp<SkSpecialImage> SkLightingImageFilterInternal::filterImageGPU(
this->drawRect(renderTargetContext.get(), inputTexture.get(), matrix, clip, bottomRight,
kBottomRight_BoundaryMode, pSrcBounds, offsetBounds);
- return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(offsetBounds.width(), offsetBounds.height()),
- kNeedNewImageUniqueID_SpecialImage,
- renderTargetContext->asTexture(),
- sk_ref_sp(renderTargetContext->getColorSpace()));
+ return SkSpecialImage::MakeDeferredFromGpu(SkIRect::MakeWH(offsetBounds.width(),
+ offsetBounds.height()),
+ kNeedNewImageUniqueID_SpecialImage,
+ renderTargetContext->asDeferredTexture(),
+ sk_ref_sp(renderTargetContext->getColorSpace()));
}
#endif
« no previous file with comments | « src/effects/SkDisplacementMapEffect.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698