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

Side by Side Diff: skia/ext/vector_platform_device_emf_win.h

Issue 10836330: Rasterize page before printing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
« no previous file with comments | « skia/ext/platform_device.cc ('k') | skia/ext/vector_platform_device_emf_win.cc » ('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 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
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
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_
OLDNEW
« no previous file with comments | « skia/ext/platform_device.cc ('k') | skia/ext/vector_platform_device_emf_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698