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 #include "ui/ozone/platform/drm/drm_surface_factory.h" | 5 #include "ui/ozone/platform/drm/drm_surface_factory.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 | 8 |
9 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
10 #include "ui/ozone/platform/drm/gpu/drm_surface.h" | 10 #include "ui/ozone/platform/drm/gpu/drm_surface.h" |
11 #include "ui/ozone/platform/drm/gpu/drm_util.h" | 11 #include "ui/ozone/platform/drm/gpu/drm_util.h" |
12 #include "ui/ozone/platform/drm/gpu/drm_window.h" | 12 #include "ui/ozone/platform/drm/gpu/drm_window.h" |
13 #include "ui/ozone/platform/drm/gpu/hardware_display_controller.h" | 13 #include "ui/ozone/platform/drm/gpu/hardware_display_controller.h" |
14 #include "ui/ozone/platform/drm/gpu/screen_manager.h" | 14 #include "ui/ozone/platform/drm/gpu/screen_manager.h" |
15 #include "ui/ozone/public/surface_ozone_canvas.h" | 15 #include "ui/ozone/public/surface_ozone_canvas.h" |
16 | 16 |
17 namespace ui { | 17 namespace ui { |
18 | 18 |
19 DrmSurfaceFactory::DrmSurfaceFactory(ScreenManager* screen_manager) | 19 DrmSurfaceFactory::DrmSurfaceFactory(ScreenManager* screen_manager) |
20 : screen_manager_(screen_manager) { | 20 : screen_manager_(screen_manager) { |
21 } | 21 } |
22 | 22 |
23 DrmSurfaceFactory::~DrmSurfaceFactory() { | 23 DrmSurfaceFactory::~DrmSurfaceFactory() { |
24 } | 24 } |
25 | 25 |
26 scoped_ptr<ui::SurfaceOzoneCanvas> DrmSurfaceFactory::CreateCanvasForWidget( | 26 scoped_ptr<ui::SurfaceOzoneCanvas> DrmSurfaceFactory::CreateCanvasForWidget( |
27 gfx::AcceleratedWidget widget) { | 27 gfx::AcceleratedWidget widget) { |
28 DCHECK(thread_checker_.CalledOnValidThread()); | |
reveman
2015/04/07 13:07:05
ditto. how is this related?
| |
28 return make_scoped_ptr(new DrmSurface(screen_manager_->GetWindow(widget))); | 29 return make_scoped_ptr(new DrmSurface(screen_manager_->GetWindow(widget))); |
29 } | 30 } |
30 | 31 |
31 bool DrmSurfaceFactory::LoadEGLGLES2Bindings( | 32 bool DrmSurfaceFactory::LoadEGLGLES2Bindings( |
32 AddGLLibraryCallback add_gl_library, | 33 AddGLLibraryCallback add_gl_library, |
33 SetGLGetProcAddressProcCallback set_gl_get_proc_address) { | 34 SetGLGetProcAddressProcCallback set_gl_get_proc_address) { |
35 DCHECK(thread_checker_.CalledOnValidThread()); | |
34 return false; | 36 return false; |
35 } | 37 } |
36 | 38 |
37 } // namespace ui | 39 } // namespace ui |
OLD | NEW |