diff options
Diffstat (limited to 'base/gfx')
-rw-r--r-- | base/gfx/bitmap_platform_device_win.cc | 23 | ||||
-rw-r--r-- | base/gfx/vector_device.cc | 14 |
2 files changed, 19 insertions, 18 deletions
diff --git a/base/gfx/bitmap_platform_device_win.cc b/base/gfx/bitmap_platform_device_win.cc index d7150b1..0df57c2 100644 --- a/base/gfx/bitmap_platform_device_win.cc +++ b/base/gfx/bitmap_platform_device_win.cc @@ -376,18 +376,19 @@ void BitmapPlatformDeviceWin::drawToHDC(HDC dc, int x, int y, src_rect->top, SRCCOPY); } else { + DCHECK(copy_width != 0 && copy_height != 0); BLENDFUNCTION blend_function = {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA}; - AlphaBlend(dc, - x, - y, - copy_width, - copy_height, - source_dc, - src_rect->left, - src_rect->top, - copy_width, - copy_height, - blend_function); + GdiAlphaBlend(dc, + x, + y, + copy_width, + copy_height, + source_dc, + src_rect->left, + src_rect->top, + copy_width, + copy_height, + blend_function); } LoadTransformToDC(source_dc, data_->transform()); diff --git a/base/gfx/vector_device.cc b/base/gfx/vector_device.cc index 7230e2b..26da338 100644 --- a/base/gfx/vector_device.cc +++ b/base/gfx/vector_device.cc @@ -583,13 +583,13 @@ void VectorDevice::InternalDrawBitmap(const SkBitmap& bitmap, int x, int y, DCHECK(result); // Note that this function expect premultiplied colors (!) BLENDFUNCTION blend_function = {AC_SRC_OVER, 0, alpha, AC_SRC_ALPHA}; - result = AlphaBlend(dc, - x, y, // Destination origin. - src_size_x, src_size_y, // Destination size. - bitmap_dc, - 0, 0, // Source origin. - src_size_x, src_size_y, // Source size. - blend_function); + result = GdiAlphaBlend(dc, + x, y, // Destination origin. + src_size_x, src_size_y, // Destination size. + bitmap_dc, + 0, 0, // Source origin. + src_size_x, src_size_y, // Source size. + blend_function); DCHECK(result); result = SetStretchBltMode(dc, previous_mode); DCHECK(result); |