Commit 5b5e8a88 authored by Sean McAllister's avatar Sean McAllister Committed by Commit Bot

Refactor OS_LINUX preprocessor directive for LaCrOS effort.

Currently, ChromeOS defines the OS_LINUX directive as well as
OS_CHROMEOS.  We're working to separate these two, so we're
making the fact that OS_LINUX == OS_LINUX || OS_CHROMEOS
explicit.

This is changes for /gpu/ipc/common/gpu_memory_buffer_support.cc

This CL was uploaded by git cl split.

R=dcastagna@chromium.org

Bug: 1110266
Change-Id: I705cdbdfdafafc7a8aeb77a5c9f6ea0a4e171ba5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2371297Reviewed-by: default avatarDaniele Castagna <dcastagna@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Sean McAllister <smcallis@google.com>
Cr-Commit-Position: refs/heads/master@{#801976}
parent 6c403709
......@@ -16,7 +16,7 @@
#include "gpu/ipc/common/gpu_memory_buffer_impl_io_surface.h"
#endif
#if defined(OS_LINUX)
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
#include "ui/gfx/client_native_pixmap_factory.h"
#include "ui/gfx/linux/client_native_pixmap_factory_dmabuf.h"
#endif
......@@ -26,7 +26,7 @@
#include "ui/ozone/public/ozone_platform.h"
#endif
#if defined(USE_OZONE) || defined(OS_LINUX)
#if defined(USE_OZONE) || defined(OS_LINUX) || defined(OS_CHROMEOS)
#include "gpu/ipc/common/gpu_memory_buffer_impl_native_pixmap.h"
#endif
......@@ -52,7 +52,7 @@ GpuMemoryBufferSupport::GpuMemoryBufferSupport() {
return;
}
#endif
#if defined(OS_LINUX)
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
client_native_pixmap_factory_.reset(
gfx::CreateClientNativePixmapFactoryDmabuf());
#endif
......@@ -66,7 +66,7 @@ GpuMemoryBufferSupport::GetNativeGpuMemoryBufferType() {
return gfx::IO_SURFACE_BUFFER;
#elif defined(OS_ANDROID)
return gfx::ANDROID_HARDWARE_BUFFER;
#elif defined(OS_LINUX) || defined(USE_OZONE)
#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(USE_OZONE)
return gfx::NATIVE_PIXMAP;
#elif defined(OS_WIN)
return gfx::DXGI_SHARED_HANDLE;
......@@ -194,7 +194,7 @@ GpuMemoryBufferSupport::CreateGpuMemoryBufferImplFromHandle(
return GpuMemoryBufferImplIOSurface::CreateFromHandle(
std::move(handle), size, format, usage, std::move(callback));
#endif
#if defined(OS_LINUX) || defined(USE_OZONE)
#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(USE_OZONE)
case gfx::NATIVE_PIXMAP:
return GpuMemoryBufferImplNativePixmap::CreateFromHandle(
client_native_pixmap_factory(), std::move(handle), size, format,
......
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