| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 153 |
| 154 scoped_refptr<GbmPixmap> pixmap(new GbmPixmap(buffer)); | 154 scoped_refptr<GbmPixmap> pixmap(new GbmPixmap(buffer)); |
| 155 if (!pixmap->Initialize(drm_)) | 155 if (!pixmap->Initialize(drm_)) |
| 156 return NULL; | 156 return NULL; |
| 157 | 157 |
| 158 return pixmap; | 158 return pixmap; |
| 159 } | 159 } |
| 160 | 160 |
| 161 OverlayCandidatesOzone* GbmSurfaceFactory::GetOverlayCandidates( | 161 OverlayCandidatesOzone* GbmSurfaceFactory::GetOverlayCandidates( |
| 162 gfx::AcceleratedWidget w) { | 162 gfx::AcceleratedWidget w) { |
| 163 if (CommandLine::ForCurrentProcess()->HasSwitch( | 163 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 164 switches::kOzoneTestSingleOverlaySupport)) | 164 switches::kOzoneTestSingleOverlaySupport)) |
| 165 return new SingleOverlay(); | 165 return new SingleOverlay(); |
| 166 return NULL; | 166 return NULL; |
| 167 } | 167 } |
| 168 | 168 |
| 169 bool GbmSurfaceFactory::ScheduleOverlayPlane( | 169 bool GbmSurfaceFactory::ScheduleOverlayPlane( |
| 170 gfx::AcceleratedWidget widget, | 170 gfx::AcceleratedWidget widget, |
| 171 int plane_z_order, | 171 int plane_z_order, |
| 172 gfx::OverlayTransform plane_transform, | 172 gfx::OverlayTransform plane_transform, |
| 173 scoped_refptr<NativePixmap> buffer, | 173 scoped_refptr<NativePixmap> buffer, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 scoped_ptr<DriWindowDelegate> delegate(new DriWindowDelegateImpl( | 212 scoped_ptr<DriWindowDelegate> delegate(new DriWindowDelegateImpl( |
| 213 widget, drm_, window_manager_, screen_manager_)); | 213 widget, drm_, window_manager_, screen_manager_)); |
| 214 delegate->Initialize(); | 214 delegate->Initialize(); |
| 215 window_manager_->AddWindowDelegate(widget, delegate.Pass()); | 215 window_manager_->AddWindowDelegate(widget, delegate.Pass()); |
| 216 } | 216 } |
| 217 | 217 |
| 218 return window_manager_->GetWindowDelegate(widget); | 218 return window_manager_->GetWindowDelegate(widget); |
| 219 } | 219 } |
| 220 | 220 |
| 221 } // namespace ui | 221 } // namespace ui |
| OLD | NEW |