| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/gpu/gbm_surfaceless.h" | 5 #include "ui/ozone/platform/drm/gpu/gbm_surfaceless.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 HasEGLExtension("EGL_EXT_image_flush_external")), | 41 HasEGLExtension("EGL_EXT_image_flush_external")), |
| 42 weak_factory_(this) { | 42 weak_factory_(this) { |
| 43 surface_factory_->RegisterSurface(window_->widget(), this); | 43 surface_factory_->RegisterSurface(window_->widget(), this); |
| 44 unsubmitted_frames_.push_back(new PendingFrame()); | 44 unsubmitted_frames_.push_back(new PendingFrame()); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void GbmSurfaceless::QueueOverlayPlane(const OverlayPlane& plane) { | 47 void GbmSurfaceless::QueueOverlayPlane(const OverlayPlane& plane) { |
| 48 planes_.push_back(plane); | 48 planes_.push_back(plane); |
| 49 } | 49 } |
| 50 | 50 |
| 51 bool GbmSurfaceless::Initialize(gl::GLSurface::Format format) { | 51 bool GbmSurfaceless::Initialize(gl::GLSurfaceFormat format) { |
| 52 if (!SurfacelessEGL::Initialize(format)) | 52 if (!SurfacelessEGL::Initialize(format)) |
| 53 return false; | 53 return false; |
| 54 vsync_provider_ = base::MakeUnique<DrmVSyncProvider>(window_.get()); | 54 vsync_provider_ = base::MakeUnique<DrmVSyncProvider>(window_.get()); |
| 55 if (!vsync_provider_) | 55 if (!vsync_provider_) |
| 56 return false; | 56 return false; |
| 57 return true; | 57 return true; |
| 58 } | 58 } |
| 59 | 59 |
| 60 gfx::SwapResult GbmSurfaceless::SwapBuffers() { | 60 gfx::SwapResult GbmSurfaceless::SwapBuffers() { |
| 61 NOTREACHED(); | 61 NOTREACHED(); |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 } | 245 } |
| 246 | 246 |
| 247 SubmitFrame(); | 247 SubmitFrame(); |
| 248 } | 248 } |
| 249 | 249 |
| 250 bool GbmSurfaceless::IsUniversalDisplayLinkDevice() { | 250 bool GbmSurfaceless::IsUniversalDisplayLinkDevice() { |
| 251 return planes_.empty() ? false : planes_[0].buffer->RequiresGlFinish(); | 251 return planes_.empty() ? false : planes_[0].buffer->RequiresGlFinish(); |
| 252 } | 252 } |
| 253 | 253 |
| 254 } // namespace ui | 254 } // namespace ui |
| OLD | NEW |