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

Side by Side Diff: chrome/gpu/gpu_thread.cc

Issue 5612002: Blacklist bad GPU drivers: currenly we disable all gpu related features if th... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/gpu/gpu_thread.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/gpu/gpu_thread.h" 5 #include "chrome/gpu/gpu_thread.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "app/gfx/gl/gl_context.h" 10 #include "app/gfx/gl/gl_context.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 void GpuThread::RemoveChannel(int renderer_id) { 51 void GpuThread::RemoveChannel(int renderer_id) {
52 gpu_channels_.erase(renderer_id); 52 gpu_channels_.erase(renderer_id);
53 } 53 }
54 54
55 void GpuThread::OnControlMessageReceived(const IPC::Message& msg) { 55 void GpuThread::OnControlMessageReceived(const IPC::Message& msg) {
56 bool msg_is_ok = true; 56 bool msg_is_ok = true;
57 IPC_BEGIN_MESSAGE_MAP_EX(GpuThread, msg, msg_is_ok) 57 IPC_BEGIN_MESSAGE_MAP_EX(GpuThread, msg, msg_is_ok)
58 IPC_MESSAGE_HANDLER(GpuMsg_EstablishChannel, 58 IPC_MESSAGE_HANDLER(GpuMsg_EstablishChannel,
59 OnEstablishChannel) 59 OnEstablishChannel)
60 IPC_MESSAGE_HANDLER(GpuMsg_CloseChannel,
61 OnCloseChannel)
60 IPC_MESSAGE_HANDLER(GpuMsg_Synchronize, 62 IPC_MESSAGE_HANDLER(GpuMsg_Synchronize,
61 OnSynchronize) 63 OnSynchronize)
62 IPC_MESSAGE_HANDLER(GpuMsg_CollectGraphicsInfo, 64 IPC_MESSAGE_HANDLER(GpuMsg_CollectGraphicsInfo,
63 OnCollectGraphicsInfo) 65 OnCollectGraphicsInfo)
64 #if defined(OS_MACOSX) 66 #if defined(OS_MACOSX)
65 IPC_MESSAGE_HANDLER(GpuMsg_AcceleratedSurfaceBuffersSwappedACK, 67 IPC_MESSAGE_HANDLER(GpuMsg_AcceleratedSurfaceBuffersSwappedACK,
66 OnAcceleratedSurfaceBuffersSwappedACK) 68 OnAcceleratedSurfaceBuffersSwappedACK)
67 #endif 69 #endif
68 IPC_MESSAGE_HANDLER(GpuMsg_Crash, 70 IPC_MESSAGE_HANDLER(GpuMsg_Crash,
69 OnCrash) 71 OnCrash)
(...skipping 26 matching lines...) Expand all
96 // On POSIX, pass the renderer-side FD. Also mark it as auto-close so 98 // On POSIX, pass the renderer-side FD. Also mark it as auto-close so
97 // that it gets closed after it has been sent. 99 // that it gets closed after it has been sent.
98 int renderer_fd = channel->GetRendererFileDescriptor(); 100 int renderer_fd = channel->GetRendererFileDescriptor();
99 channel_handle.socket = base::FileDescriptor(renderer_fd, false); 101 channel_handle.socket = base::FileDescriptor(renderer_fd, false);
100 #endif 102 #endif
101 } 103 }
102 104
103 Send(new GpuHostMsg_ChannelEstablished(channel_handle, gpu_info_)); 105 Send(new GpuHostMsg_ChannelEstablished(channel_handle, gpu_info_));
104 } 106 }
105 107
108 void GpuThread::OnCloseChannel(const IPC::ChannelHandle& channel_handle) {
109 for (GpuChannelMap::iterator iter = gpu_channels_.begin();
110 iter != gpu_channels_.end(); ++iter) {
111 if (iter->second->GetChannelName() == channel_handle.name) {
112 gpu_channels_.erase(iter);
113 return;
114 }
115 }
116 }
117
106 void GpuThread::OnSynchronize() { 118 void GpuThread::OnSynchronize() {
107 Send(new GpuHostMsg_SynchronizeReply()); 119 Send(new GpuHostMsg_SynchronizeReply());
108 } 120 }
109 121
110 void GpuThread::OnCollectGraphicsInfo() { 122 void GpuThread::OnCollectGraphicsInfo() {
111 Send(new GpuHostMsg_GraphicsInfoCollected(gpu_info_)); 123 Send(new GpuHostMsg_GraphicsInfoCollected(gpu_info_));
112 } 124 }
113 125
114 #if defined(OS_MACOSX) 126 #if defined(OS_MACOSX)
115 void GpuThread::OnAcceleratedSurfaceBuffersSwappedACK( 127 void GpuThread::OnAcceleratedSurfaceBuffersSwappedACK(
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 NewRunnableFunction(&GpuThread::SetDxDiagnostics, thread, node)); 162 NewRunnableFunction(&GpuThread::SetDxDiagnostics, thread, node));
151 } 163 }
152 164
153 // Runs on the GPU thread. 165 // Runs on the GPU thread.
154 void GpuThread::SetDxDiagnostics(GpuThread* thread, const DxDiagNode& node) { 166 void GpuThread::SetDxDiagnostics(GpuThread* thread, const DxDiagNode& node) {
155 thread->gpu_info_.SetDxDiagnostics(node); 167 thread->gpu_info_.SetDxDiagnostics(node);
156 thread->gpu_info_.SetProgress(GPUInfo::kComplete); 168 thread->gpu_info_.SetProgress(GPUInfo::kComplete);
157 } 169 }
158 170
159 #endif 171 #endif
OLDNEW
« no previous file with comments | « chrome/gpu/gpu_thread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698