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

Side by Side Diff: gpu/ipc/service/gpu_channel.h

Issue 2383753002: gpu: Add GpuFence framework.
Patch Set: rebase Created 4 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_SERVICE_GPU_CHANNEL_H_ 5 #ifndef GPU_IPC_SERVICE_GPU_CHANNEL_H_
6 #define GPU_IPC_SERVICE_GPU_CHANNEL_H_ 6 #define GPU_IPC_SERVICE_GPU_CHANNEL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 13
14 #include "base/containers/hash_tables.h" 14 #include "base/containers/hash_tables.h"
15 #include "base/containers/scoped_ptr_hash_map.h" 15 #include "base/containers/scoped_ptr_hash_map.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
18 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
19 #include "base/process/process.h" 19 #include "base/process/process.h"
20 #include "base/threading/thread_checker.h" 20 #include "base/threading/thread_checker.h"
21 #include "base/trace_event/memory_dump_provider.h" 21 #include "base/trace_event/memory_dump_provider.h"
22 #include "build/build_config.h" 22 #include "build/build_config.h"
23 #include "gpu/gpu_export.h" 23 #include "gpu/gpu_export.h"
24 #include "gpu/ipc/common/gpu_stream_constants.h" 24 #include "gpu/ipc/common/gpu_stream_constants.h"
25 #include "gpu/ipc/service/gpu_command_buffer_stub.h" 25 #include "gpu/ipc/service/gpu_command_buffer_stub.h"
26 #include "gpu/ipc/service/gpu_memory_manager.h" 26 #include "gpu/ipc/service/gpu_memory_manager.h"
27 #include "ipc/ipc_sync_channel.h" 27 #include "ipc/ipc_sync_channel.h"
28 #include "ipc/message_router.h" 28 #include "ipc/message_router.h"
29 #include "ui/gfx/geometry/size.h" 29 #include "ui/gfx/geometry/size.h"
30 #include "ui/gfx/gpu_fence.h"
30 #include "ui/gfx/native_widget_types.h" 31 #include "ui/gfx/native_widget_types.h"
31 #include "ui/gl/gl_share_group.h" 32 #include "ui/gl/gl_share_group.h"
32 #include "ui/gl/gpu_preference.h" 33 #include "ui/gl/gpu_preference.h"
33 34
34 struct GPUCreateCommandBufferConfig; 35 struct GPUCreateCommandBufferConfig;
35 36
36 namespace base { 37 namespace base {
37 class WaitableEvent; 38 class WaitableEvent;
38 } 39 }
39 40
41 namespace gl {
42 class GLFence;
43 }
44
40 namespace IPC { 45 namespace IPC {
41 class MessageFilter; 46 class MessageFilter;
42 } 47 }
43 48
44 namespace gpu { 49 namespace gpu {
45 50
46 class PreemptionFlag; 51 class PreemptionFlag;
47 class SyncPointOrderData; 52 class SyncPointOrderData;
48 class SyncPointManager; 53 class SyncPointManager;
49 class GpuChannelManager; 54 class GpuChannelManager;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 148
144 uint64_t GetMemoryUsage(); 149 uint64_t GetMemoryUsage();
145 150
146 scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer( 151 scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer(
147 const gfx::GpuMemoryBufferHandle& handle, 152 const gfx::GpuMemoryBufferHandle& handle,
148 const gfx::Size& size, 153 const gfx::Size& size,
149 gfx::BufferFormat format, 154 gfx::BufferFormat format,
150 uint32_t internalformat, 155 uint32_t internalformat,
151 SurfaceHandle surface_handle); 156 SurfaceHandle surface_handle);
152 157
158 std::unique_ptr<gl::GLFence> CreateFenceForGpuFence(
159 const gfx::GpuFenceHandle& handle);
160
153 GpuChannelMessageFilter* filter() const { return filter_.get(); } 161 GpuChannelMessageFilter* filter() const { return filter_.get(); }
154 162
155 // Returns the global order number for the last processed IPC message. 163 // Returns the global order number for the last processed IPC message.
156 uint32_t GetProcessedOrderNum() const; 164 uint32_t GetProcessedOrderNum() const;
157 165
158 // Returns the global order number for the last unprocessed IPC message. 166 // Returns the global order number for the last unprocessed IPC message.
159 uint32_t GetUnprocessedOrderNum() const; 167 uint32_t GetUnprocessedOrderNum() const;
160 168
161 // Returns the shared sync point global order data for the stream. 169 // Returns the shared sync point global order data for the stream.
162 scoped_refptr<SyncPointOrderData> GetSyncPointOrderData( 170 scoped_refptr<SyncPointOrderData> GetSyncPointOrderData(
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 scoped_refptr<PreemptionFlag> preempting_flag_; 479 scoped_refptr<PreemptionFlag> preempting_flag_;
472 scoped_refptr<PreemptionFlag> preempted_flag_; 480 scoped_refptr<PreemptionFlag> preempted_flag_;
473 SyncPointManager* const sync_point_manager_; 481 SyncPointManager* const sync_point_manager_;
474 482
475 DISALLOW_COPY_AND_ASSIGN(GpuChannelMessageQueue); 483 DISALLOW_COPY_AND_ASSIGN(GpuChannelMessageQueue);
476 }; 484 };
477 485
478 } // namespace gpu 486 } // namespace gpu
479 487
480 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_H_ 488 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698