Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_OZONE_PLATFORM_DRI_DRI_SURFACE_FACTORY_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_DRI_SURFACE_FACTORY_H_ |
| 6 #define UI_OZONE_PLATFORM_DRI_DRI_SURFACE_FACTORY_H_ | 6 #define UI_OZONE_PLATFORM_DRI_DRI_SURFACE_FACTORY_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 24 // This implementation is used in conjunction with the software rendering | 24 // This implementation is used in conjunction with the software rendering |
| 25 // path. | 25 // path. |
| 26 class DriSurfaceFactory : public ui::SurfaceFactoryOzone, | 26 class DriSurfaceFactory : public ui::SurfaceFactoryOzone, |
| 27 public HardwareCursorDelegate { | 27 public HardwareCursorDelegate { |
| 28 public: | 28 public: |
| 29 static const gfx::AcceleratedWidget kDefaultWidgetHandle; | 29 static const gfx::AcceleratedWidget kDefaultWidgetHandle; |
| 30 | 30 |
| 31 DriSurfaceFactory(DriWrapper* drm, ScreenManager* screen_manager); | 31 DriSurfaceFactory(DriWrapper* drm, ScreenManager* screen_manager); |
| 32 virtual ~DriSurfaceFactory(); | 32 virtual ~DriSurfaceFactory(); |
| 33 | 33 |
| 34 // Describes the state of the hardware after initialization. | |
| 35 enum HardwareState { | |
| 36 UNINITIALIZED, | |
| 37 INITIALIZED, | |
| 38 FAILED, | |
| 39 }; | |
| 40 | |
| 34 // SurfaceFactoryOzone overrides: | 41 // SurfaceFactoryOzone overrides: |
|
Ken Russell (switch to Gerrit)
2014/07/18 22:01:01
These aren't SurfaceFactoryOzone overrides any mor
spang
2014/07/18 22:11:11
There's some already:
DriSurfaceFactoryTest.FailI
Ken Russell (switch to Gerrit)
2014/07/18 22:37:45
OK, thanks for confirming that tests exist for the
| |
| 35 virtual HardwareState InitializeHardware() OVERRIDE; | 42 virtual HardwareState InitializeHardware(); |
| 36 virtual void ShutdownHardware() OVERRIDE; | 43 virtual void ShutdownHardware(); |
| 37 | 44 |
| 38 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; | 45 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; |
| 39 | 46 |
| 40 virtual scoped_ptr<ui::SurfaceOzoneCanvas> CreateCanvasForWidget( | 47 virtual scoped_ptr<ui::SurfaceOzoneCanvas> CreateCanvasForWidget( |
| 41 gfx::AcceleratedWidget w) OVERRIDE; | 48 gfx::AcceleratedWidget w) OVERRIDE; |
| 42 | 49 |
| 43 virtual bool LoadEGLGLES2Bindings( | 50 virtual bool LoadEGLGLES2Bindings( |
| 44 AddGLLibraryCallback add_gl_library, | 51 AddGLLibraryCallback add_gl_library, |
| 45 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE; | 52 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE; |
| 46 | 53 |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 70 | 77 |
| 71 SkBitmap cursor_bitmap_; | 78 SkBitmap cursor_bitmap_; |
| 72 gfx::Point cursor_location_; | 79 gfx::Point cursor_location_; |
| 73 | 80 |
| 74 DISALLOW_COPY_AND_ASSIGN(DriSurfaceFactory); | 81 DISALLOW_COPY_AND_ASSIGN(DriSurfaceFactory); |
| 75 }; | 82 }; |
| 76 | 83 |
| 77 } // namespace ui | 84 } // namespace ui |
| 78 | 85 |
| 79 #endif // UI_OZONE_PLATFORM_DRI_DRI_SURFACE_FACTORY_H_ | 86 #endif // UI_OZONE_PLATFORM_DRI_DRI_SURFACE_FACTORY_H_ |
| OLD | NEW |