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..82dbb8f5da01047ff81bd6a7d392ea6ef470d49c |
--- /dev/null |
+++ b/ui/gfx/ozone/dri/gbm_surface_factory.h |
@@ -0,0 +1,60 @@ |
+// 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" |
+ |
+struct gbm_device; |
+ |
+namespace gfx { |
+ |
+class DriWrapper; |
+class HardwareDisplayController; |
+class ScanoutSurface; |
+ |
+class GFX_EXPORT GbmSurfaceFactory : public DriSurfaceFactory { |
+ 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 SkCanvas* GetCanvasForWidget(gfx::AcceleratedWidget w) OVERRIDE; |
+ |
+ virtual void* GetFunctionPointerFromNativeLibrary(base::NativeLibrary library, |
+ const char* name) 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_ |