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

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

Issue 1134993003: ozone: Implement zero/one-copy texture for Ozone GBM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to ToT Created 5 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 side-by-side diff with in-line comments
Download patch
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 c92ba44240b58351d82a76fbabd96cab1e87b388..9f4d63d1978d6233068819f27a45c654b4d073f9 100644
--- a/ui/ozone/platform/drm/gpu/gbm_buffer.cc
+++ b/ui/ozone/platform/drm/gpu/gbm_buffer.cc
@@ -53,6 +53,7 @@ scoped_refptr<GbmBuffer> GbmBuffer::CreateBuffer(
TRACE_EVENT2("drm", "GbmBuffer::CreateBuffer", "device",
gbm->device_path().value(), "size", size.ToString());
unsigned flags = GBM_BO_USE_RENDERING;
+ // GBM_BO_USE_SCANOUT is the hint of x-tiling.
if (scanout)
flags |= GBM_BO_USE_SCANOUT;
gbm_bo* bo = gbm_bo_create(gbm->device(), size.width(), size.height(),
@@ -147,4 +148,17 @@ bool GbmPixmap::ShouldApplyScaling(const gfx::Rect& display_bounds,
return pixmap_size != *required_size;
}
+NativePixmap::BufferUsage GbmPixmap::GetBufferUsage() const {
+ return buffer_->GetFramebufferId() ? SCANOUT : MAP;
+}
+
+void* GbmPixmap::Map() {
+ NOTREACHED();
+ return nullptr;
+}
+
+void GbmPixmap::Unmap() {
+ NOTREACHED();
+}
+
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698