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_SKIA_H_ | 5 #ifndef SKIA_EXT_VECTOR_PLATFORM_DEVICE_SKIA_H_ |
6 #define SKIA_EXT_VECTOR_PLATFORM_DEVICE_SKIA_H_ | 6 #define SKIA_EXT_VECTOR_PLATFORM_DEVICE_SKIA_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 13 matching lines...) Expand all Loading... | |
24 | 24 |
25 class VectorPlatformDeviceSkiaFactory : public SkDeviceFactory { | 25 class VectorPlatformDeviceSkiaFactory : public SkDeviceFactory { |
26 public: | 26 public: |
27 virtual SkDevice* newDevice(SkCanvas* notUsed, SkBitmap::Config config, | 27 virtual SkDevice* newDevice(SkCanvas* notUsed, SkBitmap::Config config, |
28 int width, int height, bool isOpaque, | 28 int width, int height, bool isOpaque, |
29 bool isForLayer); | 29 bool isForLayer); |
30 }; | 30 }; |
31 | 31 |
32 class VectorPlatformDeviceSkia : public PlatformDevice { | 32 class VectorPlatformDeviceSkia : public PlatformDevice { |
33 public: | 33 public: |
34 SK_API VectorPlatformDeviceSkia(int width, | 34 SK_API VectorPlatformDeviceSkia(SkPDFDevice* pdf_device, |
35 int height, | |
36 const SkMatrix& initialTransform); | 35 const SkMatrix& initialTransform); |
vandebo (ex-Chrome)
2011/04/25 22:11:47
I don't think we need the initialTransform beyond
Chris Guillory
2011/04/25 23:47:12
Correct. Done.
| |
37 ~VectorPlatformDeviceSkia(); | 36 ~VectorPlatformDeviceSkia(); |
38 | 37 |
39 SkPDFDevice* PdfDevice() { return pdf_device_.get(); } | 38 SkPDFDevice* PdfDevice() { return pdf_device_.get(); } |
40 | 39 |
41 // PlatformDevice methods. | 40 // PlatformDevice methods. |
42 virtual bool IsVectorial(); | 41 virtual bool IsVectorial(); |
43 virtual bool IsNativeFontRenderingAllowed(); | 42 virtual bool IsNativeFontRenderingAllowed(); |
44 | 43 |
45 virtual PlatformSurface BeginPlatformPaint(); | 44 virtual PlatformSurface BeginPlatformPaint(); |
46 virtual void EndPlatformPaint(); | 45 virtual void EndPlatformPaint(); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
91 private: | 90 private: |
92 SkRefPtr<SkPDFDevice> pdf_device_; | 91 SkRefPtr<SkPDFDevice> pdf_device_; |
93 SkRefPtr<BitmapPlatformDevice> raster_surface_; | 92 SkRefPtr<BitmapPlatformDevice> raster_surface_; |
94 | 93 |
95 DISALLOW_COPY_AND_ASSIGN(VectorPlatformDeviceSkia); | 94 DISALLOW_COPY_AND_ASSIGN(VectorPlatformDeviceSkia); |
96 }; | 95 }; |
97 | 96 |
98 } // namespace skia | 97 } // namespace skia |
99 | 98 |
100 #endif // SKIA_EXT_VECTOR_PLATFORM_DEVICE_SKIA_H_ | 99 #endif // SKIA_EXT_VECTOR_PLATFORM_DEVICE_SKIA_H_ |
OLD | NEW |