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

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

Issue 2213273002: ozone: Consolidate primary plane format. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment on a single line. Created 4 years, 4 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/hardware_display_plane.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/screen_manager.cc
diff --git a/ui/ozone/platform/drm/gpu/screen_manager.cc b/ui/ozone/platform/drm/gpu/screen_manager.cc
index 37e4afcb3c214df261a4eecfda44a49c0d91daad..6908b123462dc32890f15504bc6bbc417cf87a5d 100644
--- a/ui/ozone/platform/drm/gpu/screen_manager.cc
+++ b/ui/ozone/platform/drm/gpu/screen_manager.cc
@@ -10,6 +10,7 @@
#include "base/memory/ptr_util.h"
#include "third_party/skia/include/core/SkCanvas.h"
+#include "ui/display/types/display_snapshot.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
@@ -341,9 +342,10 @@ OverlayPlane ScreenManager::GetModesetBuffer(
return *primary;
}
+ gfx::BufferFormat format = ui::DisplaySnapshot::PrimaryFormat();
scoped_refptr<DrmDevice> drm = controller->GetAllocationDrmDevice();
- scoped_refptr<ScanoutBuffer> buffer = buffer_generator_->Create(
- drm, gfx::BufferFormat::BGRA_8888, bounds.size());
+ scoped_refptr<ScanoutBuffer> buffer =
+ buffer_generator_->Create(drm, format, bounds.size());
if (!buffer) {
LOG(ERROR) << "Failed to create scanout buffer";
return OverlayPlane(nullptr, 0, gfx::OVERLAY_TRANSFORM_INVALID, gfx::Rect(),
« no previous file with comments | « ui/ozone/platform/drm/gpu/hardware_display_plane.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698