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

Side by Side Diff: include/device/xps/SkXPSDevice.h

Issue 22978012: Split SkDevice into SkBaseDevice and SkBitmapDevice (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Updating to ToT (10994) Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « include/core/SkRRect.h ('k') | include/gpu/SkGpuDevice.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkXPSDevice_DEFINED 8 #ifndef SkXPSDevice_DEFINED
9 #define SkXPSDevice_DEFINED 9 #define SkXPSDevice_DEFINED
10 10
11 #include "SkTypes.h" 11 #include "SkTypes.h"
12 #include <ObjBase.h> 12 #include <ObjBase.h>
13 #include <XpsObjectModel.h> 13 #include <XpsObjectModel.h>
14 14
15 #include "SkAutoCoInitialize.h" 15 #include "SkAutoCoInitialize.h"
16 #include "SkBitmapDevice.h"
16 #include "SkBitSet.h" 17 #include "SkBitSet.h"
17 #include "SkCanvas.h" 18 #include "SkCanvas.h"
18 #include "SkColor.h" 19 #include "SkColor.h"
19 #include "SkDevice.h"
20 #include "SkPaint.h" 20 #include "SkPaint.h"
21 #include "SkPath.h" 21 #include "SkPath.h"
22 #include "SkPoint.h" 22 #include "SkPoint.h"
23 #include "SkShader.h" 23 #include "SkShader.h"
24 #include "SkSize.h" 24 #include "SkSize.h"
25 #include "SkTArray.h" 25 #include "SkTArray.h"
26 #include "SkTScopedComPtr.h" 26 #include "SkTScopedComPtr.h"
27 #include "SkTypeface.h" 27 #include "SkTypeface.h"
28 28
29 /** \class SkXPSDevice 29 /** \class SkXPSDevice
30 30
31 The drawing context for the XPS backend. 31 The drawing context for the XPS backend.
32 */ 32 */
33 class SkXPSDevice : public SkDevice { 33 class SkXPSDevice : public SkBitmapDevice {
34 public: 34 public:
35 SK_API SkXPSDevice(); 35 SK_API SkXPSDevice();
36 SK_API virtual ~SkXPSDevice(); 36 SK_API virtual ~SkXPSDevice();
37 37
38 virtual bool beginPortfolio(SkWStream* outputStream); 38 virtual bool beginPortfolio(SkWStream* outputStream);
39 /** 39 /**
40 @param unitsPerMeter converts geometry units into physical units. 40 @param unitsPerMeter converts geometry units into physical units.
41 @param pixelsPerMeter resolution to use when geometry must be rasterized. 41 @param pixelsPerMeter resolution to use when geometry must be rasterized.
42 @param trimSize final page size in physical units. 42 @param trimSize final page size in physical units.
43 The top left of the trim is the origin of physical space. 43 The top left of the trim is the origin of physical space.
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 const SkDraw&, 127 const SkDraw&,
128 SkCanvas::VertexMode, 128 SkCanvas::VertexMode,
129 int vertexCount, const SkPoint verts[], 129 int vertexCount, const SkPoint verts[],
130 const SkPoint texs[], const SkColor colors[], 130 const SkPoint texs[], const SkColor colors[],
131 SkXfermode* xmode, 131 SkXfermode* xmode,
132 const uint16_t indices[], int indexCount, 132 const uint16_t indices[], int indexCount,
133 const SkPaint& paint) SK_OVERRIDE; 133 const SkPaint& paint) SK_OVERRIDE;
134 134
135 virtual void drawDevice( 135 virtual void drawDevice(
136 const SkDraw&, 136 const SkDraw&,
137 SkDevice* device, 137 SkBaseDevice* device,
138 int x, int y, 138 int x, int y,
139 const SkPaint& paint) SK_OVERRIDE; 139 const SkPaint& paint) SK_OVERRIDE;
140 140
141 virtual bool onReadPixels(const SkBitmap& bitmap, 141 virtual bool onReadPixels(const SkBitmap& bitmap,
142 int x, 142 int x,
143 int y, 143 int y,
144 SkCanvas::Config8888) SK_OVERRIDE; 144 SkCanvas::Config8888) SK_OVERRIDE;
145 145
146 virtual bool allowImageFilter(SkImageFilter*) SK_OVERRIDE; 146 virtual bool allowImageFilter(SkImageFilter*) SK_OVERRIDE;
147 147
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 SkMatrix* matrix, 300 SkMatrix* matrix,
301 SkVector* ppuScale, 301 SkVector* ppuScale,
302 const SkIRect& clip, SkIRect* clipIRect); 302 const SkIRect& clip, SkIRect* clipIRect);
303 303
304 HRESULT applyMask( 304 HRESULT applyMask(
305 const SkDraw& d, 305 const SkDraw& d,
306 const SkMask& mask, 306 const SkMask& mask,
307 const SkVector& ppuScale, 307 const SkVector& ppuScale,
308 IXpsOMPath* shadedPath); 308 IXpsOMPath* shadedPath);
309 309
310 // override from SkDevice 310 // override from SkBaseDevice
311 virtual SkDevice* onCreateCompatibleDevice( 311 virtual SkBaseDevice* onCreateCompatibleDevice(SkBitmap::Config config,
312 SkBitmap::Config config, 312 int width, int height,
313 int width, int height, 313 bool isOpaque,
314 bool isOpaque, 314 Usage usage) SK_OVERRIDE;
315 Usage usage) SK_OVERRIDE;
316 315
317 // Disable the default copy and assign implementation. 316 // Disable the default copy and assign implementation.
318 SkXPSDevice(const SkXPSDevice&); 317 SkXPSDevice(const SkXPSDevice&);
319 void operator=(const SkXPSDevice&); 318 void operator=(const SkXPSDevice&);
320 319
321 typedef SkDevice INHERITED; 320 typedef SkBitmapDevice INHERITED;
322 }; 321 };
323 322
324 #endif 323 #endif
OLDNEW
« no previous file with comments | « include/core/SkRRect.h ('k') | include/gpu/SkGpuDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698