| Index: ui/gfx/skbitmap_operations.cc
|
| diff --git a/ui/gfx/skbitmap_operations.cc b/ui/gfx/skbitmap_operations.cc
|
| index 10cce9c45b27aaf3061cafddda74f87b28685de7..ce3beb442fb2d08afcb86fefd2709a366b92ca55 100644
|
| --- a/ui/gfx/skbitmap_operations.cc
|
| +++ b/ui/gfx/skbitmap_operations.cc
|
| @@ -133,14 +133,16 @@ SkBitmap SkBitmapOperations::CreateBlendedBitmap(const SkBitmap& first,
|
| // static
|
| SkBitmap SkBitmapOperations::CreateMaskedBitmap(const SkBitmap& rgb,
|
| const SkBitmap& alpha) {
|
| - DCHECK(rgb.width() == alpha.width());
|
| - DCHECK(rgb.height() == alpha.height());
|
| + // DCHECK(rgb.width() == alpha.width());
|
| + // DCHECK(rgb.height() == alpha.height());
|
| DCHECK(rgb.bytesPerPixel() == alpha.bytesPerPixel());
|
| DCHECK(rgb.config() == SkBitmap::kARGB_8888_Config);
|
| DCHECK(alpha.config() == SkBitmap::kARGB_8888_Config);
|
|
|
| SkBitmap masked;
|
| - masked.setConfig(SkBitmap::kARGB_8888_Config, rgb.width(), rgb.height(), 0);
|
| + masked.setConfig(SkBitmap::kARGB_8888_Config,
|
| + std::min(rgb.width(), alpha.width()),
|
| + std::min(rgb.height(), alpha.height()), 0);
|
| masked.allocPixels();
|
| masked.eraseARGB(0, 0, 0, 0);
|
|
|
|
|