| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_PLATFORM_DEVICE_LINUX_H_ | 5 #ifndef SKIA_EXT_PLATFORM_DEVICE_LINUX_H_ |
| 6 #define SKIA_EXT_PLATFORM_DEVICE_LINUX_H_ | 6 #define SKIA_EXT_PLATFORM_DEVICE_LINUX_H_ |
| 7 | 7 |
| 8 #include "third_party/skia/include/core/SkDevice.h" | 8 #include "third_party/skia/include/core/SkDevice.h" |
| 9 | 9 |
| 10 typedef struct _cairo_surface cairo_surface_t; | 10 typedef struct _cairo cairo_t; |
| 11 | 11 |
| 12 namespace skia { | 12 namespace skia { |
| 13 | 13 |
| 14 // Blindly copying the mac hierarchy. | 14 // Blindly copying the mac hierarchy. |
| 15 class PlatformDevice : public SkDevice { | 15 class PlatformDevice : public SkDevice { |
| 16 public: | 16 public: |
| 17 typedef cairo_surface_t* PlatformSurface; | 17 typedef cairo_t* PlatformSurface; |
| 18 | 18 |
| 19 // Returns if the preferred rendering engine is vectorial or bitmap based. | 19 // Returns if the preferred rendering engine is vectorial or bitmap based. |
| 20 virtual bool IsVectorial() = 0; | 20 virtual bool IsVectorial() = 0; |
| 21 | 21 |
| 22 virtual cairo_surface_t* beginPlatformPaint() = 0; | 22 virtual PlatformSurface beginPlatformPaint() = 0; |
| 23 | 23 |
| 24 protected: | 24 protected: |
| 25 // Forwards |bitmap| to SkDevice's constructor. | 25 // Forwards |bitmap| to SkDevice's constructor. |
| 26 PlatformDevice(const SkBitmap& bitmap); | 26 PlatformDevice(const SkBitmap& bitmap); |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 } // namespace skia | 29 } // namespace skia |
| 30 | 30 |
| 31 #endif // SKIA_EXT_PLATFORM_DEVICE_LINUX_H_ | 31 #endif // SKIA_EXT_PLATFORM_DEVICE_LINUX_H_ |
| OLD | NEW |