OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WAYLAND_SHM_BUFFER_H_ |
| 6 #define WAYLAND_SHM_BUFFER_H_ |
| 7 |
| 8 #include <stdint.h> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "wayland_buffer.h" |
| 12 |
| 13 typedef struct _cairo_surface cairo_surface_t; |
| 14 |
| 15 class WaylandDisplay; |
| 16 |
| 17 /* A SHM implementation for the WaylandBuffer. |
| 18 */ |
| 19 class WaylandShmBuffer : public WaylandBuffer { |
| 20 public: |
| 21 /* Creates a Wayland buffer with the given width and height */ |
| 22 WaylandShmBuffer(WaylandDisplay* display, uint32_t width, uint32_t height); |
| 23 virtual ~WaylandShmBuffer(); |
| 24 |
| 25 /* Returns a pointer to the surface associated with the buffer. |
| 26 This object maintains ownership of the surface. |
| 27 */ |
| 28 cairo_surface_t* GetDataSurface() const; |
| 29 private: |
| 30 /* The surface associated with the Wayland buffer */ |
| 31 cairo_surface_t* cairo_data_surface_; |
| 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(WaylandShmBuffer); |
| 34 }; |
| 35 |
| 36 #endif |
OLD | NEW |