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

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

Issue 2848223003: Enforce constant size and device scale factor for surfaces (Closed)
Patch Set: Notify CFSSClient when a frame is rejected 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_root_compositor_frame_sink.h" 5 #include "components/viz/frame_sinks/gpu_root_compositor_frame_sink.h"
6 6
7 #include "cc/surfaces/compositor_frame_sink_support.h" 7 #include "cc/surfaces/compositor_frame_sink_support.h"
8 #include "cc/surfaces/display.h" 8 #include "cc/surfaces/display.h"
9 9
10 namespace viz { 10 namespace viz {
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 void GpuRootCompositorFrameSink::ReclaimResources( 129 void GpuRootCompositorFrameSink::ReclaimResources(
130 const cc::ReturnedResourceArray& resources) { 130 const cc::ReturnedResourceArray& resources) {
131 if (client_) 131 if (client_)
132 client_->ReclaimResources(resources); 132 client_->ReclaimResources(resources);
133 } 133 }
134 134
135 void GpuRootCompositorFrameSink::WillDrawSurface( 135 void GpuRootCompositorFrameSink::WillDrawSurface(
136 const cc::LocalSurfaceId& local_surface_id, 136 const cc::LocalSurfaceId& local_surface_id,
137 const gfx::Rect& damage_rect) {} 137 const gfx::Rect& damage_rect) {}
138 138
139 void GpuRootCompositorFrameSink::DidRejectCompositorFrame() {
140 compositor_frame_sink_binding_.Close();
141 client_connection_lost_ = true;
142 }
143
139 void GpuRootCompositorFrameSink::OnClientConnectionLost() { 144 void GpuRootCompositorFrameSink::OnClientConnectionLost() {
140 client_connection_lost_ = true; 145 client_connection_lost_ = true;
141 // Request destruction of |this| only if both connections are lost. 146 // Request destruction of |this| only if both connections are lost.
142 delegate_->OnClientConnectionLost(support_->frame_sink_id(), 147 delegate_->OnClientConnectionLost(support_->frame_sink_id(),
143 private_connection_lost_); 148 private_connection_lost_);
144 } 149 }
145 150
146 void GpuRootCompositorFrameSink::OnPrivateConnectionLost() { 151 void GpuRootCompositorFrameSink::OnPrivateConnectionLost() {
147 private_connection_lost_ = true; 152 private_connection_lost_ = true;
148 // Request destruction of |this| only if both connections are lost. 153 // Request destruction of |this| only if both connections are lost.
149 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), 154 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(),
150 client_connection_lost_); 155 client_connection_lost_);
151 } 156 }
152 157
153 } // namespace viz 158 } // namespace viz
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698