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

Side by Side Diff: content/browser/gpu/gpu_process_host.cc

Issue 11195011: Send vsync timebase updates to the browser compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased again. Created 8 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
« no previous file with comments | « content/browser/gpu/gpu_process_host.h ('k') | content/browser/gpu/gpu_process_host_ui_shim.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 #include "content/browser/gpu/gpu_process_host.h" 5 #include "content/browser/gpu/gpu_process_host.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 queued_messages_.push(msg); 462 queued_messages_.push(msg);
463 return true; 463 return true;
464 } 464 }
465 465
466 bool result = process_->Send(msg); 466 bool result = process_->Send(msg);
467 if (!result) 467 if (!result)
468 valid_ = false; 468 valid_ = false;
469 return result; 469 return result;
470 } 470 }
471 471
472 void GpuProcessHost::AddFilter(IPC::ChannelProxy::MessageFilter* filter) {
473 DCHECK(CalledOnValidThread());
474 process_->GetHost()->AddFilter(filter);
475 }
476
472 bool GpuProcessHost::OnMessageReceived(const IPC::Message& message) { 477 bool GpuProcessHost::OnMessageReceived(const IPC::Message& message) {
473 DCHECK(CalledOnValidThread()); 478 DCHECK(CalledOnValidThread());
474 IPC_BEGIN_MESSAGE_MAP(GpuProcessHost, message) 479 IPC_BEGIN_MESSAGE_MAP(GpuProcessHost, message)
475 IPC_MESSAGE_HANDLER(GpuHostMsg_Initialized, OnInitialized) 480 IPC_MESSAGE_HANDLER(GpuHostMsg_Initialized, OnInitialized)
476 IPC_MESSAGE_HANDLER(GpuHostMsg_ChannelEstablished, OnChannelEstablished) 481 IPC_MESSAGE_HANDLER(GpuHostMsg_ChannelEstablished, OnChannelEstablished)
477 IPC_MESSAGE_HANDLER(GpuHostMsg_CommandBufferCreated, OnCommandBufferCreated) 482 IPC_MESSAGE_HANDLER(GpuHostMsg_CommandBufferCreated, OnCommandBufferCreated)
478 IPC_MESSAGE_HANDLER(GpuHostMsg_DestroyCommandBuffer, OnDestroyCommandBuffer) 483 IPC_MESSAGE_HANDLER(GpuHostMsg_DestroyCommandBuffer, OnDestroyCommandBuffer)
479 IPC_MESSAGE_HANDLER(GpuHostMsg_ImageCreated, OnImageCreated) 484 IPC_MESSAGE_HANDLER(GpuHostMsg_ImageCreated, OnImageCreated)
480 #if defined(OS_MACOSX) 485 #if defined(OS_MACOSX)
481 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceBuffersSwapped, 486 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceBuffersSwapped,
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 const CreateCommandBufferCallback& callback, int32 route_id) { 956 const CreateCommandBufferCallback& callback, int32 route_id) {
952 callback.Run(route_id); 957 callback.Run(route_id);
953 } 958 }
954 959
955 void GpuProcessHost::CreateImageError( 960 void GpuProcessHost::CreateImageError(
956 const CreateImageCallback& callback, const gfx::Size size) { 961 const CreateImageCallback& callback, const gfx::Size size) {
957 callback.Run(size); 962 callback.Run(size);
958 } 963 }
959 964
960 } // namespace content 965 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_process_host.h ('k') | content/browser/gpu/gpu_process_host_ui_shim.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698