OLD | NEW |
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 Loading... |
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 |
OLD | NEW |