Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Side by Side Diff: ui/ozone/platform/drm/gpu/gbm_surfaceless.cc

Issue 2616723002: Refactor GL surface format handling (Closed)
Patch Set: Fix copyright notice on new files Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/ozone/platform/drm/gpu/gbm_surfaceless.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/gbm_surfaceless.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698