| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 SKIA_EXT_PLATFORM_DEVICE_WIN_H_ | 5 #ifndef SKIA_EXT_PLATFORM_DEVICE_WIN_H_ |
| 6 #define SKIA_EXT_PLATFORM_DEVICE_WIN_H_ | 6 #define SKIA_EXT_PLATFORM_DEVICE_WIN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 // Sets the opacity of each pixel in the specified region to be opaque. | 42 // Sets the opacity of each pixel in the specified region to be opaque. |
| 43 virtual void makeOpaque(int x, int y, int width, int height) { } | 43 virtual void makeOpaque(int x, int y, int width, int height) { } |
| 44 | 44 |
| 45 // Returns if the preferred rendering engine is vectorial or bitmap based. | 45 // Returns if the preferred rendering engine is vectorial or bitmap based. |
| 46 virtual bool IsVectorial() = 0; | 46 virtual bool IsVectorial() = 0; |
| 47 | 47 |
| 48 // Returns if GDI is allowed to render text to this device. | 48 // Returns if GDI is allowed to render text to this device. |
| 49 virtual bool IsNativeFontRenderingAllowed() { return true; } | 49 virtual bool IsNativeFontRenderingAllowed() { return true; } |
| 50 | 50 |
| 51 virtual PlatformSurface beginPlatformPaint(); |
| 52 virtual void endPlatformPaint(); |
| 53 |
| 51 // Initializes the default settings and colors in a device context. | 54 // Initializes the default settings and colors in a device context. |
| 52 static void InitializeDC(HDC context); | 55 static void InitializeDC(HDC context); |
| 53 | 56 |
| 54 // Loads a SkPath into the GDI context. The path can there after be used for | 57 // Loads a SkPath into the GDI context. The path can there after be used for |
| 55 // clipping or as a stroke. | 58 // clipping or as a stroke. |
| 56 static void LoadPathToDC(HDC context, const SkPath& path); | 59 static void LoadPathToDC(HDC context, const SkPath& path); |
| 57 | 60 |
| 58 // Loads a SkRegion into the GDI context. | 61 // Loads a SkRegion into the GDI context. |
| 59 static void LoadClippingRegionToDC(HDC context, const SkRegion& region, | 62 static void LoadClippingRegionToDC(HDC context, const SkRegion& region, |
| 60 const SkMatrix& transformation); | 63 const SkMatrix& transformation); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 75 static void LoadTransformToDC(HDC dc, const SkMatrix& matrix); | 78 static void LoadTransformToDC(HDC dc, const SkMatrix& matrix); |
| 76 | 79 |
| 77 // Transforms SkPath's paths into a series of cubic path. | 80 // Transforms SkPath's paths into a series of cubic path. |
| 78 static bool SkPathToCubicPaths(CubicPaths* paths, const SkPath& skpath); | 81 static bool SkPathToCubicPaths(CubicPaths* paths, const SkPath& skpath); |
| 79 }; | 82 }; |
| 80 | 83 |
| 81 } // namespace skia | 84 } // namespace skia |
| 82 | 85 |
| 83 #endif // SKIA_EXT_PLATFORM_DEVICE_WIN_H_ | 86 #endif // SKIA_EXT_PLATFORM_DEVICE_WIN_H_ |
| 84 | 87 |
| OLD | NEW |