summaryrefslogtreecommitdiffstats
path: root/skia/ext/image_operations.h
diff options
context:
space:
mode:
authorglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-04 02:31:02 +0000
committerglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-04 02:31:02 +0000
commit6e853c3ad131fe6713ce8efbac2270fee26ab5b2 (patch)
treed0c9c8a5d1949cbdd108059add44b86b989514f4 /skia/ext/image_operations.h
parent26e99ffd2a4179aefe5dbf8cbd5da74c0bc7a76b (diff)
downloadchromium_src-6e853c3ad131fe6713ce8efbac2270fee26ab5b2.zip
chromium_src-6e853c3ad131fe6713ce8efbac2270fee26ab5b2.tar.gz
chromium_src-6e853c3ad131fe6713ce8efbac2270fee26ab5b2.tar.bz2
Add ability to theme our buttons.
BUG=12762 TEST=Verify that buttons can be themed. Review URL: http://codereview.chromium.org/119025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17586 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ext/image_operations.h')
-rw-r--r--skia/ext/image_operations.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/skia/ext/image_operations.h b/skia/ext/image_operations.h
index 3086fab..4e3c93e 100644
--- a/skia/ext/image_operations.h
+++ b/skia/ext/image_operations.h
@@ -61,6 +61,15 @@ class ImageOperations {
static SkBitmap CreateMaskedBitmap(const SkBitmap& first,
const SkBitmap& alpha);
+ // We create a button background image by compositing the color and image
+ // together, then applying the mask. This is a highly specialized composite
+ // operation that is the equivalent of drawing a background in |color|,
+ // tiling |image| over the top, and then masking the result out with |mask|.
+ // The images must use kARGB_8888_Config config.
+ static SkBitmap CreateButtonBackground(SkColor color,
+ const SkBitmap& image,
+ const SkBitmap& mask);
+
// Blur a bitmap using an average-blur algorithm over the rectangle defined
// by |blur_amount|. The blur will wrap around image edges.
static SkBitmap CreateBlurredBitmap(const SkBitmap& bitmap, int blur_amount);