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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 foregroundMatrix.preTranslate(SkIntToScalar(backgroundOffset.fX-foregroundOf
fset.fX), | 149 foregroundMatrix.preTranslate(SkIntToScalar(backgroundOffset.fX-foregroundOf
fset.fX), |
150 SkIntToScalar(backgroundOffset.fY-foregroundOf
fset.fY)); | 150 SkIntToScalar(backgroundOffset.fY-foregroundOf
fset.fY)); |
151 | 151 |
152 | 152 |
153 SkRect srcRect; | 153 SkRect srcRect; |
154 src.getBounds(&srcRect); | 154 src.getBounds(&srcRect); |
155 | 155 |
156 GrPaint paint; | 156 GrPaint paint; |
157 paint.addColorTextureProcessor(foregroundTex, foregroundMatrix); | 157 paint.addColorTextureProcessor(foregroundTex, foregroundMatrix); |
158 paint.addColorProcessor(xferProcessor)->unref(); | 158 paint.addColorProcessor(xferProcessor)->unref(); |
159 context->drawRect(paint, srcRect); | 159 context->drawRect(paint, SkMatrix::I(), srcRect); |
160 | 160 |
161 offset->fX = backgroundOffset.fX; | 161 offset->fX = backgroundOffset.fX; |
162 offset->fY = backgroundOffset.fY; | 162 offset->fY = backgroundOffset.fY; |
163 WrapTexture(dst, src.width(), src.height(), result); | 163 WrapTexture(dst, src.width(), src.height(), result); |
164 return true; | 164 return true; |
165 } | 165 } |
166 | 166 |
167 #endif | 167 #endif |
OLD | NEW |