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

Side by Side Diff: content/renderer/gpu/compositor_external_begin_frame_source.cc

Issue 2323123002: Make disable vsync run the renderer independently (Closed)
Patch Set: Rebase Created 4 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/renderer/gpu/compositor_external_begin_frame_source.h" 5 #include "content/renderer/gpu/compositor_external_begin_frame_source.h"
6 6
7 #include "content/common/view_messages.h" 7 #include "content/common/view_messages.h"
8 #include "ipc/ipc_sync_channel.h" 8 #include "ipc/ipc_sync_channel.h"
9 #include "ipc/ipc_sync_message_filter.h" 9 #include "ipc/ipc_sync_message_filter.h"
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 } 48 }
49 49
50 external_begin_frame_source_.AddObserver(obs); 50 external_begin_frame_source_.AddObserver(obs);
51 } 51 }
52 52
53 void CompositorExternalBeginFrameSource::RemoveObserver( 53 void CompositorExternalBeginFrameSource::RemoveObserver(
54 cc::BeginFrameObserver* obs) { 54 cc::BeginFrameObserver* obs) {
55 external_begin_frame_source_.RemoveObserver(obs); 55 external_begin_frame_source_.RemoveObserver(obs);
56 } 56 }
57 57
58 bool CompositorExternalBeginFrameSource::IsThrottled() const {
59 return true;
60 }
61
58 void CompositorExternalBeginFrameSource::OnNeedsBeginFrames( 62 void CompositorExternalBeginFrameSource::OnNeedsBeginFrames(
59 bool needs_begin_frames) { 63 bool needs_begin_frames) {
60 Send(new ViewHostMsg_SetNeedsBeginFrames(routing_id_, needs_begin_frames)); 64 Send(new ViewHostMsg_SetNeedsBeginFrames(routing_id_, needs_begin_frames));
61 } 65 }
62 66
63 void CompositorExternalBeginFrameSource::OnMessageReceived( 67 void CompositorExternalBeginFrameSource::OnMessageReceived(
64 const IPC::Message& message) { 68 const IPC::Message& message) {
65 DCHECK(CalledOnValidThread()); 69 DCHECK(CalledOnValidThread());
66 DCHECK(begin_frame_source_proxy_); 70 DCHECK(begin_frame_source_proxy_);
67 IPC_BEGIN_MESSAGE_MAP(CompositorExternalBeginFrameSource, message) 71 IPC_BEGIN_MESSAGE_MAP(CompositorExternalBeginFrameSource, message)
(...skipping 11 matching lines...) Expand all
79 void CompositorExternalBeginFrameSource::OnBeginFrame( 83 void CompositorExternalBeginFrameSource::OnBeginFrame(
80 const cc::BeginFrameArgs& args) { 84 const cc::BeginFrameArgs& args) {
81 external_begin_frame_source_.OnBeginFrame(args); 85 external_begin_frame_source_.OnBeginFrame(args);
82 } 86 }
83 87
84 bool CompositorExternalBeginFrameSource::Send(IPC::Message* message) { 88 bool CompositorExternalBeginFrameSource::Send(IPC::Message* message) {
85 return message_sender_->Send(message); 89 return message_sender_->Send(message);
86 } 90 }
87 91
88 } // namespace content 92 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/compositor_external_begin_frame_source.h ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698