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

Side by Side Diff: src/effects/SkXfermodeImageFilter.cpp

Issue 936943002: Pass clip to context (Closed) Base URL: https://skia.googlesource.com/skia.git@pass_down_rendertarget
Patch Set: feedback inc 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2013 The Android Open Source Project 2 * Copyright 2013 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkXfermodeImageFilter.h" 8 #include "SkXfermodeImageFilter.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkDevice.h" 10 #include "SkDevice.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 foregroundMatrix.preTranslate(SkIntToScalar(backgroundOffset.fX-foregroundOf fset.fX), 165 foregroundMatrix.preTranslate(SkIntToScalar(backgroundOffset.fX-foregroundOf fset.fX),
166 SkIntToScalar(backgroundOffset.fY-foregroundOf fset.fY)); 166 SkIntToScalar(backgroundOffset.fY-foregroundOf fset.fY));
167 167
168 168
169 SkRect srcRect; 169 SkRect srcRect;
170 src.getBounds(&srcRect); 170 src.getBounds(&srcRect);
171 171
172 GrPaint paint; 172 GrPaint paint;
173 paint.addColorTextureProcessor(foregroundTex, foregroundMatrix); 173 paint.addColorTextureProcessor(foregroundTex, foregroundMatrix);
174 paint.addColorProcessor(xferProcessor)->unref(); 174 paint.addColorProcessor(xferProcessor)->unref();
175 context->drawRect(dst->asRenderTarget(), paint, SkMatrix::I(), srcRect); 175 context->drawRect(dst->asRenderTarget(), GrClip::WideOpen(), paint, SkMatrix ::I(), srcRect);
176 176
177 offset->fX = backgroundOffset.fX; 177 offset->fX = backgroundOffset.fX;
178 offset->fY = backgroundOffset.fY; 178 offset->fY = backgroundOffset.fY;
179 WrapTexture(dst, src.width(), src.height(), result); 179 WrapTexture(dst, src.width(), src.height(), result);
180 return true; 180 return true;
181 } 181 }
182 182
183 #endif 183 #endif
184 184
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698