summaryrefslogtreecommitdiffstats
path: root/ui/gfx
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-11 23:15:04 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-11 23:15:04 +0000
commit5dfa6267ee32fe83903c5fc7fb1758a450ead2ff (patch)
treeedf159ccb516216371246391908d3a86f1debc3b /ui/gfx
parent4c7406f36e49c346f519694a8a05b6a2c3085a9b (diff)
downloadchromium_src-5dfa6267ee32fe83903c5fc7fb1758a450ead2ff.zip
chromium_src-5dfa6267ee32fe83903c5fc7fb1758a450ead2ff.tar.gz
chromium_src-5dfa6267ee32fe83903c5fc7fb1758a450ead2ff.tar.bz2
Add check to make sure that mask image and target image have the same size.
BUG=167788 TEST=none Review URL: https://chromiumcodereview.appspot.com/11783114 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176466 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx')
-rw-r--r--ui/gfx/image/image_skia_operations.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/gfx/image/image_skia_operations.cc b/ui/gfx/image/image_skia_operations.cc
index a5f2358..0f23ef1 100644
--- a/ui/gfx/image/image_skia_operations.cc
+++ b/ui/gfx/image/image_skia_operations.cc
@@ -167,6 +167,8 @@ class MaskedImageSource : public gfx::ImageSkiaSource {
virtual ImageSkiaRep GetImageForScale(ui::ScaleFactor scale_factor) OVERRIDE {
ImageSkiaRep rgb_rep = rgb_.GetRepresentation(scale_factor);
ImageSkiaRep alpha_rep = alpha_.GetRepresentation(scale_factor);
+ CHECK_EQ(rgb_rep.pixel_width(), alpha_rep.pixel_width());
+ CHECK_EQ(rgb_rep.pixel_height(), alpha_rep.pixel_height());
return ImageSkiaRep(SkBitmapOperations::CreateMaskedBitmap(
rgb_rep.sk_bitmap(), alpha_rep.sk_bitmap()),
rgb_rep.scale_factor());