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 #if defined(OS_WIN) | 5 #if defined(OS_WIN) |
6 #include <windows.h> | 6 #include <windows.h> |
7 #endif | 7 #endif |
8 | 8 |
9 #include "content/common/gpu/gpu_channel.h" | 9 #include "content/common/gpu/gpu_channel.h" |
10 | 10 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
121 return false; | 121 return false; |
122 } | 122 } |
123 | 123 |
124 return channel_->Send(message); | 124 return channel_->Send(message); |
125 } | 125 } |
126 | 126 |
127 void GpuChannel::AppendAllCommandBufferStubs( | 127 void GpuChannel::AppendAllCommandBufferStubs( |
128 std::vector<GpuCommandBufferStubBase*>& stubs) { | 128 std::vector<GpuCommandBufferStubBase*>& stubs) { |
129 for (StubMap::Iterator<GpuCommandBufferStub> it(&stubs_); | 129 for (StubMap::Iterator<GpuCommandBufferStub> it(&stubs_); |
130 !it.IsAtEnd(); it.Advance()) { | 130 !it.IsAtEnd(); it.Advance()) { |
131 stubs.push_back(it.GetCurrentValue()); | 131 GpuCommandBufferStub* stub = it.GetCurrentValue(); |
nduca
2012/04/18 23:16:28
Is the idea here that we shouldnt give management
mmocny
2012/04/20 18:37:55
Yes, until we get allocation hints I didn't want t
| |
132 if (stub->is_ui_stub()) | |
133 continue; | |
134 stubs.push_back(stub); | |
132 } | 135 } |
133 } | 136 } |
134 | 137 |
135 void GpuChannel::OnScheduled() { | 138 void GpuChannel::OnScheduled() { |
136 if (handle_messages_scheduled_) | 139 if (handle_messages_scheduled_) |
137 return; | 140 return; |
138 // Post a task to handle any deferred messages. The deferred message queue is | 141 // Post a task to handle any deferred messages. The deferred message queue is |
139 // not emptied here, which ensures that OnMessageReceived will continue to | 142 // not emptied here, which ensures that OnMessageReceived will continue to |
140 // defer newly received messages until the ones in the queue have all been | 143 // defer newly received messages until the ones in the queue have all been |
141 // handled by HandleMessage. HandleMessage is invoked as a | 144 // handled by HandleMessage. HandleMessage is invoked as a |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
424 | 427 |
425 #if defined(OS_POSIX) | 428 #if defined(OS_POSIX) |
426 int GpuChannel::TakeRendererFileDescriptor() { | 429 int GpuChannel::TakeRendererFileDescriptor() { |
427 if (!channel_.get()) { | 430 if (!channel_.get()) { |
428 NOTREACHED(); | 431 NOTREACHED(); |
429 return -1; | 432 return -1; |
430 } | 433 } |
431 return channel_->TakeClientFileDescriptor(); | 434 return channel_->TakeClientFileDescriptor(); |
432 } | 435 } |
433 #endif // defined(OS_POSIX) | 436 #endif // defined(OS_POSIX) |
OLD | NEW |