| 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_VECTOR_PLATFORM_DEVICE_EMF_WIN_H_ | 5 #ifndef SKIA_EXT_VECTOR_PLATFORM_DEVICE_EMF_WIN_H_ |
| 6 #define SKIA_EXT_VECTOR_PLATFORM_DEVICE_EMF_WIN_H_ | 6 #define SKIA_EXT_VECTOR_PLATFORM_DEVICE_EMF_WIN_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "skia/ext/platform_device.h" | 10 #include "skia/ext/platform_device.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // Factory function. The DC is kept as the output context. | 25 // Factory function. The DC is kept as the output context. |
| 26 static SkDevice* create(HDC dc, int width, int height); | 26 static SkDevice* create(HDC dc, int width, int height); |
| 27 | 27 |
| 28 VectorPlatformDeviceEmf(HDC dc, const SkBitmap& bitmap); | 28 VectorPlatformDeviceEmf(HDC dc, const SkBitmap& bitmap); |
| 29 virtual ~VectorPlatformDeviceEmf(); | 29 virtual ~VectorPlatformDeviceEmf(); |
| 30 | 30 |
| 31 // PlatformDevice methods | 31 // PlatformDevice methods |
| 32 virtual PlatformSurface BeginPlatformPaint() OVERRIDE; | 32 virtual PlatformSurface BeginPlatformPaint() OVERRIDE; |
| 33 virtual void DrawToNativeContext(HDC dc, int x, int y, | 33 virtual void DrawToNativeContext(HDC dc, int x, int y, |
| 34 const RECT* src_rect) OVERRIDE; | 34 const RECT* src_rect) OVERRIDE; |
| 35 virtual bool AlphaBlendUsed() const OVERRIDE { return alpha_blend_used_; } | |
| 36 | |
| 37 // SkDevice methods. | 35 // SkDevice methods. |
| 38 virtual uint32_t getDeviceCapabilities(); | 36 virtual uint32_t getDeviceCapabilities(); |
| 39 virtual void drawPaint(const SkDraw& draw, const SkPaint& paint) OVERRIDE; | 37 virtual void drawPaint(const SkDraw& draw, const SkPaint& paint) OVERRIDE; |
| 40 virtual void drawPoints(const SkDraw& draw, SkCanvas::PointMode mode, | 38 virtual void drawPoints(const SkDraw& draw, SkCanvas::PointMode mode, |
| 41 size_t count, const SkPoint[], | 39 size_t count, const SkPoint[], |
| 42 const SkPaint& paint) OVERRIDE; | 40 const SkPaint& paint) OVERRIDE; |
| 43 virtual void drawRect(const SkDraw& draw, const SkRect& r, | 41 virtual void drawRect(const SkDraw& draw, const SkRect& r, |
| 44 const SkPaint& paint) OVERRIDE; | 42 const SkPaint& paint) OVERRIDE; |
| 45 virtual void drawPath(const SkDraw& draw, const SkPath& path, | 43 virtual void drawPath(const SkDraw& draw, const SkPath& path, |
| 46 const SkPaint& paint, | 44 const SkPaint& paint, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 117 |
| 120 // The current clipping | 118 // The current clipping |
| 121 SkRegion clip_region_; | 119 SkRegion clip_region_; |
| 122 | 120 |
| 123 // Previously selected brush before the current drawing. | 121 // Previously selected brush before the current drawing. |
| 124 HGDIOBJ previous_brush_; | 122 HGDIOBJ previous_brush_; |
| 125 | 123 |
| 126 // Previously selected pen before the current drawing. | 124 // Previously selected pen before the current drawing. |
| 127 HGDIOBJ previous_pen_; | 125 HGDIOBJ previous_pen_; |
| 128 | 126 |
| 129 // True if AlphaBlend() was called during this print. | |
| 130 bool alpha_blend_used_; | |
| 131 | |
| 132 DISALLOW_COPY_AND_ASSIGN(VectorPlatformDeviceEmf); | 127 DISALLOW_COPY_AND_ASSIGN(VectorPlatformDeviceEmf); |
| 133 }; | 128 }; |
| 134 | 129 |
| 135 } // namespace skia | 130 } // namespace skia |
| 136 | 131 |
| 137 #endif // SKIA_EXT_VECTOR_PLATFORM_DEVICE_EMF_WIN_H_ | 132 #endif // SKIA_EXT_VECTOR_PLATFORM_DEVICE_EMF_WIN_H_ |
| OLD | NEW |