Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Unified Diff: ui/wayland/wayland_shm_buffer.h

Issue 7457023: Adding a Wayland basic toolkit (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: More comments and Chrome style formatting Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/wayland/wayland_shm_buffer.h
diff --git a/ui/wayland/wayland_shm_buffer.h b/ui/wayland/wayland_shm_buffer.h
new file mode 100644
index 0000000000000000000000000000000000000000..815ad31cfae6d200997502952c381a3a1b328c69
--- /dev/null
+++ b/ui/wayland/wayland_shm_buffer.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WAYLAND_SHM_BUFFER_H_
+#define WAYLAND_SHM_BUFFER_H_
+
+#include <stdint.h>
+
+#include "base/basictypes.h"
+#include "wayland_buffer.h"
+
+typedef struct _cairo_surface cairo_surface_t;
+
+class WaylandDisplay;
+
+/* A SHM implementation for the WaylandBuffer.
+*/
+class WaylandShmBuffer : public WaylandBuffer {
+ public:
+ /* Creates a Wayland buffer with the given width and height */
+ WaylandShmBuffer(WaylandDisplay* display, uint32_t width, uint32_t height);
+ virtual ~WaylandShmBuffer();
+
+ /* Returns a pointer to the surface associated with the buffer.
+ This object maintains ownership of the surface.
+ */
+ cairo_surface_t* GetDataSurface() const;
+ private:
+ /* The surface associated with the Wayland buffer */
+ cairo_surface_t* cairo_data_surface_;
+
+ DISALLOW_COPY_AND_ASSIGN(WaylandShmBuffer);
+};
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698