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 #include "content/common/gpu/client/gpu_channel_host.h" | 5 #include "content/common/gpu/client/gpu_channel_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 // | 105 // |
106 // TODO: Can we just always use sync_filter_ since we setup the channel | 106 // TODO: Can we just always use sync_filter_ since we setup the channel |
107 // without a main listener? | 107 // without a main listener? |
108 if (factory_->IsMainThread()) { | 108 if (factory_->IsMainThread()) { |
109 // http://crbug.com/125264 | 109 // http://crbug.com/125264 |
110 base::ThreadRestrictions::ScopedAllowWait allow_wait; | 110 base::ThreadRestrictions::ScopedAllowWait allow_wait; |
111 bool result = channel_->Send(message.release()); | 111 bool result = channel_->Send(message.release()); |
112 if (!result) | 112 if (!result) |
113 DVLOG(1) << "GpuChannelHost::Send failed: Channel::Send failed"; | 113 DVLOG(1) << "GpuChannelHost::Send failed: Channel::Send failed"; |
114 return result; | 114 return result; |
115 } else if (base::MessageLoop::current()) { | 115 } else { |
116 bool result = sync_filter_->Send(message.release()); | 116 bool result = sync_filter_->Send(message.release()); |
117 if (!result) | |
118 DVLOG(1) << "GpuChannelHost::Send failed: SyncMessageFilter::Send failed"; | |
119 return result; | 117 return result; |
120 } | 118 } |
121 | 119 |
| 120 LOG(ERROR) << "... GpuChannelHost::Send() failed!!!"; |
| 121 |
122 return false; | 122 return false; |
123 } | 123 } |
124 | 124 |
125 void GpuChannelHost::OrderingBarrier( | 125 void GpuChannelHost::OrderingBarrier( |
126 int route_id, | 126 int route_id, |
127 int32 put_offset, | 127 int32 put_offset, |
128 unsigned int flush_count, | 128 unsigned int flush_count, |
129 const std::vector<ui::LatencyInfo>& latency_info, | 129 const std::vector<ui::LatencyInfo>& latency_info, |
130 bool put_offset_changed, | 130 bool put_offset_changed, |
131 bool do_flush) { | 131 bool do_flush) { |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 | 430 |
431 listeners_.clear(); | 431 listeners_.clear(); |
432 } | 432 } |
433 | 433 |
434 bool GpuChannelHost::MessageFilter::IsLost() const { | 434 bool GpuChannelHost::MessageFilter::IsLost() const { |
435 AutoLock lock(lock_); | 435 AutoLock lock(lock_); |
436 return lost_; | 436 return lost_; |
437 } | 437 } |
438 | 438 |
439 } // namespace content | 439 } // namespace content |
OLD | NEW |