| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 GrTextureDomain::MakeTexelDomain(foregroundTex, foreground.bounds()), | 186 GrTextureDomain::MakeTexelDomain(foregroundTex, foreground.bounds()), |
| 187 GrTextureDomain::kDecal_Mode, | 187 GrTextureDomain::kDecal_Mode, |
| 188 GrTextureParams::kNone_FilterMode) | 188 GrTextureParams::kNone_FilterMode) |
| 189 ); | 189 ); |
| 190 | 190 |
| 191 paint.addColorFragmentProcessor(foregroundDomain.get()); | 191 paint.addColorFragmentProcessor(foregroundDomain.get()); |
| 192 if (xferFP) { | 192 if (xferFP) { |
| 193 paint.addColorFragmentProcessor(xferFP)->unref(); | 193 paint.addColorFragmentProcessor(xferFP)->unref(); |
| 194 } | 194 } |
| 195 | 195 |
| 196 SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(dst->asRenderTa
rget())); | 196 SkAutoTUnref<GrDrawContext> drawContext( |
| 197 context->drawingMgr().drawContext(dst->a
sRenderTarget())); |
| 197 if (!drawContext) { | 198 if (!drawContext) { |
| 198 return false; | 199 return false; |
| 199 } | 200 } |
| 200 | 201 |
| 201 drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), srcRect); | 202 drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), srcRect); |
| 202 | 203 |
| 203 offset->fX = backgroundOffset.fX; | 204 offset->fX = backgroundOffset.fX; |
| 204 offset->fY = backgroundOffset.fY; | 205 offset->fY = backgroundOffset.fY; |
| 205 WrapTexture(dst, src.width(), src.height(), result); | 206 WrapTexture(dst, src.width(), src.height(), result); |
| 206 return true; | 207 return true; |
| 207 } | 208 } |
| 208 | 209 |
| 209 #endif | 210 #endif |
| 210 | 211 |
| OLD | NEW |