OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "SkColorPriv.h" | 8 #include "SkColorPriv.h" |
9 #include "SkConfig8888.h" | 9 #include "SkConfig8888.h" |
10 #include "SkData.h" | 10 #include "SkData.h" |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 } | 260 } |
261 bitmap.setIsVolatile(true); // so we don't try to cache it | 261 bitmap.setIsVolatile(true); // so we don't try to cache it |
262 | 262 |
263 auto surface(SkSurface::MakeRasterDirect(dst.info(), dst.writable_addr(), ds
t.rowBytes())); | 263 auto surface(SkSurface::MakeRasterDirect(dst.info(), dst.writable_addr(), ds
t.rowBytes())); |
264 if (!surface) { | 264 if (!surface) { |
265 return false; | 265 return false; |
266 } | 266 } |
267 | 267 |
268 SkPaint paint; | 268 SkPaint paint; |
269 paint.setFilterQuality(quality); | 269 paint.setFilterQuality(quality); |
270 paint.setXfermodeMode(SkXfermode::kSrc_Mode); | 270 paint.setBlendMode(SkBlendMode::kSrc); |
271 surface->getCanvas()->drawBitmapRect(bitmap, SkRect::MakeIWH(dst.width(), ds
t.height()), | 271 surface->getCanvas()->drawBitmapRect(bitmap, SkRect::MakeIWH(dst.width(), ds
t.height()), |
272 &paint); | 272 &paint); |
273 return true; | 273 return true; |
274 } | 274 } |
275 | 275 |
276 ////////////////////////////////////////////////////////////////////////////////
////////////////// | 276 ////////////////////////////////////////////////////////////////////////////////
////////////////// |
OLD | NEW |