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

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

Issue 9192014: Replace WGC3D visibility extension with resource_usage extension. [Part 2 of 3] (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added image_transport_surface_win changes Created 8 years, 11 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
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.h ('k') | content/common/gpu/gpu_messages.h » ('j') | 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) 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 #if defined(ENABLE_GPU) 5 #if defined(ENABLE_GPU)
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_RegisterTransferBuffer, 98 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_RegisterTransferBuffer,
99 OnRegisterTransferBuffer); 99 OnRegisterTransferBuffer);
100 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_DestroyTransferBuffer, 100 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_DestroyTransferBuffer,
101 OnDestroyTransferBuffer); 101 OnDestroyTransferBuffer);
102 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_GetTransferBuffer, 102 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_GetTransferBuffer,
103 OnGetTransferBuffer); 103 OnGetTransferBuffer);
104 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_CreateVideoDecoder, 104 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_CreateVideoDecoder,
105 OnCreateVideoDecoder) 105 OnCreateVideoDecoder)
106 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DestroyVideoDecoder, 106 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DestroyVideoDecoder,
107 OnDestroyVideoDecoder) 107 OnDestroyVideoDecoder)
108 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SetSurfaceVisible, 108 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SetResourceUsage,
109 OnSetSurfaceVisible) 109 OnSetResourceUsage)
110 IPC_MESSAGE_UNHANDLED(handled = false) 110 IPC_MESSAGE_UNHANDLED(handled = false)
111 IPC_END_MESSAGE_MAP() 111 IPC_END_MESSAGE_MAP()
112 112
113 DCHECK(handled); 113 DCHECK(handled);
114 return handled; 114 return handled;
115 } 115 }
116 116
117 bool GpuCommandBufferStub::Send(IPC::Message* message) { 117 bool GpuCommandBufferStub::Send(IPC::Message* message) {
118 return channel_->Send(message); 118 return channel_->Send(message);
119 } 119 }
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 channel_->AddRoute(decoder_route_id, decoder); 487 channel_->AddRoute(decoder_route_id, decoder);
488 decoder->Initialize(profile, reply_message, 488 decoder->Initialize(profile, reply_message,
489 channel_->renderer_process()); 489 channel_->renderer_process());
490 } 490 }
491 491
492 void GpuCommandBufferStub::OnDestroyVideoDecoder(int decoder_route_id) { 492 void GpuCommandBufferStub::OnDestroyVideoDecoder(int decoder_route_id) {
493 channel_->RemoveRoute(decoder_route_id); 493 channel_->RemoveRoute(decoder_route_id);
494 video_decoders_.Remove(decoder_route_id); 494 video_decoders_.Remove(decoder_route_id);
495 } 495 }
496 496
497 void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) { 497 void GpuCommandBufferStub::OnSetResourceUsage(
498 surface_->SetVisible(visible); 498 gfx::GLSurface::ResourceUsage resourceUsage) {
499 surface_->SetResourceUsage(resourceUsage);
499 } 500 }
500 501
501 void GpuCommandBufferStub::SendConsoleMessage( 502 void GpuCommandBufferStub::SendConsoleMessage(
502 int32 id, 503 int32 id,
503 const std::string& message) { 504 const std::string& message) {
504 GPUCommandBufferConsoleMessage console_message; 505 GPUCommandBufferConsoleMessage console_message;
505 console_message.id = id; 506 console_message.id = id;
506 console_message.message = message; 507 console_message.message = message;
507 IPC::Message* msg = new GpuCommandBufferMsg_ConsoleMsg( 508 IPC::Message* msg = new GpuCommandBufferMsg_ConsoleMsg(
508 route_id_, console_message); 509 route_id_, console_message);
509 msg->set_unblock(true); 510 msg->set_unblock(true);
510 Send(msg); 511 Send(msg);
511 } 512 }
512 513
513 #endif // defined(ENABLE_GPU) 514 #endif // defined(ENABLE_GPU)
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.h ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698