Commit 9417366e authored by Jose Dapena Paz's avatar Jose Dapena Paz Committed by Commit Bot

GCC: fix initialization of x11::shm::PutImageRequest

GCC cannot map passing directly curly braces notation for
x11::shm::PutImageRequest parameter of the PutImage call. We
need to initialize it first to an instance and pass it to PutImage.

Bug: 819294
Change-Id: I809c714aafec4978fba8cd35b9850373b6d246ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2394162Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/master@{#806994}
parent 30af507f
......@@ -199,7 +199,7 @@ void X11SoftwareBitmapPresenter::EndPaint(const gfx::Rect& damage_rect) {
if (ShmPoolReady()) {
// TODO(thomasanderson): Investigate direct rendering with DRI3 to avoid any
// unnecessary X11 IPC or buffer copying.
connection_->shm().PutImage({
x11::Shm::PutImageRequest put_image_request{
.drawable = widget_,
.gc = gc_,
.total_width = shm_pool_->CurrentBitmap().width(),
......@@ -215,7 +215,8 @@ void X11SoftwareBitmapPresenter::EndPaint(const gfx::Rect& damage_rect) {
.send_event = enable_multibuffering_,
.shmseg = shm_pool_->CurrentSegment(),
.offset = 0,
});
};
connection_->shm().PutImage(put_image_request);
needs_swap_ = true;
// Flush now to ensure the X server gets the request as early as
// possible to reduce frame-to-frame latency.
......
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