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

Side by Side Diff: gpu/ipc/common/surface_handle.h

Issue 2364633003: color: Set GpuMemoryBuffer color spaces for Canvas (Closed)
Patch Set: Fix windows build Created 4 years, 2 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
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 GPU_IPC_COMMON_SURFACE_HANDLE_H_ 5 #ifndef GPU_IPC_COMMON_SURFACE_HANDLE_H_
6 #define GPU_IPC_COMMON_SURFACE_HANDLE_H_ 6 #define GPU_IPC_COMMON_SURFACE_HANDLE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 11 matching lines...) Expand all
22 22
23 // On Windows, Linux and Chrome OS, we can use a AcceleratedWidget across 23 // On Windows, Linux and Chrome OS, we can use a AcceleratedWidget across
24 // processes, so SurfaceHandle is exactly that. 24 // processes, so SurfaceHandle is exactly that.
25 // On Mac and Android, there is no type we can directly access across processes, 25 // On Mac and Android, there is no type we can directly access across processes,
26 // so we go through the GpuSurfaceTracker, and SurfaceHandle is a (scalar) 26 // so we go through the GpuSurfaceTracker, and SurfaceHandle is a (scalar)
27 // handle generated by that. 27 // handle generated by that.
28 // On NaCl, we don't have native surfaces per se, but we need SurfaceHandle to 28 // On NaCl, we don't have native surfaces per se, but we need SurfaceHandle to
29 // be defined, because some APIs that use it are referenced there. 29 // be defined, because some APIs that use it are referenced there.
30 #if defined(GPU_SURFACE_HANDLE_IS_ACCELERATED_WINDOW) 30 #if defined(GPU_SURFACE_HANDLE_IS_ACCELERATED_WINDOW)
31 using SurfaceHandle = gfx::AcceleratedWidget; 31 using SurfaceHandle = gfx::AcceleratedWidget;
32 const SurfaceHandle kNullSurfaceHandle = gfx::kNullAcceleratedWidget; 32 #if defined(OS_WIN)
33 const SurfaceHandle kNullSurfaceHandle = NULL;
ccameron 2016/09/28 19:16:27 win-clang doesn't allow this definition in a heade
dcheng 2016/09/28 20:32:43 Can we just make it a constexpr? That should get r
34 #else
35 const SurfaceHandle kNullSurfaceHandle = 0;
36 #endif
33 #elif defined(OS_MACOSX) || defined(OS_ANDROID) || defined(OS_NACL) 37 #elif defined(OS_MACOSX) || defined(OS_ANDROID) || defined(OS_NACL)
34 using SurfaceHandle = int32_t; 38 using SurfaceHandle = int32_t;
35 const SurfaceHandle kNullSurfaceHandle = 0; 39 const SurfaceHandle kNullSurfaceHandle = 0;
36 #else 40 #else
37 #error Platform not supported. 41 #error Platform not supported.
38 #endif 42 #endif
39 43
40 } // namespace gpu 44 } // namespace gpu
41 45
42 #endif // GPU_IPC_COMMON_SURFACE_HANDLE_H_ 46 #endif // GPU_IPC_COMMON_SURFACE_HANDLE_H_
OLDNEW
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.cc ('k') | third_party/WebKit/Source/platform/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698