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 22 matching lines...) Expand all Loading... |
33 // | 33 // |
34 // X servers commonly have a 32-bit visual with xRGB in registers (since they | 34 // X servers commonly have a 32-bit visual with xRGB in registers (since they |
35 // typically don't do alpha blending of drawables at the user level. Composite | 35 // typically don't do alpha blending of drawables at the user level. Composite |
36 // extensions aside.) | 36 // extensions aside.) |
37 // | 37 // |
38 // We don't use GdkPixbuf because its byte order differs from the rest. Most | 38 // We don't use GdkPixbuf because its byte order differs from the rest. Most |
39 // importantly, it differs from Cairo which, being a system library, is | 39 // importantly, it differs from Cairo which, being a system library, is |
40 // something that we can't easily change. | 40 // something that we can't easily change. |
41 // ----------------------------------------------------------------------------- | 41 // ----------------------------------------------------------------------------- |
42 | 42 |
43 namespace gfx { | 43 namespace skia { |
44 | 44 |
45 // ----------------------------------------------------------------------------- | 45 // ----------------------------------------------------------------------------- |
46 // This is the Linux bitmap backing for Skia. We create a Cairo image surface | 46 // This is the Linux bitmap backing for Skia. We create a Cairo image surface |
47 // to store the backing buffer. This buffer is BGRA in memory (on little-endian | 47 // to store the backing buffer. This buffer is BGRA in memory (on little-endian |
48 // machines). | 48 // machines). |
49 // | 49 // |
50 // For now we are also using Cairo to paint to the Drawables so we provide an | 50 // For now we are also using Cairo to paint to the Drawables so we provide an |
51 // accessor for getting the surface. | 51 // accessor for getting the surface. |
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 |
(...skipping 25 matching lines...) Expand all Loading... |
79 | 79 |
80 // Bitmaps aren't vector graphics. | 80 // Bitmaps aren't vector graphics. |
81 virtual bool IsVectorial() { return false; } | 81 virtual bool IsVectorial() { return false; } |
82 | 82 |
83 cairo_surface_t* surface() const; | 83 cairo_surface_t* surface() const; |
84 | 84 |
85 private: | 85 private: |
86 scoped_refptr<BitmapPlatformDeviceLinuxData> data_; | 86 scoped_refptr<BitmapPlatformDeviceLinuxData> data_; |
87 }; | 87 }; |
88 | 88 |
89 } // namespace gfx | 89 } // namespace skia |
90 | 90 |
91 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_LINUX_H_ | 91 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_LINUX_H_ |
OLD | NEW |