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

Side by Side Diff: ui/gfx/skia_util.h

Issue 7569005: Rename UI_API to UI_EXPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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
« no previous file with comments | « ui/gfx/skbitmap_operations.h ('k') | ui/gfx/skia_utils_gtk.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_SKIA_UTIL_H_ 5 #ifndef UI_GFX_SKIA_UTIL_H_
6 #define UI_GFX_SKIA_UTIL_H_ 6 #define UI_GFX_SKIA_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "third_party/skia/include/core/SkColor.h" 11 #include "third_party/skia/include/core/SkColor.h"
12 #include "third_party/skia/include/core/SkRect.h" 12 #include "third_party/skia/include/core/SkRect.h"
13 #include "ui/ui_api.h" 13 #include "ui/base/ui_export.h"
14 14
15 class SkBitmap; 15 class SkBitmap;
16 class SkShader; 16 class SkShader;
17 17
18 namespace gfx { 18 namespace gfx {
19 19
20 class Rect; 20 class Rect;
21 21
22 // Convert between Skia and gfx rect types. 22 // Convert between Skia and gfx rect types.
23 UI_API SkRect RectToSkRect(const gfx::Rect& rect); 23 UI_EXPORT SkRect RectToSkRect(const gfx::Rect& rect);
24 UI_API gfx::Rect SkRectToRect(const SkRect& rect); 24 UI_EXPORT gfx::Rect SkRectToRect(const SkRect& rect);
25 25
26 // Creates a vertical gradient shader. The caller owns the shader. 26 // Creates a vertical gradient shader. The caller owns the shader.
27 // Example usage to avoid leaks: 27 // Example usage to avoid leaks:
28 // SkSafeUnref(paint.setShader(gfx::CreateGradientShader(0, 10, red, blue))); 28 // SkSafeUnref(paint.setShader(gfx::CreateGradientShader(0, 10, red, blue)));
29 // 29 //
30 // (The old shader in the paint, if any, needs to be freed, and SkSafeUnref will 30 // (The old shader in the paint, if any, needs to be freed, and SkSafeUnref will
31 // handle the NULL case.) 31 // handle the NULL case.)
32 UI_API SkShader* CreateGradientShader(int start_point, 32 UI_EXPORT SkShader* CreateGradientShader(int start_point,
33 int end_point, 33 int end_point,
34 SkColor start_color, 34 SkColor start_color,
35 SkColor end_color); 35 SkColor end_color);
36 36
37 // Returns true if the two bitmaps contain the same pixels. 37 // Returns true if the two bitmaps contain the same pixels.
38 UI_API bool BitmapsAreEqual(const SkBitmap& bitmap1, const SkBitmap& bitmap2); 38 UI_EXPORT bool BitmapsAreEqual(const SkBitmap& bitmap1,
39 const SkBitmap& bitmap2);
39 40
40 // Strip the accelerator char (typically '&') from a menu string. A 41 // Strip the accelerator char (typically '&') from a menu string. A
41 // double accelerator char ('&&') will be converted to a single char. 42 // double accelerator char ('&&') will be converted to a single char.
42 UI_API std::string RemoveAcceleratorChar(const std::string& s, 43 UI_EXPORT std::string RemoveAcceleratorChar(const std::string& s,
43 char accelerator_char); 44 char accelerator_char);
44 45
45 } // namespace gfx; 46 } // namespace gfx;
46 47
47 #endif // UI_GFX_SKIA_UTIL_H_ 48 #endif // UI_GFX_SKIA_UTIL_H_
OLDNEW
« no previous file with comments | « ui/gfx/skbitmap_operations.h ('k') | ui/gfx/skia_utils_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698