| 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/dri/gbm_surface_factory.h" | 5 #include "ui/ozone/platform/dri/gbm_surface_factory.h" |
| 6 | 6 |
| 7 #include <gbm.h> | 7 #include <gbm.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 screen_manager_ = screen_manager; | 84 screen_manager_ = screen_manager; |
| 85 window_manager_ = window_manager; | 85 window_manager_ = window_manager; |
| 86 } | 86 } |
| 87 | 87 |
| 88 intptr_t GbmSurfaceFactory::GetNativeDisplay() { | 88 intptr_t GbmSurfaceFactory::GetNativeDisplay() { |
| 89 DCHECK(state_ == INITIALIZED); | 89 DCHECK(state_ == INITIALIZED); |
| 90 return reinterpret_cast<intptr_t>(device_); | 90 return reinterpret_cast<intptr_t>(device_); |
| 91 } | 91 } |
| 92 | 92 |
| 93 const int32* GbmSurfaceFactory::GetEGLSurfaceProperties( | 93 const int32* GbmSurfaceFactory::GetEGLSurfaceProperties( |
| 94 const int32* desired_list) { | 94 const int32* desired_list, |
| 95 SurfaceOzoneEGL* surface) { |
| 95 static const int32 kConfigAttribs[] = { | 96 static const int32 kConfigAttribs[] = { |
| 96 EGL_BUFFER_SIZE, 32, | 97 EGL_BUFFER_SIZE, 32, |
| 97 EGL_ALPHA_SIZE, 8, | 98 EGL_ALPHA_SIZE, 8, |
| 98 EGL_BLUE_SIZE, 8, | 99 EGL_BLUE_SIZE, 8, |
| 99 EGL_GREEN_SIZE, 8, | 100 EGL_GREEN_SIZE, 8, |
| 100 EGL_RED_SIZE, 8, | 101 EGL_RED_SIZE, 8, |
| 101 EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, | 102 EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, |
| 102 EGL_SURFACE_TYPE, EGL_WINDOW_BIT, | 103 EGL_SURFACE_TYPE, EGL_WINDOW_BIT, |
| 103 EGL_NONE | 104 EGL_NONE |
| 104 }; | 105 }; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 scoped_ptr<DriWindowDelegate> delegate(new DriWindowDelegateImpl( | 210 scoped_ptr<DriWindowDelegate> delegate(new DriWindowDelegateImpl( |
| 210 widget, drm_, window_manager_, screen_manager_)); | 211 widget, drm_, window_manager_, screen_manager_)); |
| 211 delegate->Initialize(); | 212 delegate->Initialize(); |
| 212 window_manager_->AddWindowDelegate(widget, delegate.Pass()); | 213 window_manager_->AddWindowDelegate(widget, delegate.Pass()); |
| 213 } | 214 } |
| 214 | 215 |
| 215 return window_manager_->GetWindowDelegate(widget); | 216 return window_manager_->GetWindowDelegate(widget); |
| 216 } | 217 } |
| 217 | 218 |
| 218 } // namespace ui | 219 } // namespace ui |
| OLD | NEW |