diff options
author | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-25 19:48:38 +0000 |
---|---|---|
committer | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-25 19:48:38 +0000 |
commit | 97e159015b4caea9453e5c268185793afcc708a9 (patch) | |
tree | 08fbdc0f30ec18fb14bca7ad342735715eeab7d9 /ui | |
parent | ccc231bc888b9cf2eda7390c4577a4985d5a65df (diff) | |
download | chromium_src-97e159015b4caea9453e5c268185793afcc708a9.zip chromium_src-97e159015b4caea9453e5c268185793afcc708a9.tar.gz chromium_src-97e159015b4caea9453e5c268185793afcc708a9.tar.bz2 |
Draw new tab button with tab background
Currently the new tab button is drawn with a semi-transparent image blended with the window background color.
This CL changes the drawing code so that we now use the inactive tab background image as the button's background. I've removed the fill from the newtab button images so that they just contain the border and shadow.
The main benefit of this approach is that the button now matches the look of inactive tabs.
Note, I'm only implementing this on views for now. Once this is implemented on all platforms we can remove the old button images.
Screenshots: http://imgur.com/a/iez8r
Note, this is the non-binary portion of this CL:
http://codereview.chromium.org/9252026/
BUG=100775
TEST=
Review URL: https://chromiumcodereview.appspot.com/9290009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119099 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gfx/skbitmap_operations.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/gfx/skbitmap_operations.cc b/ui/gfx/skbitmap_operations.cc index 760bd60..fb0572e 100644 --- a/ui/gfx/skbitmap_operations.cc +++ b/ui/gfx/skbitmap_operations.cc @@ -149,7 +149,8 @@ SkBitmap SkBitmapOperations::CreateMaskedBitmap(const SkBitmap& rgb, for (int x = 0; x < masked.width(); ++x) { SkColor rgb_pixel = SkUnPreMultiply::PMColorToColor(rgb_row[x]); - int alpha = SkAlphaMul(SkColorGetA(rgb_pixel), SkColorGetA(alpha_row[x])); + SkColor alpha_pixel = SkUnPreMultiply::PMColorToColor(alpha_row[x]); + int alpha = SkAlphaMul(SkColorGetA(rgb_pixel), SkColorGetA(alpha_pixel)); dst_row[x] = SkColorSetARGB(alpha, SkAlphaMul(SkColorGetR(rgb_pixel), alpha), SkAlphaMul(SkColorGetG(rgb_pixel), alpha), |