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

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

Issue 5317007: Add flow control between renderer and GPU processes, and, on Mac OS X,... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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
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_channel.h" 5 #include "chrome/gpu/gpu_channel.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 76 }
77 77
78 if (!channel_.get()) { 78 if (!channel_.get()) {
79 delete message; 79 delete message;
80 return false; 80 return false;
81 } 81 }
82 82
83 return channel_->Send(message); 83 return channel_->Send(message);
84 } 84 }
85 85
86 #if defined(OS_MACOSX)
87 void GpuChannel::AcceleratedSurfaceBuffersSwapped(
88 int32 route_id, uint64 swap_buffers_count) {
89 GpuCommandBufferStub* stub = stubs_.Lookup(route_id);
90 if (stub == NULL)
91 return;
92 stub->AcceleratedSurfaceBuffersSwapped(swap_buffers_count);
93 }
94 #endif
95
86 void GpuChannel::OnControlMessageReceived(const IPC::Message& msg) { 96 void GpuChannel::OnControlMessageReceived(const IPC::Message& msg) {
87 IPC_BEGIN_MESSAGE_MAP(GpuChannel, msg) 97 IPC_BEGIN_MESSAGE_MAP(GpuChannel, msg)
88 IPC_MESSAGE_HANDLER(GpuChannelMsg_CreateViewCommandBuffer, 98 IPC_MESSAGE_HANDLER(GpuChannelMsg_CreateViewCommandBuffer,
89 OnCreateViewCommandBuffer) 99 OnCreateViewCommandBuffer)
90 IPC_MESSAGE_HANDLER(GpuChannelMsg_CreateOffscreenCommandBuffer, 100 IPC_MESSAGE_HANDLER(GpuChannelMsg_CreateOffscreenCommandBuffer,
91 OnCreateOffscreenCommandBuffer) 101 OnCreateOffscreenCommandBuffer)
92 IPC_MESSAGE_HANDLER(GpuChannelMsg_DestroyCommandBuffer, 102 IPC_MESSAGE_HANDLER(GpuChannelMsg_DestroyCommandBuffer,
93 OnDestroyCommandBuffer) 103 OnDestroyCommandBuffer)
94 IPC_MESSAGE_HANDLER(GpuChannelMsg_CreateVideoDecoder, 104 IPC_MESSAGE_HANDLER(GpuChannelMsg_CreateVideoDecoder,
95 OnCreateVideoDecoder) 105 OnCreateVideoDecoder)
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 channel_name, IPC::Channel::MODE_SERVER, this, NULL, 254 channel_name, IPC::Channel::MODE_SERVER, this, NULL,
245 ChildProcess::current()->io_message_loop(), false, 255 ChildProcess::current()->io_message_loop(), false,
246 ChildProcess::current()->GetShutDownEvent())); 256 ChildProcess::current()->GetShutDownEvent()));
247 257
248 return true; 258 return true;
249 } 259 }
250 260
251 std::string GpuChannel::GetChannelName() { 261 std::string GpuChannel::GetChannelName() {
252 return StringPrintf("%d.r%d", base::GetCurrentProcId(), renderer_id_); 262 return StringPrintf("%d.r%d", base::GetCurrentProcId(), renderer_id_);
253 } 263 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698