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

Unified Diff: ui/wayland/wayland_buffer.h

Issue 7457023: Adding a Wayland basic toolkit (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Inlined functions and styling changes 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_buffer.h
diff --git a/ui/wayland/wayland_buffer.h b/ui/wayland/wayland_buffer.h
new file mode 100644
index 0000000000000000000000000000000000000000..c84e3a8180ebd60f84e03c4a7482ae3948f0e6b7
--- /dev/null
+++ b/ui/wayland/wayland_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 UI_WAYLAND_WAYLAND_BUFFER_H_
+#define UI_WAYLAND_WAYLAND_BUFFER_H_
+
+#include "base/basictypes.h"
+
+struct wl_buffer;
+
+namespace ui {
+
+// Wrapper around a wl_buffer. A wl_buffer is associated with a drawing
+// surface.
+//
+// This class is a basic interface of what a buffer should be/provide.
+// Implementations whould create and destroy the wl_buffer.
+class WaylandBuffer {
+ public:
+ WaylandBuffer() {}
tfarina 2011/07/25 21:10:09 I think it's fine, but I prefer for ctor and dtor
+ virtual ~WaylandBuffer() {}
+
+ wl_buffer* GetBuffer() const { return buffer_; }
tfarina 2011/07/25 21:10:09 Nope, I said the preferred way is: wl_buffer* buf
+
+ protected:
+ // Owned by this object and should be destroyed by this object.
+ wl_buffer* buffer_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(WaylandBuffer);
+};
+
+} // namespace ui
+
+#endif // UI_WAYLAND_WAYLAND_BUFFER_H_

Powered by Google App Engine
This is Rietveld 408576698