summaryrefslogtreecommitdiffstats
path: root/ui/gfx/skbitmap_operations.cc
diff options
context:
space:
mode:
authorsail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-25 05:52:41 +0000
committersail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-25 05:52:41 +0000
commitf903709594e37edff8dced5addf98815e81ef2ab (patch)
tree4920f9b1f4993b6ba677d57825c2ce6a547d763b /ui/gfx/skbitmap_operations.cc
parentaa44d3dc180c0b0446f05e3c6299d58703edaa7d (diff)
downloadchromium_src-f903709594e37edff8dced5addf98815e81ef2ab.zip
chromium_src-f903709594e37edff8dced5addf98815e81ef2ab.tar.gz
chromium_src-f903709594e37edff8dced5addf98815e81ef2ab.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 BUG=100775 TEST= Review URL: https://chromiumcodereview.appspot.com/9252026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119018 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/skbitmap_operations.cc')
-rw-r--r--ui/gfx/skbitmap_operations.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/gfx/skbitmap_operations.cc b/ui/gfx/skbitmap_operations.cc
index 760bd60..3af3948 100644
--- a/ui/gfx/skbitmap_operations.cc
+++ b/ui/gfx/skbitmap_operations.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -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),