Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "skia/ext/image_operations.h" | 9 #include "skia/ext/image_operations.h" |
| 10 #include "ui/base/ui_export.h" | 10 #include "ui/base/ui_export.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 76 // Returns an image which is a subset of |image| with bounds |subset_bounds|. | 76 // Returns an image which is a subset of |image| with bounds |subset_bounds|. |
| 77 // The |image| cannot use kA1_Config config. | 77 // The |image| cannot use kA1_Config config. |
| 78 static ImageSkia ExtractSubset(const gfx::ImageSkia& image, | 78 static ImageSkia ExtractSubset(const gfx::ImageSkia& image, |
| 79 const gfx::Rect& subset_bounds); | 79 const gfx::Rect& subset_bounds); |
| 80 | 80 |
| 81 // Creates an image by resizing |source| to given |target_dip_size|. | 81 // Creates an image by resizing |source| to given |target_dip_size|. |
| 82 static ImageSkia CreateResizedImage(const ImageSkia& source, | 82 static ImageSkia CreateResizedImage(const ImageSkia& source, |
| 83 skia::ImageOperations::ResizeMethod methd, | 83 skia::ImageOperations::ResizeMethod methd, |
| 84 const Size& target_dip_size); | 84 const Size& target_dip_size); |
| 85 | 85 |
| 86 // Creates an image which will inherit image representations from |source|. | |
| 87 // Image representations for scale factors not containted in |source| will be | |
| 88 // generated by resizing existing representations using |resize_method|. | |
| 89 static ImageSkia CreateImageWithFallbackResizeMethod( | |
|
tbarzic
2012/10/16 18:00:32
do you have a better idea for this name? I'm not t
| |
| 90 const ImageSkia& source, | |
| 91 skia::ImageOperations::ResizeMethod resize_method); | |
| 92 | |
| 86 // Creates an image with drop shadow defined in |shadows| for |source|. | 93 // Creates an image with drop shadow defined in |shadows| for |source|. |
| 87 static ImageSkia CreateImageWithDropShadow(const ImageSkia& source, | 94 static ImageSkia CreateImageWithDropShadow(const ImageSkia& source, |
| 88 const ShadowValues& shadows); | 95 const ShadowValues& shadows); |
| 89 | 96 |
| 90 private: | 97 private: |
| 91 ImageSkiaOperations(); // Class for scoping only. | 98 ImageSkiaOperations(); // Class for scoping only. |
| 92 }; | 99 }; |
| 93 | 100 |
| 94 } // namespace gfx | 101 } // namespace gfx |
| 95 | 102 |
| 96 #endif // UI_GFX_IMAGE_IMAGE_SKIA_OPERATIONS_H_ | 103 #endif // UI_GFX_IMAGE_IMAGE_SKIA_OPERATIONS_H_ |
| OLD | NEW |