OLD | NEW |
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 CONTENT_COMMON_GPU_GPU_CHANNEL_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_ | 6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 bool OnMessageReceived(const IPC::Message& msg) override; | 101 bool OnMessageReceived(const IPC::Message& msg) override; |
102 void OnChannelError() override; | 102 void OnChannelError() override; |
103 | 103 |
104 // IPC::Sender implementation: | 104 // IPC::Sender implementation: |
105 bool Send(IPC::Message* msg) override; | 105 bool Send(IPC::Message* msg) override; |
106 | 106 |
107 // SubscriptionRefSet::Observer implementation | 107 // SubscriptionRefSet::Observer implementation |
108 void OnAddSubscription(unsigned int target) override; | 108 void OnAddSubscription(unsigned int target) override; |
109 void OnRemoveSubscription(unsigned int target) override; | 109 void OnRemoveSubscription(unsigned int target) override; |
110 | 110 |
111 // This is called when a command buffer transitions from the unscheduled | |
112 // state to the scheduled state, which potentially means the channel | |
113 // transitions from the unscheduled to the scheduled state. When this occurs | |
114 // deferred IPC messaged are handled. | |
115 void OnScheduled(); | |
116 | |
117 // This is called when a command buffer transitions between scheduled and | 111 // This is called when a command buffer transitions between scheduled and |
118 // descheduled states. When any stub is descheduled, we stop preempting | 112 // descheduled states. When any stub is descheduled, we stop preempting |
119 // other channels. | 113 // other channels. |
120 void StubSchedulingChanged(bool scheduled); | 114 void OnStubSchedulingChanged(GpuCommandBufferStub* stub, bool scheduled); |
121 | 115 |
122 CreateCommandBufferResult CreateViewCommandBuffer( | 116 CreateCommandBufferResult CreateViewCommandBuffer( |
123 const gfx::GLSurfaceHandle& window, | 117 const gfx::GLSurfaceHandle& window, |
124 int32 surface_id, | 118 int32 surface_id, |
125 const GPUCreateCommandBufferConfig& init_params, | 119 const GPUCreateCommandBufferConfig& init_params, |
126 int32 route_id); | 120 int32 route_id); |
127 | 121 |
128 gfx::GLShareGroup* share_group() const { return share_group_.get(); } | 122 gfx::GLShareGroup* share_group() const { return share_group_.get(); } |
129 | 123 |
130 GpuCommandBufferStub* LookupCommandBuffer(int32 route_id); | 124 GpuCommandBufferStub* LookupCommandBuffer(int32 route_id); |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 | 464 |
471 base::WeakPtr<GpuChannel> gpu_channel_; | 465 base::WeakPtr<GpuChannel> gpu_channel_; |
472 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 466 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
473 | 467 |
474 DISALLOW_COPY_AND_ASSIGN(GpuChannelMessageQueue); | 468 DISALLOW_COPY_AND_ASSIGN(GpuChannelMessageQueue); |
475 }; | 469 }; |
476 | 470 |
477 } // namespace content | 471 } // namespace content |
478 | 472 |
479 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_ | 473 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
OLD | NEW |