Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 45 // source device will be copied. | 45 // source device will be copied. |
| 46 virtual void DrawToNativeContext(HDC dc, int x, int y, | 46 virtual void DrawToNativeContext(HDC dc, int x, int y, |
| 47 const RECT* src_rect) = 0; | 47 const RECT* src_rect) = 0; |
| 48 | 48 |
| 49 // Sets the opacity of each pixel in the specified region to be opaque. | 49 // Sets the opacity of each pixel in the specified region to be opaque. |
| 50 virtual void MakeOpaque(int x, int y, int width, int height) { } | 50 virtual void MakeOpaque(int x, int y, int width, int height) { } |
| 51 | 51 |
| 52 // Returns if GDI is allowed to render text to this device. | 52 // Returns if GDI is allowed to render text to this device. |
| 53 virtual bool IsNativeFontRenderingAllowed() { return true; } | 53 virtual bool IsNativeFontRenderingAllowed() { return true; } |
| 54 | 54 |
| 55 // Used by the printing subclasses. See |VectorPlatformDeviceEmf|. | |
| 56 virtual bool AlphaBlendUsed() const { return false; } | |
|
alokp
2011/08/04 16:06:54
Could you add a comment what it means?
vandebo (ex-Chrome)
2011/08/04 16:28:44
In case you aren't sure... Some printers don't sup
Jeff Timanus
2011/08/04 16:30:33
Done.
| |
| 57 | |
| 55 // Loads a SkPath into the GDI context. The path can there after be used for | 58 // Loads a SkPath into the GDI context. The path can there after be used for |
| 56 // clipping or as a stroke. Returns false if the path failed to be loaded. | 59 // clipping or as a stroke. Returns false if the path failed to be loaded. |
| 57 static bool LoadPathToDC(HDC context, const SkPath& path); | 60 static bool LoadPathToDC(HDC context, const SkPath& path); |
| 58 | 61 |
| 59 // Loads a SkRegion into the GDI context. | 62 // Loads a SkRegion into the GDI context. |
| 60 static void LoadClippingRegionToDC(HDC context, const SkRegion& region, | 63 static void LoadClippingRegionToDC(HDC context, const SkRegion& region, |
| 61 const SkMatrix& transformation); | 64 const SkMatrix& transformation); |
| 62 | 65 |
| 63 protected: | 66 protected: |
| 64 // Arrays must be inside structures. | 67 // Arrays must be inside structures. |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 76 static void LoadTransformToDC(HDC dc, const SkMatrix& matrix); | 79 static void LoadTransformToDC(HDC dc, const SkMatrix& matrix); |
| 77 | 80 |
| 78 // Transforms SkPath's paths into a series of cubic path. | 81 // Transforms SkPath's paths into a series of cubic path. |
| 79 static bool SkPathToCubicPaths(CubicPaths* paths, const SkPath& skpath); | 82 static bool SkPathToCubicPaths(CubicPaths* paths, const SkPath& skpath); |
| 80 }; | 83 }; |
| 81 | 84 |
| 82 } // namespace skia | 85 } // namespace skia |
| 83 | 86 |
| 84 #endif // SKIA_EXT_PLATFORM_DEVICE_WIN_H_ | 87 #endif // SKIA_EXT_PLATFORM_DEVICE_WIN_H_ |
| 85 | 88 |
| OLD | NEW |