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 | 9 |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 | 242 |
243 sk_sp<GrDrawContext> drawContext(context->newDrawContext(SkBackingFit::kAppr
ox, | 243 sk_sp<GrDrawContext> drawContext(context->newDrawContext(SkBackingFit::kAppr
ox, |
244 bounds.width(), bou
nds.height(), | 244 bounds.width(), bou
nds.height(), |
245 kSkia8888_GrPixelCo
nfig)); | 245 kSkia8888_GrPixelCo
nfig)); |
246 if (!drawContext) { | 246 if (!drawContext) { |
247 return nullptr; | 247 return nullptr; |
248 } | 248 } |
249 | 249 |
250 SkMatrix matrix; | 250 SkMatrix matrix; |
251 matrix.setTranslate(SkIntToScalar(-bounds.left()), SkIntToScalar(-bounds.top
())); | 251 matrix.setTranslate(SkIntToScalar(-bounds.left()), SkIntToScalar(-bounds.top
())); |
252 drawContext->drawRect(GrClip::WideOpen(), paint, matrix, SkRect::Make(bounds
)); | 252 drawContext->drawRect(GrNoClip(), paint, matrix, SkRect::Make(bounds)); |
253 | 253 |
254 return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(bounds.width(), bounds.he
ight()), | 254 return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(bounds.width(), bounds.he
ight()), |
255 kNeedNewImageUniqueID_SpecialImage, | 255 kNeedNewImageUniqueID_SpecialImage, |
256 drawContext->asTexture()); | 256 drawContext->asTexture()); |
257 } | 257 } |
258 | 258 |
259 #endif | 259 #endif |
OLD | NEW |