Commit 6f2fbd46 authored by Julien Isorce's avatar Julien Isorce Committed by Commit Bot

Fix build for VaapiTFPPicture

Introduced recently by https://chromium-review.googlesource.com/756711
  "Wrap X11 headers in ui/gfx/x/x11.h"

Build error 1:
  media/gpu/vaapi/vaapi_tfp_picture.cc:
    error use of undeclared identifier 'RootWindow'; did you mean 'XRootWindow'?
      x_pixmap_ = XCreatePixmap(x_display_, RootWindow(x_display_, screen),

Build error 2:
  In file included from ../../media/gpu/vaapi_video_decode_accelerator_unittest.cc:14:
  error: expected unqualified-id
    /usr/include/X11/X.h:115:30: note: expanded from macro 'None'

Bug: 782184
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I1b1ecf39baee160e1778e5cdd596426a63e4e054
Reviewed-on: https://chromium-review.googlesource.com/788111Reviewed-by: default avatarDan Erat <derat@chromium.org>
Reviewed-by: default avatarDan Sanders <sandersd@chromium.org>
Commit-Queue: Julien Isorce <julien.isorce@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520205}
parent 0647aba1
......@@ -4,8 +4,6 @@
#include "media/gpu/vaapi/vaapi_tfp_picture.h"
#include <X11/Xlib.h>
#include "media/gpu/va_surface.h"
#include "media/gpu/vaapi_wrapper.h"
#include "ui/gfx/x/x11_types.h"
......@@ -81,10 +79,10 @@ bool VaapiTFPPicture::Allocate(gfx::BufferFormat format) {
XWindowAttributes win_attr;
int screen = DefaultScreen(x_display_);
XGetWindowAttributes(x_display_, RootWindow(x_display_, screen), &win_attr);
XGetWindowAttributes(x_display_, XRootWindow(x_display_, screen), &win_attr);
// TODO(posciak): pass the depth required by libva, not the RootWindow's
// depth
x_pixmap_ = XCreatePixmap(x_display_, RootWindow(x_display_, screen),
x_pixmap_ = XCreatePixmap(x_display_, XRootWindow(x_display_, screen),
size_.width(), size_.height(), win_attr.depth);
if (!x_pixmap_) {
DLOG(ERROR) << "Failed creating an X Pixmap for TFP";
......
......@@ -33,6 +33,7 @@
#include "ui/gl/gl_implementation.h"
#if defined(USE_X11)
#include <va/va_x11.h>
#include "ui/gfx/x/x11_types.h" // nogncheck
#endif
......
......@@ -32,7 +32,7 @@
#include "ui/gfx/geometry/size.h"
#if defined(USE_X11)
#include <va/va_x11.h>
#include "ui/gfx/x/x11.h"
#endif // USE_X11
namespace gfx {
......
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