Index: ui/gfx/image/image_skia_operations.h |
diff --git a/ui/gfx/image/image_skia_operations.h b/ui/gfx/image/image_skia_operations.h |
index e725602f2b084cc0bae656afd9c5cc18c23162b4..605bd0ebef6b07c73b43f942d15fe73012d772e1 100644 |
--- a/ui/gfx/image/image_skia_operations.h |
+++ b/ui/gfx/image/image_skia_operations.h |
@@ -7,10 +7,12 @@ |
#include "base/gtest_prod_util.h" |
#include "ui/base/ui_export.h" |
-#include "ui/gfx/size.h" |
+#include "ui/gfx/color_utils.h" |
namespace gfx { |
class ImageSkia; |
+class Rect; |
+class Size; |
class UI_EXPORT ImageSkiaOperations { |
public: |
@@ -34,6 +36,20 @@ class UI_EXPORT ImageSkiaOperations { |
int src_x, int src_y, |
int dst_w, int dst_h); |
+ // We create a button background image by compositing the color and image |
sky
2012/07/16 21:23:40
We create -> Creates
|
+ // 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 ImageSkia CreateButtonBackground(SkColor color, |
+ const gfx::ImageSkia& image, |
+ const gfx::ImageSkia& mask); |
+ |
+ // Returns an image which is a subset of |image| with bounds |subset_bounds|. |
+ // |image| cannot have image reps of |kA1_Config| config. |
sky
2012/07/16 21:23:40
What does this second line mean?
kAll_Config?
pkotwicz
2012/07/17 01:15:41
The config of the bitmaps contained by the ImageSk
sky
2012/07/20 23:21:25
Make the comment clearer than. Right now it is con
|
+ static ImageSkia ExtractSubset(const gfx::ImageSkia& image, |
+ const gfx::Rect& subset_bounds); |
+ |
// Creates an image that resizes |source| to given |target_size_in_dip|. |
// The resize operation occurs synchronously at the time that the desired |
// scale factor is known (either GetRepresentation is called or the image |