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

Unified Diff: src/core/SkImageFilter.cpp

Issue 939623005: Pass Rendertarget into context (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: sampleapp Created 5 years, 10 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 | « samplecode/SampleApp.cpp ('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 34b1b9bc3e88557043c494dd1a80d5068b1132e5..99a1d135486c1da80132906ba099582f2172225d 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -256,7 +256,7 @@ bool SkImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Cont
if (!dst) {
return false;
}
- GrContext::AutoRenderTarget art(context, dst->asRenderTarget());
+
GrContext::AutoClip acs(context, dstRect);
GrFragmentProcessor* fp;
offset->fX = bounds.left();
@@ -268,7 +268,7 @@ bool SkImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Cont
SkASSERT(fp);
GrPaint paint;
paint.addColorProcessor(fp)->unref();
- context->drawNonAARectToRect(paint, SkMatrix::I(), dstRect, srcRect);
+ context->drawNonAARectToRect(dst->asRenderTarget(), paint, SkMatrix::I(), dstRect, srcRect);
WrapTexture(dst, bounds.width(), bounds.height(), result);
return true;
@@ -382,7 +382,7 @@ bool SkImageFilter::getInputResultGPU(SkImageFilter::Proxy* proxy,
// matrix with no clip and that the matrix, clip, and render target set before this function was
// called are restored before we return to the caller.
GrContext* context = src.getTexture()->getContext();
- GrContext::AutoWideOpenIdentityDraw awoid(context, NULL);
+ GrContext::AutoWideOpenIdentityDraw awoid(context);
if (this->canFilterImageGPU()) {
return this->filterImageGPU(proxy, src, ctx, result, offset);
} else {
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | src/core/SkMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698