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

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

Issue 10823358: image: Specify the resize-method when resizing ImageSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: deep-copy 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 "skia/ext/image_operations.h"
9 #include "ui/base/ui_export.h" 10 #include "ui/base/ui_export.h"
10 #include "ui/gfx/color_utils.h" 11 #include "ui/gfx/color_utils.h"
11 #include "ui/gfx/shadow_value.h" 12 #include "ui/gfx/shadow_value.h"
12 13
13 namespace gfx { 14 namespace gfx {
14 class ImageSkia; 15 class ImageSkia;
15 class Rect; 16 class Rect;
16 class Size; 17 class Size;
17 18
18 class UI_EXPORT ImageSkiaOperations { 19 class UI_EXPORT ImageSkiaOperations {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 const gfx::ImageSkia& image, 73 const gfx::ImageSkia& image,
73 const gfx::ImageSkia& mask); 74 const gfx::ImageSkia& mask);
74 75
75 // 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|.
76 // The |image| cannot use kA1_Config config. 77 // The |image| cannot use kA1_Config config.
77 static ImageSkia ExtractSubset(const gfx::ImageSkia& image, 78 static ImageSkia ExtractSubset(const gfx::ImageSkia& image,
78 const gfx::Rect& subset_bounds); 79 const gfx::Rect& subset_bounds);
79 80
80 // Creates an image by resizing |source| to given |target_dip_size|. 81 // Creates an image by resizing |source| to given |target_dip_size|.
81 static ImageSkia CreateResizedImage(const ImageSkia& source, 82 static ImageSkia CreateResizedImage(const ImageSkia& source,
83 skia::ImageOperations::ResizeMethod methd,
82 const Size& target_dip_size); 84 const Size& target_dip_size);
83 85
84 // Creates an image with drop shadow defined in |shadows| for |source|. 86 // Creates an image with drop shadow defined in |shadows| for |source|.
85 static ImageSkia CreateImageWithDropShadow(const ImageSkia& source, 87 static ImageSkia CreateImageWithDropShadow(const ImageSkia& source,
86 const ShadowValues& shadows); 88 const ShadowValues& shadows);
87 89
88 private: 90 private:
89 ImageSkiaOperations(); // Class for scoping only. 91 ImageSkiaOperations(); // Class for scoping only.
90 }; 92 };
91 93
92 } // namespace gfx 94 } // namespace gfx
93 95
94 #endif // UI_GFX_IMAGE_IMAGE_SKIA_OPERATIONS_H_ 96 #endif // UI_GFX_IMAGE_IMAGE_SKIA_OPERATIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698