Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Unified Diff: skia/ext/image_operations.h

Issue 119025: Add ability to theme our buttons.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: skia/ext/image_operations.h
===================================================================
--- skia/ext/image_operations.h (revision 17327)
+++ skia/ext/image_operations.h (working copy)
@@ -61,6 +61,15 @@
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);

Powered by Google App Engine
This is Rietveld 408576698