Commit 767d3eab authored by Maksim Sisov's avatar Maksim Sisov Committed by Commit Bot

[ozone/wayland] Improve logging when creating gbm buffer.

Change the log to present more meaningful information about
what buffer format and usage were used to create a gbm buffer.

Also, remove the size from the TRACE as it is not really
needed.

Bug: 939794
Change-Id: I04fbbfa17b5eedd0fd9f5de0a9088b3e7f79fc2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1511461Reviewed-by: default avatarRobert Kroeger <rjkroege@chromium.org>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Cr-Commit-Position: refs/heads/master@{#664110}
parent 7e906a68
......@@ -15,6 +15,7 @@
#include "base/strings/stringprintf.h"
#include "base/trace_event/trace_event.h"
#include "ui/gfx/buffer_format_util.h"
#include "ui/gfx/buffer_usage_util.h"
#include "ui/gfx/geometry/size_conversions.h"
#include "ui/gfx/native_pixmap_handle.h"
#include "ui/ozone/common/linux/drm_util_linux.h"
......@@ -42,8 +43,7 @@ GbmPixmapWayland::~GbmPixmapWayland() {
bool GbmPixmapWayland::InitializeBuffer(gfx::Size size,
gfx::BufferFormat format,
gfx::BufferUsage usage) {
TRACE_EVENT1("wayland", "GbmPixmapWayland::InitializeBuffer", "size",
size.ToString());
TRACE_EVENT0("wayland", "GbmPixmapWayland::InitializeBuffer");
if (!connection_->gbm_device())
return false;
......@@ -76,7 +76,9 @@ bool GbmPixmapWayland::InitializeBuffer(gfx::Size size,
const uint32_t fourcc_format = GetFourCCFormatFromBufferFormat(format);
gbm_bo_ = connection_->gbm_device()->CreateBuffer(fourcc_format, size, flags);
if (!gbm_bo_) {
LOG(FATAL) << "Cannot create bo";
LOG(ERROR) << "Cannot create bo with format= "
<< gfx::BufferFormatToString(format) << " and usage "
<< gfx::BufferUsageToString(usage);
return false;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment