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_BITMAP_PLATFORM_DEVICE_LINUX_H_ | 5 #ifndef SKIA_EXT_BITMAP_PLATFORM_DEVICE_LINUX_H_ |
6 #define SKIA_EXT_BITMAP_PLATFORM_DEVICE_LINUX_H_ | 6 #define SKIA_EXT_BITMAP_PLATFORM_DEVICE_LINUX_H_ |
7 | 7 |
8 #include "base/ref_counted.h" | 8 #include "base/ref_counted.h" |
9 #include "skia/ext/platform_device_linux.h" | 9 #include "skia/ext/platform_device_linux.h" |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // | 52 // |
53 // This is all quite ok for test_shell. In the future we will want to use | 53 // This is all quite ok for test_shell. In the future we will want to use |
54 // shared memory between the renderer and the main process at least. In this | 54 // shared memory between the renderer and the main process at least. In this |
55 // case we'll probably create the buffer from a precreated region of memory. | 55 // case we'll probably create the buffer from a precreated region of memory. |
56 // ----------------------------------------------------------------------------- | 56 // ----------------------------------------------------------------------------- |
57 class BitmapPlatformDeviceLinux : public PlatformDeviceLinux { | 57 class BitmapPlatformDeviceLinux : public PlatformDeviceLinux { |
58 // A reference counted cairo surface | 58 // A reference counted cairo surface |
59 class BitmapPlatformDeviceLinuxData; | 59 class BitmapPlatformDeviceLinuxData; |
60 | 60 |
61 public: | 61 public: |
62 /// Static constructor. I don't understand this, it's just a copy of the mac | |
63 static BitmapPlatformDeviceLinux* Create(int width, int height, | 62 static BitmapPlatformDeviceLinux* Create(int width, int height, |
64 bool is_opaque); | 63 bool is_opaque); |
| 64 // This doesn't take ownership of |data| |
65 static BitmapPlatformDeviceLinux* Create(int width, int height, | 65 static BitmapPlatformDeviceLinux* Create(int width, int height, |
66 bool is_opaque, uint8_t* data); | 66 bool is_opaque, uint8_t* data); |
67 static BitmapPlatformDeviceLinux* Create(int width, int height, | 67 static BitmapPlatformDeviceLinux* Create(int width, int height, |
68 bool is_opaque, | 68 bool is_opaque, |
69 cairo_surface_t* surface); | 69 cairo_surface_t* surface); |
70 | 70 |
71 // Create a BitmapPlatformDeviceLinux from an already constructed bitmap; | 71 // Create a BitmapPlatformDeviceLinux from an already constructed bitmap; |
72 // you should probably be using Create(). This may become private later if | 72 // you should probably be using Create(). This may become private later if |
73 // we ever have to share state between some native drawing UI and Skia, like | 73 // we ever have to share state between some native drawing UI and Skia, like |
74 // the Windows and Mac versions of this class do. | 74 // the Windows and Mac versions of this class do. |
(...skipping 12 matching lines...) Expand all Loading... |
87 | 87 |
88 cairo_surface_t* surface() const; | 88 cairo_surface_t* surface() const; |
89 | 89 |
90 private: | 90 private: |
91 scoped_refptr<BitmapPlatformDeviceLinuxData> data_; | 91 scoped_refptr<BitmapPlatformDeviceLinuxData> data_; |
92 }; | 92 }; |
93 | 93 |
94 } // namespace skia | 94 } // namespace skia |
95 | 95 |
96 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_LINUX_H_ | 96 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_LINUX_H_ |
OLD | NEW |