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

Side by Side Diff: content/common/gpu/client/gpu_channel_host.cc

Issue 869433003: (not for commit) Simplified multi-threaded Ganesh with lock on Flush only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 10 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 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 #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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // 95 //
96 // TODO: Can we just always use sync_filter_ since we setup the channel 96 // TODO: Can we just always use sync_filter_ since we setup the channel
97 // without a main listener? 97 // without a main listener?
98 if (factory_->IsMainThread()) { 98 if (factory_->IsMainThread()) {
99 // http://crbug.com/125264 99 // http://crbug.com/125264
100 base::ThreadRestrictions::ScopedAllowWait allow_wait; 100 base::ThreadRestrictions::ScopedAllowWait allow_wait;
101 bool result = channel_->Send(message.release()); 101 bool result = channel_->Send(message.release());
102 if (!result) 102 if (!result)
103 DVLOG(1) << "GpuChannelHost::Send failed: Channel::Send failed"; 103 DVLOG(1) << "GpuChannelHost::Send failed: Channel::Send failed";
104 return result; 104 return result;
105 } else if (base::MessageLoop::current()) { 105
106 // TODO(vmiura): Nasty hack, could be hazardous to health!
107 //} else if (base::MessageLoop::current()) {
108 } else {
106 bool result = sync_filter_->Send(message.release()); 109 bool result = sync_filter_->Send(message.release());
107 if (!result) 110 if (!result)
108 DVLOG(1) << "GpuChannelHost::Send failed: SyncMessageFilter::Send failed"; 111 DVLOG(1) << "GpuChannelHost::Send failed: SyncMessageFilter::Send failed";
109 return result; 112 return result;
110 } 113 }
111 114
115 LOG(ERROR) << "... GpuChannelHost::Send() failed!!!";
116
112 return false; 117 return false;
113 } 118 }
114 119
115 CommandBufferProxyImpl* GpuChannelHost::CreateViewCommandBuffer( 120 CommandBufferProxyImpl* GpuChannelHost::CreateViewCommandBuffer(
116 int32 surface_id, 121 int32 surface_id,
117 CommandBufferProxyImpl* share_group, 122 CommandBufferProxyImpl* share_group,
118 const std::vector<int32>& attribs, 123 const std::vector<int32>& attribs,
119 const GURL& active_url, 124 const GURL& active_url,
120 gfx::GpuPreference gpu_preference) { 125 gfx::GpuPreference gpu_preference) {
121 TRACE_EVENT1("gpu", 126 TRACE_EVENT1("gpu",
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 391
387 listeners_.clear(); 392 listeners_.clear();
388 } 393 }
389 394
390 bool GpuChannelHost::MessageFilter::IsLost() const { 395 bool GpuChannelHost::MessageFilter::IsLost() const {
391 AutoLock lock(lock_); 396 AutoLock lock(lock_);
392 return lost_; 397 return lost_;
393 } 398 }
394 399
395 } // namespace content 400 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698