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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 | 250 |
251 SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(dst->asRenderTa
rget())); | 251 SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(dst->asRenderTa
rget())); |
252 if (!drawContext) { | 252 if (!drawContext) { |
253 return nullptr; | 253 return nullptr; |
254 } | 254 } |
255 | 255 |
256 SkMatrix matrix; | 256 SkMatrix matrix; |
257 matrix.setTranslate(SkIntToScalar(-bounds.left()), SkIntToScalar(-bounds.top
())); | 257 matrix.setTranslate(SkIntToScalar(-bounds.left()), SkIntToScalar(-bounds.top
())); |
258 drawContext->drawRect(GrClip::WideOpen(), paint, matrix, SkRect::Make(bounds
)); | 258 drawContext->drawRect(GrClip::WideOpen(), paint, matrix, SkRect::Make(bounds
)); |
259 | 259 |
260 return SkSpecialImage::MakeFromGpu(source->internal_getProxy(), | 260 return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(bounds.width(), bounds.he
ight()), |
261 SkIRect::MakeWH(bounds.width(), bounds.he
ight()), | |
262 kNeedNewImageUniqueID_SpecialImage, | 261 kNeedNewImageUniqueID_SpecialImage, |
263 dst.get()); | 262 dst.get()); |
264 } | 263 } |
265 | 264 |
266 #endif | 265 #endif |
OLD | NEW |