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

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

Issue 1471053002: Don't create a GXPFactory when blend is SrcOver (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix compile Created 5 years 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/SkPerlinNoiseShader.cpp ('k') | src/gpu/GrContext.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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 foregroundTex, foregroundMatrix, 184 foregroundTex, foregroundMatrix,
185 GrTextureDomain::MakeTexelDomain(foregroundTex, foreground.bounds()), 185 GrTextureDomain::MakeTexelDomain(foregroundTex, foreground.bounds()),
186 GrTextureDomain::kDecal_Mode, 186 GrTextureDomain::kDecal_Mode,
187 GrTextureParams::kNone_FilterMode) 187 GrTextureParams::kNone_FilterMode)
188 ); 188 );
189 189
190 paint.addColorFragmentProcessor(foregroundDomain.get()); 190 paint.addColorFragmentProcessor(foregroundDomain.get());
191 if (xferFP) { 191 if (xferFP) {
192 paint.addColorFragmentProcessor(xferFP)->unref(); 192 paint.addColorFragmentProcessor(xferFP)->unref();
193 } 193 }
194 paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode);
194 195
195 SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(dst->asRenderTa rget())); 196 SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(dst->asRenderTa rget()));
196 if (!drawContext) { 197 if (!drawContext) {
197 return false; 198 return false;
198 } 199 }
199 200
200 drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), srcRect); 201 drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), srcRect);
201 202
202 offset->fX = backgroundOffset.fX; 203 offset->fX = backgroundOffset.fX;
203 offset->fY = backgroundOffset.fY; 204 offset->fY = backgroundOffset.fY;
204 WrapTexture(dst, src.width(), src.height(), result); 205 WrapTexture(dst, src.width(), src.height(), result);
205 return true; 206 return true;
206 } 207 }
207 208
208 #endif 209 #endif
209 210
OLDNEW
« no previous file with comments | « src/effects/SkPerlinNoiseShader.cpp ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698