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

Side by Side Diff: ui/gfx/mojo/buffer_types_struct_traits.h

Issue 2683593006: Use OS_LINUX instead of USE_OZONE in ui/gfx/ when possible (Closed)
Patch Set: Rebase Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « ui/gfx/ipc/gfx_param_traits_macros.h ('k') | ui/gfx/mojo/buffer_types_struct_traits.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_MOJO_BUFFER_TYPES_STRUCT_TRAITS_H_ 5 #ifndef UI_GFX_MOJO_BUFFER_TYPES_STRUCT_TRAITS_H_
6 #define UI_GFX_MOJO_BUFFER_TYPES_STRUCT_TRAITS_H_ 6 #define UI_GFX_MOJO_BUFFER_TYPES_STRUCT_TRAITS_H_
7 7
8 #include "ui/gfx/buffer_types.h" 8 #include "ui/gfx/buffer_types.h"
9 #include "ui/gfx/mojo/buffer_types.mojom.h" 9 #include "ui/gfx/mojo/buffer_types.mojom.h"
10 10
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 template <> 228 template <>
229 struct StructTraits<gfx::mojom::NativePixmapHandleDataView, 229 struct StructTraits<gfx::mojom::NativePixmapHandleDataView,
230 gfx::NativePixmapHandle> { 230 gfx::NativePixmapHandle> {
231 using PixmapHandleFdList = std::vector<mojo::ScopedHandle>; 231 using PixmapHandleFdList = std::vector<mojo::ScopedHandle>;
232 232
233 static void* SetUpContext(const gfx::NativePixmapHandle& handle); 233 static void* SetUpContext(const gfx::NativePixmapHandle& handle);
234 static void TearDownContext(const gfx::NativePixmapHandle& handle, 234 static void TearDownContext(const gfx::NativePixmapHandle& handle,
235 void* context); 235 void* context);
236 236
237 static bool IsNull(const gfx::NativePixmapHandle& handle) { 237 static bool IsNull(const gfx::NativePixmapHandle& handle) {
238 #if defined(USE_OZONE) 238 #if defined(OS_LINUX)
239 return false; 239 return false;
240 #else 240 #else
241 // NativePixmapHandle are not used on non-ozone platforms. 241 // NativePixmapHandle are not used on non-linux platforms.
242 return true; 242 return true;
243 #endif 243 #endif
244 } 244 }
245 static PixmapHandleFdList fds(const gfx::NativePixmapHandle& pixmap_handle, 245 static PixmapHandleFdList fds(const gfx::NativePixmapHandle& pixmap_handle,
246 void* context); 246 void* context);
247 247
248 static const std::vector<gfx::NativePixmapPlane>& planes( 248 static const std::vector<gfx::NativePixmapPlane>& planes(
249 const gfx::NativePixmapHandle& pixmap_handle) { 249 const gfx::NativePixmapHandle& pixmap_handle) {
250 return pixmap_handle.planes; 250 return pixmap_handle.planes;
251 } 251 }
(...skipping 23 matching lines...) Expand all
275 static const gfx::NativePixmapHandle& native_pixmap_handle( 275 static const gfx::NativePixmapHandle& native_pixmap_handle(
276 const gfx::GpuMemoryBufferHandle& handle); 276 const gfx::GpuMemoryBufferHandle& handle);
277 static mojo::ScopedHandle mach_port(const gfx::GpuMemoryBufferHandle& handle); 277 static mojo::ScopedHandle mach_port(const gfx::GpuMemoryBufferHandle& handle);
278 static bool Read(gfx::mojom::GpuMemoryBufferHandleDataView data, 278 static bool Read(gfx::mojom::GpuMemoryBufferHandleDataView data,
279 gfx::GpuMemoryBufferHandle* handle); 279 gfx::GpuMemoryBufferHandle* handle);
280 }; 280 };
281 281
282 } // namespace mojo 282 } // namespace mojo
283 283
284 #endif // UI_GFX_MOJO_BUFFER_TYPES_STRUCT_TRAITS_H_ 284 #endif // UI_GFX_MOJO_BUFFER_TYPES_STRUCT_TRAITS_H_
OLDNEW
« no previous file with comments | « ui/gfx/ipc/gfx_param_traits_macros.h ('k') | ui/gfx/mojo/buffer_types_struct_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698