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

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

Issue 2110213002: Revert of Add format modifier IDs for EGL_EXT_image_dma_buf_import extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 const gfx::Size& size, 103 const gfx::Size& size,
104 gfx::BufferFormat format, 104 gfx::BufferFormat format,
105 gfx::BufferUsage usage, 105 gfx::BufferUsage usage,
106 scoped_refptr<GbmBuffer>* buffer) { 106 scoped_refptr<GbmBuffer>* buffer) {
107 scoped_refptr<GbmDevice> gbm = 107 scoped_refptr<GbmDevice> gbm =
108 static_cast<GbmDevice*>(device_manager_->GetDrmDevice(widget).get()); 108 static_cast<GbmDevice*>(device_manager_->GetDrmDevice(widget).get());
109 DCHECK(gbm); 109 DCHECK(gbm);
110 *buffer = GbmBuffer::CreateBuffer(gbm, format, size, usage); 110 *buffer = GbmBuffer::CreateBuffer(gbm, format, size, usage);
111 } 111 }
112 112
113 void DrmThread::CreateBufferFromFds( 113 void DrmThread::CreateBufferFromFds(const gfx::Size& size,
114 const gfx::Size& size, 114 gfx::BufferFormat format,
115 gfx::BufferFormat format, 115 std::vector<base::ScopedFD>&& fds,
116 std::vector<base::ScopedFD>&& fds, 116 std::vector<int> strides,
117 const std::vector<gfx::NativePixmapPlane>& planes, 117 std::vector<int> offsets,
118 scoped_refptr<GbmBuffer>* buffer) { 118 scoped_refptr<GbmBuffer>* buffer) {
119 scoped_refptr<GbmDevice> gbm = 119 scoped_refptr<GbmDevice> gbm =
120 static_cast<GbmDevice*>(device_manager_->GetPrimaryDrmDevice().get()); 120 static_cast<GbmDevice*>(device_manager_->GetPrimaryDrmDevice().get());
121 DCHECK(gbm); 121 DCHECK(gbm);
122 *buffer = 122 *buffer = GbmBuffer::CreateBufferFromFds(gbm, format, size, std::move(fds),
123 GbmBuffer::CreateBufferFromFds(gbm, format, size, std::move(fds), planes); 123 strides, offsets);
124 } 124 }
125 125
126 void DrmThread::GetScanoutFormats( 126 void DrmThread::GetScanoutFormats(
127 gfx::AcceleratedWidget widget, 127 gfx::AcceleratedWidget widget,
128 std::vector<gfx::BufferFormat>* scanout_formats) { 128 std::vector<gfx::BufferFormat>* scanout_formats) {
129 display_manager_->GetScanoutFormats(widget, scanout_formats); 129 display_manager_->GetScanoutFormats(widget, scanout_formats);
130 } 130 }
131 131
132 void DrmThread::SchedulePageFlip(gfx::AcceleratedWidget widget, 132 void DrmThread::SchedulePageFlip(gfx::AcceleratedWidget widget,
133 const std::vector<OverlayPlane>& planes, 133 const std::vector<OverlayPlane>& planes,
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 void DrmThread::SetColorCorrection( 247 void DrmThread::SetColorCorrection(
248 int64_t display_id, 248 int64_t display_id,
249 const std::vector<GammaRampRGBEntry>& degamma_lut, 249 const std::vector<GammaRampRGBEntry>& degamma_lut,
250 const std::vector<GammaRampRGBEntry>& gamma_lut, 250 const std::vector<GammaRampRGBEntry>& gamma_lut,
251 const std::vector<float>& correction_matrix) { 251 const std::vector<float>& correction_matrix) {
252 display_manager_->SetColorCorrection(display_id, degamma_lut, gamma_lut, 252 display_manager_->SetColorCorrection(display_id, degamma_lut, gamma_lut,
253 correction_matrix); 253 correction_matrix);
254 } 254 }
255 255
256 } // namespace ui 256 } // 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