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

Side by Side Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 7890046: Command to mark surface inactive, so gpu process can release resources. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: first cut of IPC version Created 9 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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(ENABLE_GPU) 5 #if defined(ENABLE_GPU)
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/shared_memory.h" 10 #include "base/shared_memory.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_RegisterTransferBuffer, 99 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_RegisterTransferBuffer,
100 OnRegisterTransferBuffer); 100 OnRegisterTransferBuffer);
101 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_DestroyTransferBuffer, 101 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_DestroyTransferBuffer,
102 OnDestroyTransferBuffer); 102 OnDestroyTransferBuffer);
103 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_GetTransferBuffer, 103 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_GetTransferBuffer,
104 OnGetTransferBuffer); 104 OnGetTransferBuffer);
105 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_CreateVideoDecoder, 105 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_CreateVideoDecoder,
106 OnCreateVideoDecoder) 106 OnCreateVideoDecoder)
107 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DestroyVideoDecoder, 107 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DestroyVideoDecoder,
108 OnDestroyVideoDecoder) 108 OnDestroyVideoDecoder)
109 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SetSurfaceVisible,
110 OnSetSurfaceVisible)
109 IPC_MESSAGE_UNHANDLED(handled = false) 111 IPC_MESSAGE_UNHANDLED(handled = false)
110 IPC_END_MESSAGE_MAP() 112 IPC_END_MESSAGE_MAP()
111 113
112 DCHECK(handled); 114 DCHECK(handled);
113 return handled; 115 return handled;
114 } 116 }
115 117
116 bool GpuCommandBufferStub::Send(IPC::Message* message) { 118 bool GpuCommandBufferStub::Send(IPC::Message* message) {
117 return channel_->Send(message); 119 return channel_->Send(message);
118 } 120 }
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 video_decoders_.AddWithID(decoder, decoder_route_id); 492 video_decoders_.AddWithID(decoder, decoder_route_id);
491 channel_->AddRoute(decoder_route_id, decoder); 493 channel_->AddRoute(decoder_route_id, decoder);
492 decoder->Initialize(profile, reply_message); 494 decoder->Initialize(profile, reply_message);
493 } 495 }
494 496
495 void GpuCommandBufferStub::OnDestroyVideoDecoder(int decoder_route_id) { 497 void GpuCommandBufferStub::OnDestroyVideoDecoder(int decoder_route_id) {
496 channel_->RemoveRoute(decoder_route_id); 498 channel_->RemoveRoute(decoder_route_id);
497 video_decoders_.Remove(decoder_route_id); 499 video_decoders_.Remove(decoder_route_id);
498 } 500 }
499 501
502 void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) {
503 surface_->OnSetSurfaceVisible(visible);
504 }
505
500 #endif // defined(ENABLE_GPU) 506 #endif // defined(ENABLE_GPU)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698