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

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

Issue 1598573002: Propagate supported scanout formats from driver to SurfaceFactoryOzone. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/drm_thread.h ('k') | ui/ozone/platform/drm/gpu/drm_thread_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/drm_thread.h" 5 #include "ui/ozone/platform/drm/gpu/drm_thread.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 const gfx::Size& size, 99 const gfx::Size& size,
100 gfx::BufferFormat format, 100 gfx::BufferFormat format,
101 gfx::BufferUsage usage, 101 gfx::BufferUsage usage,
102 scoped_refptr<GbmBuffer>* buffer) { 102 scoped_refptr<GbmBuffer>* buffer) {
103 scoped_refptr<GbmDevice> gbm = 103 scoped_refptr<GbmDevice> gbm =
104 static_cast<GbmDevice*>(device_manager_->GetDrmDevice(widget).get()); 104 static_cast<GbmDevice*>(device_manager_->GetDrmDevice(widget).get());
105 DCHECK(gbm); 105 DCHECK(gbm);
106 *buffer = GbmBuffer::CreateBuffer(gbm, format, size, usage); 106 *buffer = GbmBuffer::CreateBuffer(gbm, format, size, usage);
107 } 107 }
108 108
109 void DrmThread::GetScanoutFormats(
110 gfx::AcceleratedWidget widget,
111 std::vector<gfx::BufferFormat>* scanout_formats) {
112 display_manager_->GetScanoutFormats(widget, scanout_formats);
113 }
114
109 void DrmThread::SchedulePageFlip(gfx::AcceleratedWidget widget, 115 void DrmThread::SchedulePageFlip(gfx::AcceleratedWidget widget,
110 const std::vector<OverlayPlane>& planes, 116 const std::vector<OverlayPlane>& planes,
111 const SwapCompletionCallback& callback) { 117 const SwapCompletionCallback& callback) {
112 DrmWindow* window = screen_manager_->GetWindow(widget); 118 DrmWindow* window = screen_manager_->GetWindow(widget);
113 if (window) 119 if (window)
114 window->SchedulePageFlip(planes, callback); 120 window->SchedulePageFlip(planes, callback);
115 else 121 else
116 callback.Run(gfx::SwapResult::SWAP_ACK); 122 callback.Run(gfx::SwapResult::SWAP_ACK);
117 } 123 }
118 124
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 const base::Callback<void(int64_t, bool)>& callback) { 226 const base::Callback<void(int64_t, bool)>& callback) {
221 callback.Run(display_id, display_manager_->SetHDCPState(display_id, state)); 227 callback.Run(display_id, display_manager_->SetHDCPState(display_id, state));
222 } 228 }
223 229
224 void DrmThread::SetGammaRamp(int64_t id, 230 void DrmThread::SetGammaRamp(int64_t id,
225 const std::vector<GammaRampRGBEntry>& lut) { 231 const std::vector<GammaRampRGBEntry>& lut) {
226 display_manager_->SetGammaRamp(id, lut); 232 display_manager_->SetGammaRamp(id, lut);
227 } 233 }
228 234
229 } // namespace ui 235 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_thread.h ('k') | ui/ozone/platform/drm/gpu/drm_thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698