| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 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 "GrSWMaskHelper.h" | 8 #include "GrSWMaskHelper.h" |
| 9 #include "GrDrawState.h" | 9 #include "GrDrawState.h" |
| 10 #include "GrDrawTargetCaps.h" | 10 #include "GrDrawTargetCaps.h" |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 // vertex positions rather than local coords. | 197 // vertex positions rather than local coords. |
| 198 SkMatrix maskMatrix; | 198 SkMatrix maskMatrix; |
| 199 maskMatrix.setIDiv(texture->width(), texture->height()); | 199 maskMatrix.setIDiv(texture->width(), texture->height()); |
| 200 maskMatrix.preTranslate(SkIntToScalar(-rect.fLeft), SkIntToScalar(-rect.fTop
)); | 200 maskMatrix.preTranslate(SkIntToScalar(-rect.fLeft), SkIntToScalar(-rect.fTop
)); |
| 201 maskMatrix.preConcat(drawState->getViewMatrix()); | 201 maskMatrix.preConcat(drawState->getViewMatrix()); |
| 202 | 202 |
| 203 drawState->addCoverageEffect( | 203 drawState->addCoverageEffect( |
| 204 GrSimpleTextureEffect::Create(texture, | 204 GrSimpleTextureEffect::Create(texture, |
| 205 maskMatrix, | 205 maskMatrix, |
| 206 GrTextureParams::kNone_Fi
lterMode, | 206 GrTextureParams::kNone_Fi
lterMode, |
| 207 GrEffect::kPosition_Coord
sType))->unref(); | 207 kPosition_GrCoordSet))->u
nref(); |
| 208 | 208 |
| 209 target->drawSimpleRect(dstRect); | 209 target->drawSimpleRect(dstRect); |
| 210 } | 210 } |
| OLD | NEW |