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

Side by Side Diff: ui/gfx/gpu_memory_buffer.h

Issue 1071273002: NotForReview: Implement zero/one-copy texture for ozone freon using Intel DRM Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_GPU_MEMORY_BUFFER_H_ 5 #ifndef UI_GFX_GPU_MEMORY_BUFFER_H_
6 #define UI_GFX_GPU_MEMORY_BUFFER_H_ 6 #define UI_GFX_GPU_MEMORY_BUFFER_H_
7 7
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "ui/gfx/gfx_export.h" 10 #include "ui/gfx/gfx_export.h"
(...skipping 14 matching lines...) Expand all
25 using GpuMemoryBufferId = int32; 25 using GpuMemoryBufferId = int32;
26 26
27 struct GFX_EXPORT GpuMemoryBufferHandle { 27 struct GFX_EXPORT GpuMemoryBufferHandle {
28 GpuMemoryBufferHandle(); 28 GpuMemoryBufferHandle();
29 bool is_null() const { return type == EMPTY_BUFFER; } 29 bool is_null() const { return type == EMPTY_BUFFER; }
30 GpuMemoryBufferType type; 30 GpuMemoryBufferType type;
31 GpuMemoryBufferId id; 31 GpuMemoryBufferId id;
32 base::SharedMemoryHandle handle; 32 base::SharedMemoryHandle handle;
33 #if defined(OS_MACOSX) 33 #if defined(OS_MACOSX)
34 uint32 io_surface_id; 34 uint32 io_surface_id;
35 #elif defined(USE_OZONE)
36 uint32 stride;
reveman 2015/04/13 00:46:13 GpuMemoryBufferHandle should not be used to pass b
37 base::SharedMemoryHandle device_handle;
reveman 2015/04/13 00:46:13 Just use |handle| instead.
35 #endif 38 #endif
36 }; 39 };
37 40
38 // This interface typically correspond to a type of shared memory that is also 41 // This interface typically correspond to a type of shared memory that is also
39 // shared with the GPU. A GPU memory buffer can be written to directly by 42 // shared with the GPU. A GPU memory buffer can be written to directly by
40 // regular CPU code, but can also be read by the GPU. 43 // regular CPU code, but can also be read by the GPU.
41 class GFX_EXPORT GpuMemoryBuffer { 44 class GFX_EXPORT GpuMemoryBuffer {
42 public: 45 public:
43 // The format needs to be taken into account when mapping a buffer into the 46 // The format needs to be taken into account when mapping a buffer into the
44 // client's address space. 47 // client's address space.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // Returns a platform specific handle for this buffer. 90 // Returns a platform specific handle for this buffer.
88 virtual GpuMemoryBufferHandle GetHandle() const = 0; 91 virtual GpuMemoryBufferHandle GetHandle() const = 0;
89 92
90 // Type-checking downcast routine. 93 // Type-checking downcast routine.
91 virtual ClientBuffer AsClientBuffer() = 0; 94 virtual ClientBuffer AsClientBuffer() = 0;
92 }; 95 };
93 96
94 } // namespace gfx 97 } // namespace gfx
95 98
96 #endif // UI_GFX_GPU_MEMORY_BUFFER_H_ 99 #endif // UI_GFX_GPU_MEMORY_BUFFER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698