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/ozone/surface_ozone.h" |
11 | 11 |
12 namespace gfx { | 12 namespace gfx { |
13 | 13 |
14 // static | 14 // static |
15 SurfaceFactoryOzone* SurfaceFactoryOzone::impl_ = NULL; | 15 SurfaceFactoryOzone* SurfaceFactoryOzone::impl_ = NULL; |
16 | 16 |
17 SurfaceFactoryOzone::SurfaceFactoryOzone() { | 17 SurfaceFactoryOzone::SurfaceFactoryOzone() { |
18 } | 18 } |
19 | 19 |
20 SurfaceFactoryOzone::~SurfaceFactoryOzone() { | 20 SurfaceFactoryOzone::~SurfaceFactoryOzone() { |
21 } | 21 } |
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 intptr_t SurfaceFactoryOzone::GetNativeDisplay() { | 32 intptr_t SurfaceFactoryOzone::GetNativeDisplay() { |
33 return 0; | 33 return 0; |
34 } | 34 } |
35 | 35 |
36 bool SurfaceFactoryOzone::SchedulePageFlip(gfx::AcceleratedWidget w) { | 36 scoped_ptr<SurfaceOzone> SurfaceFactoryOzone::CreateSurfaceForWidget( |
37 return true; | 37 gfx::AcceleratedWidget widget) { |
38 } | 38 NOTIMPLEMENTED(); |
39 | 39 return scoped_ptr<SurfaceOzone>(); |
40 SkCanvas* SurfaceFactoryOzone::GetCanvasForWidget(gfx::AcceleratedWidget w) { | |
41 return NULL; | |
42 } | 40 } |
43 | 41 |
44 const int32* SurfaceFactoryOzone::GetEGLSurfaceProperties( | 42 const int32* SurfaceFactoryOzone::GetEGLSurfaceProperties( |
45 const int32* desired_attributes) { | 43 const int32* desired_attributes) { |
46 return desired_attributes; | 44 return desired_attributes; |
47 } | 45 } |
48 | 46 |
49 | 47 |
50 gfx::OverlayCandidatesOzone* SurfaceFactoryOzone::GetOverlayCandidates( | 48 gfx::OverlayCandidatesOzone* SurfaceFactoryOzone::GetOverlayCandidates( |
51 gfx::AcceleratedWidget w) { | 49 gfx::AcceleratedWidget w) { |
52 return NULL; | 50 return NULL; |
53 } | 51 } |
54 | 52 |
55 void SurfaceFactoryOzone::ScheduleOverlayPlane(gfx::AcceleratedWidget w, | 53 void SurfaceFactoryOzone::ScheduleOverlayPlane(gfx::AcceleratedWidget w, |
56 int plane_z_order, | 54 int plane_z_order, |
57 OverlayTransform plane_transform, | 55 OverlayTransform plane_transform, |
58 gfx::NativeBufferOzone buffer, | 56 gfx::NativeBufferOzone buffer, |
59 const gfx::Rect& display_bounds, | 57 const gfx::Rect& display_bounds, |
60 gfx::RectF crop_rect) { | 58 gfx::RectF crop_rect) { |
61 NOTREACHED(); | 59 NOTREACHED(); |
62 } | 60 } |
63 | 61 |
64 gfx::NativeBufferOzone SurfaceFactoryOzone::CreateNativeBuffer( | 62 gfx::NativeBufferOzone SurfaceFactoryOzone::CreateNativeBuffer( |
65 gfx::Size size, | 63 gfx::Size size, |
66 BufferFormat format) { | 64 BufferFormat format) { |
67 return 0; | 65 return 0; |
68 } | 66 } |
69 | 67 |
70 } // namespace gfx | 68 } // namespace gfx |
OLD | NEW |