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

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

Issue 1404823005: GrDrawContext now holds GrRenderTarget pointer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix overlength line Created 5 years, 2 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
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | src/gpu/GrBlurUtils.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 GrTextureDomain::MakeTexelDomain(foregroundTex, foreground.bounds()), 190 GrTextureDomain::MakeTexelDomain(foregroundTex, foreground.bounds()),
191 GrTextureDomain::kDecal_Mode, 191 GrTextureDomain::kDecal_Mode,
192 GrTextureParams::kNone_FilterMode) 192 GrTextureParams::kNone_FilterMode)
193 ); 193 );
194 194
195 paint.addColorFragmentProcessor(foregroundDomain.get()); 195 paint.addColorFragmentProcessor(foregroundDomain.get());
196 if (xferFP) { 196 if (xferFP) {
197 paint.addColorFragmentProcessor(xferFP)->unref(); 197 paint.addColorFragmentProcessor(xferFP)->unref();
198 } 198 }
199 199
200 SkAutoTUnref<GrDrawContext> drawContext(context->drawContext()); 200 SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(dst->asRenderTa rget()));
201 if (!drawContext) { 201 if (!drawContext) {
202 return false; 202 return false;
203 } 203 }
204 204
205 drawContext->drawRect(dst->asRenderTarget(), GrClip::WideOpen(), paint, 205 drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), srcRect);
206 SkMatrix::I(), srcRect);
207 206
208 offset->fX = backgroundOffset.fX; 207 offset->fX = backgroundOffset.fX;
209 offset->fY = backgroundOffset.fY; 208 offset->fY = backgroundOffset.fY;
210 WrapTexture(dst, src.width(), src.height(), result); 209 WrapTexture(dst, src.width(), src.height(), result);
211 return true; 210 return true;
212 } 211 }
213 212
214 #endif 213 #endif
215 214
OLDNEW
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | src/gpu/GrBlurUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698