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

Unified Diff: content/common/gpu/gpu_channel_manager.h

Issue 1365563002: Make channel preemption not require view contexts for hookup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wakeup_gpu
Patch Set: fix build and broken rebase Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/gpu_channel_manager.h
diff --git a/content/common/gpu/gpu_channel_manager.h b/content/common/gpu/gpu_channel_manager.h
index ea3d94724de466e2a7e3f8bcc1480ab8f9c2d737..469d98cbc41881d306178a1748462d9d6ee9f258 100644
--- a/content/common/gpu/gpu_channel_manager.h
+++ b/content/common/gpu/gpu_channel_manager.h
@@ -33,6 +33,7 @@ class GLShareGroup;
}
namespace gpu {
+class PreemptionFlag;
class SyncPointManager;
union ValueState;
namespace gles2 {
@@ -49,6 +50,7 @@ class SyncChannel;
}
struct GPUCreateCommandBufferConfig;
+struct GpuMsg_EstablishChannel_Params;
namespace content {
class GpuChannel;
@@ -116,13 +118,19 @@ class CONTENT_EXPORT GpuChannelManager : public IPC::Listener,
#endif
protected:
- virtual scoped_ptr<GpuChannel> CreateGpuChannel(
- gfx::GLShareGroup* share_group,
- gpu::gles2::MailboxManager* mailbox_manager,
- int client_id,
- uint64_t client_tracing_id,
- bool allow_future_sync_points,
- bool allow_real_time_streams);
+ virtual scoped_ptr<GpuChannel> CreateGpuChannel(int client_id,
+ uint64_t client_tracing_id,
+ bool preempts,
+ bool allow_future_sync_points,
+ bool allow_real_time_streams);
+
+ gfx::GLShareGroup* share_group() const { return share_group_.get(); }
+ gpu::gles2::MailboxManager* mailbox_manager() const {
+ return mailbox_manager_.get();
+ }
+ gpu::PreemptionFlag* preemption_flag() const {
+ return preemption_flag_.get();
+ }
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
@@ -135,17 +143,11 @@ class CONTENT_EXPORT GpuChannelManager : public IPC::Listener,
private:
// Message handlers.
bool OnControlMessageReceived(const IPC::Message& msg);
- void OnEstablishChannel(int client_id,
- uint64_t client_tracing_id,
- bool share_context,
- bool allow_future_sync_points,
- bool allow_real_time_streams);
+ void OnEstablishChannel(const GpuMsg_EstablishChannel_Params& params);
void OnCloseChannel(const IPC::ChannelHandle& channel_handle);
- void OnVisibilityChanged(
- int32 render_view_id, int32 client_id, bool visible);
+ void OnVisibilityChanged(int32 render_view_id, int32 client_id, bool visible);
void OnCreateViewCommandBuffer(
const gfx::GLSurfaceHandle& window,
- int32 render_view_id,
int32 client_id,
const GPUCreateCommandBufferConfig& init_params,
int32 route_id);
@@ -176,6 +178,7 @@ class CONTENT_EXPORT GpuChannelManager : public IPC::Listener,
scoped_refptr<gfx::GLShareGroup> share_group_;
scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_;
+ scoped_refptr<gpu::PreemptionFlag> preemption_flag_;
GpuMemoryManager gpu_memory_manager_;
// SyncPointManager guaranteed to outlive running MessageLoop.
gpu::SyncPointManager* sync_point_manager_;

Powered by Google App Engine
This is Rietveld 408576698