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

Unified Diff: ui/ozone/platform/drm/gpu/gbm_surface_factory.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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/drm/gpu/gbm_buffer.cc ('k') | ui/ozone/platform/headless/headless_surface_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/gbm_surface_factory.cc
diff --git a/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc b/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc
index e9c041f1c774aecb92492400c7673577ae4f9412..711ed04702e8cd903d2cadfdaf2c14f5b9598967 100644
--- a/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc
+++ b/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc
@@ -114,9 +114,9 @@
gfx::Size size,
gfx::BufferFormat format,
const gfx::NativePixmapHandle& handle) {
- size_t num_planes = gfx::NumberOfPlanesForBufferFormat(format);
- if (handle.planes.size() != num_planes ||
- (handle.fds.size() != 1 && handle.fds.size() != num_planes)) {
+ size_t planes = gfx::NumberOfPlanesForBufferFormat(format);
+ if (handle.strides_and_offsets.size() != planes ||
+ (handle.fds.size() != 1 && handle.fds.size() != planes)) {
return nullptr;
}
std::vector<base::ScopedFD> scoped_fds;
@@ -124,14 +124,16 @@
scoped_fds.emplace_back(fd.fd);
}
- std::vector<gfx::NativePixmapPlane> planes;
+ std::vector<int> strides;
+ std::vector<int> offsets;
- for (const auto& plane : handle.planes) {
- planes.push_back(plane);
+ for (const auto& stride_and_offset : handle.strides_and_offsets) {
+ strides.push_back(stride_and_offset.first);
+ offsets.push_back(stride_and_offset.second);
}
scoped_refptr<GbmBuffer> buffer = drm_thread_->CreateBufferFromFds(
- size, format, std::move(scoped_fds), planes);
+ size, format, std::move(scoped_fds), strides, offsets);
if (!buffer)
return nullptr;
return make_scoped_refptr(new GbmPixmap(this, buffer));
« no previous file with comments | « ui/ozone/platform/drm/gpu/gbm_buffer.cc ('k') | ui/ozone/platform/headless/headless_surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698