| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "ui/gfx/ozone/surface_factory_ozone.h" | 5 #include "ui/gfx/ozone/surface_factory_ozone.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "ui/gfx/ozone/impl/file_surface_factory_ozone.h" | 10 #include "ui/gfx/ozone/impl/file_surface_factory_ozone.h" |
| 11 #include "ui/gfx/ozone/impl/software_surface_factory_ozone.h" | 11 #include "ui/gfx/ozone/impl/software_surface_factory_ozone.h" |
| 12 | 12 |
| 13 namespace gfx { | 13 namespace gfx { |
| 14 | 14 |
| 15 // static | 15 // static |
| 16 SurfaceFactoryOzone* SurfaceFactoryOzone::impl_ = NULL; | 16 SurfaceFactoryOzone* SurfaceFactoryOzone::impl_ = NULL; |
| 17 | 17 |
| 18 class SurfaceFactoryOzoneStub : public SurfaceFactoryOzone { | 18 class SurfaceFactoryOzoneStub : public SurfaceFactoryOzone { |
| 19 public: | 19 public: |
| 20 SurfaceFactoryOzoneStub() {} | 20 SurfaceFactoryOzoneStub() {} |
| 21 virtual ~SurfaceFactoryOzoneStub() {} | 21 virtual ~SurfaceFactoryOzoneStub() {} |
| 22 | 22 |
| 23 virtual HardwareState InitializeHardware() OVERRIDE { return INITIALIZED; } | 23 virtual HardwareState InitializeHardware() OVERRIDE { return INITIALIZED; } |
| 24 virtual void ShutdownHardware() OVERRIDE {} | 24 virtual void ShutdownHardware() OVERRIDE {} |
| 25 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE { return 0; } | 25 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE { return 0; } |
| 26 virtual gfx::AcceleratedWidget RealizeAcceleratedWidget( | 26 virtual gfx::AcceleratedWidget RealizeAcceleratedWidget( |
| 27 gfx::AcceleratedWidget w) OVERRIDE { | 27 gfx::AcceleratedWidget w) OVERRIDE { |
| 28 return 0; | 28 return 0; |
| 29 } | 29 } |
| 30 virtual bool LoadEGLGLES2Bindings() OVERRIDE { return true; } | 30 virtual bool LoadEGLGLES2Bindings( |
| 31 AddGLLibraryCallback add_gl_library, |
| 32 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE { |
| 33 return true; |
| 34 } |
| 31 virtual bool AttemptToResizeAcceleratedWidget( | 35 virtual bool AttemptToResizeAcceleratedWidget( |
| 32 gfx::AcceleratedWidget w, | 36 gfx::AcceleratedWidget w, |
| 33 const gfx::Rect& bounds) OVERRIDE { | 37 const gfx::Rect& bounds) OVERRIDE { |
| 34 return false; | 38 return false; |
| 35 } | 39 } |
| 36 virtual gfx::VSyncProvider* GetVSyncProvider( | 40 virtual gfx::VSyncProvider* GetVSyncProvider( |
| 37 gfx::AcceleratedWidget w) OVERRIDE { | 41 gfx::AcceleratedWidget w) OVERRIDE { |
| 38 return NULL; | 42 return NULL; |
| 39 } | 43 } |
| 40 }; | 44 }; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 const int32* desired_attributes) { | 98 const int32* desired_attributes) { |
| 95 return desired_attributes; | 99 return desired_attributes; |
| 96 } | 100 } |
| 97 | 101 |
| 98 // static | 102 // static |
| 99 SurfaceFactoryOzone* SurfaceFactoryOzone::CreateTestHelper() { | 103 SurfaceFactoryOzone* SurfaceFactoryOzone::CreateTestHelper() { |
| 100 return new SurfaceFactoryOzoneStub; | 104 return new SurfaceFactoryOzoneStub; |
| 101 } | 105 } |
| 102 | 106 |
| 103 } // namespace gfx | 107 } // namespace gfx |
| OLD | NEW |