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

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

Issue 2039813002: 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: Add format modifier IDs for EGL_EXT_image_dma_buf_import extension Created 4 years, 6 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
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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(const gfx::Size& size, 113 void DrmThread::CreateBufferFromFds(const gfx::Size& size,
114 gfx::BufferFormat format, 114 gfx::BufferFormat format,
115 std::vector<base::ScopedFD>&& fds, 115 std::vector<base::ScopedFD>&& fds,
116 std::vector<int> strides, 116 std::vector<gfx::GbmBufferPlane>&& planes,
117 std::vector<int> offsets,
118 scoped_refptr<GbmBuffer>* buffer) { 117 scoped_refptr<GbmBuffer>* buffer) {
119 scoped_refptr<GbmDevice> gbm = 118 scoped_refptr<GbmDevice> gbm =
120 static_cast<GbmDevice*>(device_manager_->GetPrimaryDrmDevice().get()); 119 static_cast<GbmDevice*>(device_manager_->GetPrimaryDrmDevice().get());
121 DCHECK(gbm); 120 DCHECK(gbm);
122 *buffer = GbmBuffer::CreateBufferFromFds(gbm, format, size, std::move(fds), 121 *buffer = GbmBuffer::CreateBufferFromFds(gbm, format, size, std::move(fds),
123 strides, offsets); 122 std::move(planes));
124 } 123 }
125 124
126 void DrmThread::GetScanoutFormats( 125 void DrmThread::GetScanoutFormats(
127 gfx::AcceleratedWidget widget, 126 gfx::AcceleratedWidget widget,
128 std::vector<gfx::BufferFormat>* scanout_formats) { 127 std::vector<gfx::BufferFormat>* scanout_formats) {
129 display_manager_->GetScanoutFormats(widget, scanout_formats); 128 display_manager_->GetScanoutFormats(widget, scanout_formats);
130 } 129 }
131 130
132 void DrmThread::SchedulePageFlip(gfx::AcceleratedWidget widget, 131 void DrmThread::SchedulePageFlip(gfx::AcceleratedWidget widget,
133 const std::vector<OverlayPlane>& planes, 132 const std::vector<OverlayPlane>& planes,
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 void DrmThread::SetColorCorrection( 246 void DrmThread::SetColorCorrection(
248 int64_t display_id, 247 int64_t display_id,
249 const std::vector<GammaRampRGBEntry>& degamma_lut, 248 const std::vector<GammaRampRGBEntry>& degamma_lut,
250 const std::vector<GammaRampRGBEntry>& gamma_lut, 249 const std::vector<GammaRampRGBEntry>& gamma_lut,
251 const std::vector<float>& correction_matrix) { 250 const std::vector<float>& correction_matrix) {
252 display_manager_->SetColorCorrection(display_id, degamma_lut, gamma_lut, 251 display_manager_->SetColorCorrection(display_id, degamma_lut, gamma_lut,
253 correction_matrix); 252 correction_matrix);
254 } 253 }
255 254
256 } // namespace ui 255 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698