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

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

Issue 2801313002: Remove MojoCompositorFrameSink::WillDrawSurface (Closed)
Patch Set: Address Nit Created 3 years, 8 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/gpu_compositor_frame_sink.h" 5 #include "components/viz/frame_sinks/gpu_compositor_frame_sink.h"
6 6
7 namespace viz { 7 namespace viz {
8 8
9 GpuCompositorFrameSink::GpuCompositorFrameSink( 9 GpuCompositorFrameSink::GpuCompositorFrameSink(
10 GpuCompositorFrameSinkDelegate* delegate, 10 GpuCompositorFrameSinkDelegate* delegate,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 76 }
77 77
78 void GpuCompositorFrameSink::ReclaimResources( 78 void GpuCompositorFrameSink::ReclaimResources(
79 const cc::ReturnedResourceArray& resources) { 79 const cc::ReturnedResourceArray& resources) {
80 if (client_) 80 if (client_)
81 client_->ReclaimResources(resources); 81 client_->ReclaimResources(resources);
82 } 82 }
83 83
84 void GpuCompositorFrameSink::WillDrawSurface( 84 void GpuCompositorFrameSink::WillDrawSurface(
85 const cc::LocalSurfaceId& local_surface_id, 85 const cc::LocalSurfaceId& local_surface_id,
86 const gfx::Rect& damage_rect) { 86 const gfx::Rect& damage_rect) {}
87 if (client_)
88 client_->WillDrawSurface(local_surface_id, damage_rect);
89 }
90 87
91 void GpuCompositorFrameSink::OnClientConnectionLost() { 88 void GpuCompositorFrameSink::OnClientConnectionLost() {
92 client_connection_lost_ = true; 89 client_connection_lost_ = true;
93 // Request destruction of |this| only if both connections are lost. 90 // Request destruction of |this| only if both connections are lost.
94 delegate_->OnClientConnectionLost(support_->frame_sink_id(), 91 delegate_->OnClientConnectionLost(support_->frame_sink_id(),
95 private_connection_lost_); 92 private_connection_lost_);
96 } 93 }
97 94
98 void GpuCompositorFrameSink::OnPrivateConnectionLost() { 95 void GpuCompositorFrameSink::OnPrivateConnectionLost() {
99 private_connection_lost_ = true; 96 private_connection_lost_ = true;
100 // Request destruction of |this| only if both connections are lost. 97 // Request destruction of |this| only if both connections are lost.
101 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), 98 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(),
102 client_connection_lost_); 99 client_connection_lost_);
103 } 100 }
104 101
105 } // namespace viz 102 } // namespace viz
OLDNEW
« no previous file with comments | « components/exo/compositor_frame_sink_holder.cc ('k') | components/viz/frame_sinks/gpu_root_compositor_frame_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698