OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_SKBITMAP_OPERATIONS_H_ | 5 #ifndef UI_GFX_SKBITMAP_OPERATIONS_H_ |
6 #define UI_GFX_SKBITMAP_OPERATIONS_H_ | 6 #define UI_GFX_SKBITMAP_OPERATIONS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "gfx/color_utils.h" | 10 #include "ui/gfx/color_utils.h" |
11 | 11 |
12 class SkBitmap; | 12 class SkBitmap; |
13 | 13 |
14 class SkBitmapOperations { | 14 class SkBitmapOperations { |
15 public: | 15 public: |
16 // Create a bitmap that is an inverted image of the passed in image. | 16 // Create a bitmap that is an inverted image of the passed in image. |
17 // Each color becomes its inverse in the color wheel. So (255, 15, 0) becomes | 17 // Each color becomes its inverse in the color wheel. So (255, 15, 0) becomes |
18 // (0, 240, 255). The alpha value is not inverted. | 18 // (0, 240, 255). The alpha value is not inverted. |
19 static SkBitmap CreateInvertedBitmap(const SkBitmap& image); | 19 static SkBitmap CreateInvertedBitmap(const SkBitmap& image); |
20 | 20 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 static SkBitmap CreateTransposedBtmap(const SkBitmap& bitmap); | 93 static SkBitmap CreateTransposedBtmap(const SkBitmap& bitmap); |
94 | 94 |
95 private: | 95 private: |
96 SkBitmapOperations(); // Class for scoping only. | 96 SkBitmapOperations(); // Class for scoping only. |
97 | 97 |
98 FRIEND_TEST_ALL_PREFIXES(SkBitmapOperationsTest, DownsampleByTwo); | 98 FRIEND_TEST_ALL_PREFIXES(SkBitmapOperationsTest, DownsampleByTwo); |
99 FRIEND_TEST_ALL_PREFIXES(SkBitmapOperationsTest, DownsampleByTwoSmall); | 99 FRIEND_TEST_ALL_PREFIXES(SkBitmapOperationsTest, DownsampleByTwoSmall); |
100 }; | 100 }; |
101 | 101 |
102 #endif // UI_GFX_SKBITMAP_OPERATIONS_H_ | 102 #endif // UI_GFX_SKBITMAP_OPERATIONS_H_ |
OLD | NEW |