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

Side by Side Diff: ui/gfx/image/image_skia_operations.h

Issue 10827191: Convert extension action icons code to use ImageSkia instead of SkBitmap (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove includes we don't need anymore Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_IMAGE_SKIA_OPERATIONS_H_ 5 #ifndef UI_GFX_IMAGE_SKIA_OPERATIONS_H_
6 #define UI_GFX_IMAGE_SKIA_OPERATIONS_H_ 6 #define UI_GFX_IMAGE_SKIA_OPERATIONS_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "ui/base/ui_export.h" 9 #include "ui/base/ui_export.h"
10 #include "ui/gfx/color_utils.h" 10 #include "ui/gfx/color_utils.h"
11 #include "ui/gfx/shadow_value.h" 11 #include "ui/gfx/shadow_value.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 class ImageSkia; 14 class ImageSkia;
15 class Rect; 15 class Rect;
16 class Size; 16 class Size;
17 17
18 class UI_EXPORT ImageSkiaOperations { 18 class UI_EXPORT ImageSkiaOperations {
19 public: 19 public:
20 // Create an image that is a blend of two others. The alpha argument 20 // Create an image that is a blend of two others. The alpha argument
21 // specifies the opacity of the second imag. The provided image must 21 // specifies the opacity of the second imag. The provided image must
22 // use the kARGB_8888_Config config and be of equal dimensions. 22 // use the kARGB_8888_Config config and be of equal dimensions.
23 static ImageSkia CreateBlendedImage(const ImageSkia& first, 23 static ImageSkia CreateBlendedImage(const ImageSkia& first,
24 const ImageSkia& second, 24 const ImageSkia& second,
25 double alpha); 25 double alpha);
26 26
27 // Creates new image by painting first and second image respectively.
28 // The second image is centered in respect to the first image.
Jeffrey Yasskin 2012/08/09 21:39:04 I've seen code that wants to control whether cente
tbarzic 2012/08/10 06:24:08 might be a good idea, but I'd leave it outside of
Jeffrey Yasskin 2012/08/10 07:40:35 SGTM.
29 static ImageSkia CreateSuperimposedImage(const ImageSkia& first,
30 const ImageSkia& second);
31
27 // Create an image that is the original image masked out by the mask defined 32 // Create an image that is the original image masked out by the mask defined
28 // in the alpha image. The images must use the kARGB_8888_Config config and 33 // in the alpha image. The images must use the kARGB_8888_Config config and
29 // be of equal dimensions. 34 // be of equal dimensions.
30 static ImageSkia CreateMaskedImage(const ImageSkia& first, 35 static ImageSkia CreateMaskedImage(const ImageSkia& first,
31 const ImageSkia& alpha); 36 const ImageSkia& alpha);
32 37
33 // Create an image that is cropped from another image. This is special 38 // Create an image that is cropped from another image. This is special
34 // because it tiles the original image, so your coordinates can extend 39 // because it tiles the original image, so your coordinates can extend
35 // outside the bounds of the original image. 40 // outside the bounds of the original image.
36 static ImageSkia CreateTiledImage(const ImageSkia& image, 41 static ImageSkia CreateTiledImage(const ImageSkia& image,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 static ImageSkia CreateImageWithDropShadow(const ImageSkia& source, 82 static ImageSkia CreateImageWithDropShadow(const ImageSkia& source,
78 const ShadowValues& shadows); 83 const ShadowValues& shadows);
79 84
80 private: 85 private:
81 ImageSkiaOperations(); // Class for scoping only. 86 ImageSkiaOperations(); // Class for scoping only.
82 }; 87 };
83 88
84 } // namespace gfx 89 } // namespace gfx
85 90
86 #endif // UI_GFX_IMAGE_IMAGE_SKIA_OPERATIONS_H_ 91 #endif // UI_GFX_IMAGE_IMAGE_SKIA_OPERATIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698