1 // Copyright 2014 Intel Corporation. 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.
5 #ifndef OZONE_UI_GFX_SURFACE_FACTORY_WAYLAND_H_
6 #define OZONE_UI_GFX_SURFACE_FACTORY_WAYLAND_H_
8 #include "ui/gfx/ozone/surface_factory_ozone.h"
10 #include "ui/gfx/gfx_export.h"
14 class GFX_EXPORT SurfaceFactoryWayland : public gfx::SurfaceFactoryOzone {
16 SurfaceFactoryWayland();
17 virtual ~SurfaceFactoryWayland();
19 virtual SurfaceFactoryOzone::HardwareState InitializeHardware() OVERRIDE;
20 virtual intptr_t GetNativeDisplay() OVERRIDE;
21 virtual void ShutdownHardware() OVERRIDE;
22 // GetAcceleratedWidget return's a opaque handle associated with a accelerated
24 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
25 // RealizeAcceleratedWidget takes opaque handle as parameter and returns
26 // eglwindow assosicated with it.
27 virtual gfx::AcceleratedWidget RealizeAcceleratedWidget(
28 gfx::AcceleratedWidget w) OVERRIDE;
29 virtual bool LoadEGLGLES2Bindings(
30 gfx::SurfaceFactoryOzone::AddGLLibraryCallback add_gl_library,
31 gfx::SurfaceFactoryOzone::SetGLGetProcAddressProcCallback
32 proc_address) OVERRIDE;
33 // Returns true if resizing of eglwindow associated with opaque handle was
34 // successful else returns false.
35 virtual bool AttemptToResizeAcceleratedWidget(
36 gfx::AcceleratedWidget w, const gfx::Rect& bounds) OVERRIDE;
37 virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider(
38 gfx::AcceleratedWidget w) OVERRIDE;
39 virtual bool SchedulePageFlip(gfx::AcceleratedWidget w) OVERRIDE;
40 virtual const int32* GetEGLSurfaceProperties(
41 const int32* desired_list) OVERRIDE;
44 unsigned last_realized_widget_handle_;
46 DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryWayland);
51 #endif // OZONE_UI_GFX_SURFACE_FACTORY_WAYLAND_H_