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/vsync_provider.h" | 10 #include "ui/gfx/vsync_provider.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 SurfaceFactoryOzone* SurfaceFactoryOzone::GetInstance() { | 23 SurfaceFactoryOzone* SurfaceFactoryOzone::GetInstance() { |
24 CHECK(impl_) << "No SurfaceFactoryOzone implementation set."; | 24 CHECK(impl_) << "No SurfaceFactoryOzone implementation set."; |
25 return impl_; | 25 return impl_; |
26 } | 26 } |
27 | 27 |
28 void SurfaceFactoryOzone::SetInstance(SurfaceFactoryOzone* impl) { | 28 void SurfaceFactoryOzone::SetInstance(SurfaceFactoryOzone* impl) { |
29 impl_ = impl; | 29 impl_ = impl; |
30 } | 30 } |
31 | 31 |
32 const char* SurfaceFactoryOzone::DefaultDisplaySpec() { | |
33 char* envvar = getenv("ASH_DISPLAY_SPEC"); | |
34 if (envvar) | |
35 return envvar; | |
36 return "720x1280*2"; | |
37 } | |
38 | |
39 gfx::Screen* SurfaceFactoryOzone::CreateDesktopScreen() { | 32 gfx::Screen* SurfaceFactoryOzone::CreateDesktopScreen() { |
40 return NULL; | 33 return NULL; |
41 } | 34 } |
42 | 35 |
43 intptr_t SurfaceFactoryOzone::GetNativeDisplay() { | 36 intptr_t SurfaceFactoryOzone::GetNativeDisplay() { |
44 return 0; | 37 return 0; |
45 } | 38 } |
46 | 39 |
47 bool SurfaceFactoryOzone::SchedulePageFlip(gfx::AcceleratedWidget w) { | 40 bool SurfaceFactoryOzone::SchedulePageFlip(gfx::AcceleratedWidget w) { |
48 return true; | 41 return true; |
49 } | 42 } |
50 | 43 |
51 SkCanvas* SurfaceFactoryOzone::GetCanvasForWidget(gfx::AcceleratedWidget w) { | 44 SkCanvas* SurfaceFactoryOzone::GetCanvasForWidget(gfx::AcceleratedWidget w) { |
52 return NULL; | 45 return NULL; |
53 } | 46 } |
54 | 47 |
55 const int32* SurfaceFactoryOzone::GetEGLSurfaceProperties( | 48 const int32* SurfaceFactoryOzone::GetEGLSurfaceProperties( |
56 const int32* desired_attributes) { | 49 const int32* desired_attributes) { |
57 return desired_attributes; | 50 return desired_attributes; |
58 } | 51 } |
59 | 52 |
60 } // namespace gfx | 53 } // namespace gfx |
OLD | NEW |