| 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_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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 class Transform; | 28 class Transform; |
| 29 | 29 |
| 30 // Convert between Skia and gfx rect types. | 30 // Convert between Skia and gfx rect types. |
| 31 GFX_EXPORT SkRect RectToSkRect(const Rect& rect); | 31 GFX_EXPORT SkRect RectToSkRect(const Rect& rect); |
| 32 GFX_EXPORT SkIRect RectToSkIRect(const Rect& rect); | 32 GFX_EXPORT SkIRect RectToSkIRect(const Rect& rect); |
| 33 GFX_EXPORT Rect SkIRectToRect(const SkIRect& rect); | 33 GFX_EXPORT Rect SkIRectToRect(const SkIRect& rect); |
| 34 GFX_EXPORT SkRect RectFToSkRect(const RectF& rect); | 34 GFX_EXPORT SkRect RectFToSkRect(const RectF& rect); |
| 35 GFX_EXPORT RectF SkRectToRectF(const SkRect& rect); | 35 GFX_EXPORT RectF SkRectToRectF(const SkRect& rect); |
| 36 GFX_EXPORT SkSize SizeFToSkSize(const SizeF& size); | 36 GFX_EXPORT SkSize SizeFToSkSize(const SizeF& size); |
| 37 GFX_EXPORT SizeF SkSizeToSizeF(const SkSize& size); | 37 GFX_EXPORT SizeF SkSizeToSizeF(const SkSize& size); |
| 38 GFX_EXPORT Size SkISizeToSize(const SkISize& size); |
| 38 | 39 |
| 39 GFX_EXPORT void QuadFToSkPoints(const gfx::QuadF& quad, SkPoint points[4]); | 40 GFX_EXPORT void QuadFToSkPoints(const gfx::QuadF& quad, SkPoint points[4]); |
| 40 | 41 |
| 41 GFX_EXPORT void TransformToFlattenedSkMatrix(const gfx::Transform& transform, | 42 GFX_EXPORT void TransformToFlattenedSkMatrix(const gfx::Transform& transform, |
| 42 SkMatrix* flattened); | 43 SkMatrix* flattened); |
| 43 | 44 |
| 44 // Creates a bitmap shader for the image rep with the image rep's scale factor. | 45 // Creates a bitmap shader for the image rep with the image rep's scale factor. |
| 45 // Sets the created shader's local matrix such that it displays the image rep at | 46 // Sets the created shader's local matrix such that it displays the image rep at |
| 46 // the correct scale factor. | 47 // the correct scale factor. |
| 47 // The shader's local matrix should not be changed after the shader is created. | 48 // The shader's local matrix should not be changed after the shader is created. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 78 const SkBitmap& bitmap2); | 79 const SkBitmap& bitmap2); |
| 79 | 80 |
| 80 // Converts Skia ARGB format pixels in |skia| to RGBA. | 81 // Converts Skia ARGB format pixels in |skia| to RGBA. |
| 81 GFX_EXPORT void ConvertSkiaToRGBA(const unsigned char* skia, | 82 GFX_EXPORT void ConvertSkiaToRGBA(const unsigned char* skia, |
| 82 int pixel_width, | 83 int pixel_width, |
| 83 unsigned char* rgba); | 84 unsigned char* rgba); |
| 84 | 85 |
| 85 } // namespace gfx | 86 } // namespace gfx |
| 86 | 87 |
| 87 #endif // UI_GFX_SKIA_UTIL_H_ | 88 #endif // UI_GFX_SKIA_UTIL_H_ |
| OLD | NEW |