Chromium Code Reviews| 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..e83283761e5f1991ebce4100f164fce786aa4f4b |
| --- /dev/null |
| +++ b/ui/gfx/surface/accelerated_surface_wayland.h |
| @@ -0,0 +1,35 @@ |
| +// 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_; } |
| + struct wl_egl_pixmap* pixmap() const { return pixmap_; } |
|
sky
2011/07/27 15:51:05
Do you really need struct here and on line 28?
Do
|
| + uint32 texture() const { return texture_; } |
| + |
| + private: |
| + ~AcceleratedSurface(); |
| + |
| + gfx::Size size_; |
| + void* image_; |
| + struct wl_egl_pixmap* pixmap_; |
| + uint32 texture_; |
| + |
| + friend class base::RefCounted<AcceleratedSurface>; |
|
sky
2011/07/27 15:51:05
friends are generally first in the private section
|
| + DISALLOW_COPY_AND_ASSIGN(AcceleratedSurface); |
| +}; |
| + |
| +#endif // UI_GFX_SURFACE_ACCELERATED_SURFACE_LINUX_H_ |