| Index: ui/gfx/ozone/dri/gbm_surface_factory.h
|
| diff --git a/ui/gfx/ozone/dri/gbm_surface_factory.h b/ui/gfx/ozone/dri/gbm_surface_factory.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..770588d353cdb5129359f774347f1c2596819189
|
| --- /dev/null
|
| +++ b/ui/gfx/ozone/dri/gbm_surface_factory.h
|
| @@ -0,0 +1,73 @@
|
| +// Copyright 2013 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_DRI_GBM_SURFACE_FACTORY_H_
|
| +#define UI_GFX_DRI_GBM_SURFACE_FACTORY_H_
|
| +
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "ui/gfx/ozone/dri/dri_surface_factory.h"
|
| +#include "ui/gfx/ozone/overlay_hal_ozone.h"
|
| +
|
| +struct gbm_device;
|
| +
|
| +namespace gfx {
|
| +
|
| +class DriWrapper;
|
| +class HardwareDisplayController;
|
| +class ScanoutSurface;
|
| +
|
| +class GbmSurfaceFactory : public DriSurfaceFactory, public OverlayHALOzone {
|
| + public:
|
| + GbmSurfaceFactory();
|
| + virtual ~GbmSurfaceFactory();
|
| +
|
| + virtual HardwareState InitializeHardware() OVERRIDE;
|
| + virtual void ShutdownHardware() OVERRIDE;
|
| +
|
| + virtual intptr_t GetNativeDisplay() OVERRIDE;
|
| + virtual const int32* GetEGLSurfaceProperties(
|
| + const int32* desired_list) OVERRIDE;
|
| +
|
| + virtual bool LoadEGLGLES2Bindings(
|
| + AddGLLibraryCallback add_gl_library,
|
| + SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE;
|
| +
|
| + virtual bool AttemptToResizeAcceleratedWidget(
|
| + gfx::AcceleratedWidget w, const gfx::Rect& bounds) OVERRIDE;
|
| +
|
| + virtual bool SchedulePageFlip(gfx::AcceleratedWidget w) OVERRIDE;
|
| +
|
| + virtual gfx::VSyncProvider* GetVSyncProvider(
|
| + gfx::AcceleratedWidget w) OVERRIDE;
|
| +
|
| + virtual gfx::AcceleratedWidget CreateNativeBuffer(
|
| + gfx::Size size,
|
| + unsigned internalformat) OVERRIDE;
|
| +
|
| + virtual void SetOverlayPlane(int plane_id,
|
| + gfx::AcceleratedWidget handle,
|
| + const gfx::Rect& bounds) OVERRIDE;
|
| +
|
| + virtual void* GetFunctionPointerFromNativeLibrary(base::NativeLibrary library,
|
| + const char* name) OVERRIDE;
|
| +
|
| + // OverlayHALOzone impleme3ntation.
|
| + virtual void CheckOverlaySupport(SurfaceCandidateList* surfaces) OVERRIDE;
|
| +
|
| + private:
|
| + virtual ScanoutSurface* CreateSurface(
|
| + HardwareDisplayController* controller) OVERRIDE;
|
| +
|
| + virtual gfx::AcceleratedWidget GetNativeWidget(
|
| + ScanoutSurface* surface) OVERRIDE;
|
| +
|
| + // A GBM device used to create surfaces for |drm_|.
|
| + gbm_device* device_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory);
|
| +};
|
| +
|
| +} // namespace gfx
|
| +
|
| +#endif // UI_GFX_DRI_GBM_SURFACE_FACTORY_H_
|
|
|