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

Unified Diff: ui/gfx/surface/accelerated_surface_wayland.h

Issue 7467007: Adding Wayland support for ui/gfx (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Adding missing WaylandDisplay include Created 9 years, 4 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
« no previous file with comments | « ui/gfx/screen_wayland.cc ('k') | ui/gfx/surface/accelerated_surface_wayland.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/surface/accelerated_surface_wayland.h
diff --git a/ui/gfx/surface/accelerated_surface_wayland.h b/ui/gfx/surface/accelerated_surface_wayland.h
new file mode 100644
index 0000000000000000000000000000000000000000..c4418e4e4888cc9857f0e6b963abfc94184c8dbe
--- /dev/null
+++ b/ui/gfx/surface/accelerated_surface_wayland.h
@@ -0,0 +1,37 @@
+// 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_GFX_SURFACE_ACCELERATED_SURFACE_LINUX_H_
+#define UI_GFX_SURFACE_ACCELERATED_SURFACE_LINUX_H_
+#pragma once
+
+#include "base/memory/ref_counted.h"
+#include "ui/gfx/size.h"
+
+struct wl_egl_pixmap;
+
+// The GL context associated with the surface must be current when
+// an instance is created or destroyed.
+class AcceleratedSurface : public base::RefCounted<AcceleratedSurface> {
+ public:
+ AcceleratedSurface(const gfx::Size& size);
+ const gfx::Size& size() const { return size_; }
+ // The pointer returned is owned by this object
+ wl_egl_pixmap* pixmap() const { return pixmap_; }
+ uint32 texture() const { return texture_; }
+
+ private:
+ friend class base::RefCounted<AcceleratedSurface>;
+
+ ~AcceleratedSurface();
+
+ gfx::Size size_;
+ void* image_;
+ wl_egl_pixmap* pixmap_;
+ uint32 texture_;
+
+ DISALLOW_COPY_AND_ASSIGN(AcceleratedSurface);
+};
+
+#endif // UI_GFX_SURFACE_ACCELERATED_SURFACE_LINUX_H_
« no previous file with comments | « ui/gfx/screen_wayland.cc ('k') | ui/gfx/surface/accelerated_surface_wayland.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698