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

Unified Diff: ui/ozone/platform/drm/gpu/gbm_buffer.cc

Issue 2361023003: Revert of Add ClientNativePixmap multi-planar support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@client-native-pixmap-dmabug-multiple-planes
Patch Set: Created 4 years, 3 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.h ('k') | ui/ozone/public/client_native_pixmap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/gbm_buffer.cc
diff --git a/ui/ozone/platform/drm/gpu/gbm_buffer.cc b/ui/ozone/platform/drm/gpu/gbm_buffer.cc
index 0f38ed86f5c3db563aa16a8be5aa5de5872253b5..8b9a893d2da7e1dad59abeb9f9721d3d319e6396 100644
--- a/ui/ozone/platform/drm/gpu/gbm_buffer.cc
+++ b/ui/ozone/platform/drm/gpu/gbm_buffer.cc
@@ -75,11 +75,6 @@
return planes_[index].offset;
}
-size_t GbmBuffer::GetSize(size_t index) const {
- DCHECK_LT(index, planes_.size());
- return planes_[index].size;
-}
-
uint64_t GbmBuffer::GetFormatModifier(size_t index) const {
DCHECK_LT(index, planes_.size());
return planes_[index].modifier;
@@ -128,20 +123,16 @@
// kept open for the lifetime of the buffer.
base::ScopedFD fd(gbm_bo_get_plane_fd(bo, i));
- // TODO(dcastagna): support multiple fds.
- // crbug.com/642410
- if (!i) {
- if (!fd.is_valid()) {
- PLOG(ERROR) << "Failed to export buffer to dma_buf";
- gbm_bo_destroy(bo);
- return nullptr;
- }
- fds.emplace_back(std::move(fd));
+ if (!fd.is_valid()) {
+ PLOG(ERROR) << "Failed to export buffer to dma_buf";
+ gbm_bo_destroy(bo);
+ return nullptr;
}
-
- planes.emplace_back(
- gbm_bo_get_plane_stride(bo, i), gbm_bo_get_plane_offset(bo, i),
- gbm_bo_get_plane_size(bo, i), gbm_bo_get_plane_format_modifier(bo, i));
+ fds.emplace_back(std::move(fd));
+
+ planes.emplace_back(gbm_bo_get_plane_stride(bo, i),
+ gbm_bo_get_plane_offset(bo, i),
+ gbm_bo_get_plane_format_modifier(bo, i));
}
scoped_refptr<GbmBuffer> buffer(new GbmBuffer(
gbm, bo, format, usage, std::move(fds), size, std::move(planes)));
@@ -225,7 +216,6 @@
base::FileDescriptor(scoped_fd.release(), true /* auto_close */));
}
handle.planes.emplace_back(buffer_->GetStride(i), buffer_->GetOffset(i),
- buffer_->GetSize(i),
buffer_->GetFormatModifier(i));
}
return handle;
« no previous file with comments | « ui/ozone/platform/drm/gpu/gbm_buffer.h ('k') | ui/ozone/public/client_native_pixmap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698