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

Side by Side Diff: components/viz/frame_sinks/mojo_frame_sink_manager.cc

Issue 2854163003: [cc] Plumb BeginFrameAcks through SurfaceManager to DisplayScheduler. (Closed)
Patch Set: Pass ack via SurfaceDamaged, add back tests. Created 3 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/viz/frame_sinks/mojo_frame_sink_manager.h" 5 #include "components/viz/frame_sinks/mojo_frame_sink_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // TODO(kylechar): |client_| will try to find an owner for the temporary 120 // TODO(kylechar): |client_| will try to find an owner for the temporary
121 // reference to the new surface. With surface synchronization this might not 121 // reference to the new surface. With surface synchronization this might not
122 // be necessary, because a surface reference might already exist and no 122 // be necessary, because a surface reference might already exist and no
123 // temporary reference was created. It could be useful to let |client_| know 123 // temporary reference was created. It could be useful to let |client_| know
124 // if it should find an owner. 124 // if it should find an owner.
125 if (client_) 125 if (client_)
126 client_->OnSurfaceCreated(surface_info); 126 client_->OnSurfaceCreated(surface_info);
127 } 127 }
128 128
129 void MojoFrameSinkManager::OnSurfaceDamaged(const cc::SurfaceId& surface_id, 129 void MojoFrameSinkManager::OnSurfaceDamaged(const cc::SurfaceId& surface_id,
130 const cc::BeginFrameAck& ack,
130 bool* changed) {} 131 bool* changed) {}
131 132
132 void MojoFrameSinkManager::OnSurfaceDiscarded(const cc::SurfaceId& surface_id) { 133 void MojoFrameSinkManager::OnSurfaceDiscarded(const cc::SurfaceId& surface_id) {
133 } 134 }
134 135
136 void MojoFrameSinkManager::OnSurfaceDestroyed(const cc::SurfaceId& surface_id) {
137 }
138
139 void MojoFrameSinkManager::OnSurfaceDamageExpected(
140 const cc::SurfaceId& surface_id,
141 const cc::BeginFrameArgs& args) {}
142
135 void MojoFrameSinkManager::OnClientConnectionLost( 143 void MojoFrameSinkManager::OnClientConnectionLost(
136 const cc::FrameSinkId& frame_sink_id, 144 const cc::FrameSinkId& frame_sink_id,
137 bool destroy_compositor_frame_sink) { 145 bool destroy_compositor_frame_sink) {
138 DCHECK(thread_checker_.CalledOnValidThread()); 146 DCHECK(thread_checker_.CalledOnValidThread());
139 if (destroy_compositor_frame_sink) 147 if (destroy_compositor_frame_sink)
140 DestroyCompositorFrameSink(frame_sink_id); 148 DestroyCompositorFrameSink(frame_sink_id);
141 // TODO(fsamuel): Tell the frame sink manager host that the client connection 149 // TODO(fsamuel): Tell the frame sink manager host that the client connection
142 // has been lost so that it can drop its private connection and allow a new 150 // has been lost so that it can drop its private connection and allow a new
143 // client instance to create a new CompositorFrameSink. 151 // client instance to create a new CompositorFrameSink.
144 } 152 }
145 153
146 void MojoFrameSinkManager::OnPrivateConnectionLost( 154 void MojoFrameSinkManager::OnPrivateConnectionLost(
147 const cc::FrameSinkId& frame_sink_id, 155 const cc::FrameSinkId& frame_sink_id,
148 bool destroy_compositor_frame_sink) { 156 bool destroy_compositor_frame_sink) {
149 DCHECK(thread_checker_.CalledOnValidThread()); 157 DCHECK(thread_checker_.CalledOnValidThread());
150 if (destroy_compositor_frame_sink) 158 if (destroy_compositor_frame_sink)
151 DestroyCompositorFrameSink(frame_sink_id); 159 DestroyCompositorFrameSink(frame_sink_id);
152 } 160 }
153 161
154 } // namespace viz 162 } // namespace viz
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698