| 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_LINUX_H_ | 5 #ifndef SKIA_EXT_VECTOR_PLATFORM_DEVICE_LINUX_H_ |
| 6 #define SKIA_EXT_VECTOR_PLATFORM_DEVICE_LINUX_H_ | 6 #define SKIA_EXT_VECTOR_PLATFORM_DEVICE_LINUX_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 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" |
| 11 #include "third_party/skia/include/core/SkMatrix.h" | 11 #include "third_party/skia/include/core/SkMatrix.h" |
| 12 #include "third_party/skia/include/core/SkRegion.h" | 12 #include "third_party/skia/include/core/SkRegion.h" |
| 13 | 13 |
| 14 namespace skia { | 14 namespace skia { |
| 15 | 15 |
| 16 class VectorPlatformDeviceFactory : public SkDeviceFactory { | 16 class VectorPlatformDeviceFactory : public SkDeviceFactory { |
| 17 public: | 17 public: |
| 18 static PlatformDevice* CreateDevice(cairo_t* context, int width, int height, | 18 static SkDevice* CreateDevice(cairo_t* context, int width, int height, |
| 19 bool isOpaque); | 19 bool isOpaque); |
| 20 | 20 |
| 21 // Overridden from SkDeviceFactory: | 21 // Overridden from SkDeviceFactory: |
| 22 virtual SkDevice* newDevice(SkCanvas* ignored, SkBitmap::Config config, | 22 virtual SkDevice* newDevice(SkCanvas* ignored, SkBitmap::Config config, |
| 23 int width, int height, | 23 int width, int height, |
| 24 bool isOpaque, bool isForLayer); | 24 bool isOpaque, bool isForLayer); |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 // This device is basically a wrapper that provides a surface for SkCanvas | 27 // This device is basically a wrapper that provides a surface for SkCanvas |
| 28 // to draw into. It is basically an adaptor which converts skia APIs into | 28 // to draw into. It is basically an adaptor which converts skia APIs into |
| 29 // cooresponding Cairo APIs and outputs to a Cairo surface. Please NOTE that | 29 // cooresponding Cairo APIs and outputs to a Cairo surface. Please NOTE that |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 PlatformSurface context_; | 130 PlatformSurface context_; |
| 131 | 131 |
| 132 // Copy & assign are not supported. | 132 // Copy & assign are not supported. |
| 133 VectorPlatformDevice(const VectorPlatformDevice&); | 133 VectorPlatformDevice(const VectorPlatformDevice&); |
| 134 const VectorPlatformDevice& operator=(const VectorPlatformDevice&); | 134 const VectorPlatformDevice& operator=(const VectorPlatformDevice&); |
| 135 }; | 135 }; |
| 136 | 136 |
| 137 } // namespace skia | 137 } // namespace skia |
| 138 | 138 |
| 139 #endif // SKIA_EXT_VECTOR_PLATFORM_DEVICE_LINUX_H_ | 139 #endif // SKIA_EXT_VECTOR_PLATFORM_DEVICE_LINUX_H_ |
| OLD | NEW |