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

Side by Side Diff: ui/android/delegated_frame_host_android.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ui/android/delegated_frame_host_android.h" 5 #include "ui/android/delegated_frame_host_android.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "cc/layers/solid_color_layer.h" 10 #include "cc/layers/solid_color_layer.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 void DelegatedFrameHostAndroid::ReclaimResources( 173 void DelegatedFrameHostAndroid::ReclaimResources(
174 const cc::ReturnedResourceArray& resources) { 174 const cc::ReturnedResourceArray& resources) {
175 client_->ReclaimResources(resources); 175 client_->ReclaimResources(resources);
176 } 176 }
177 177
178 void DelegatedFrameHostAndroid::WillDrawSurface( 178 void DelegatedFrameHostAndroid::WillDrawSurface(
179 const cc::LocalSurfaceId& local_surface_id, 179 const cc::LocalSurfaceId& local_surface_id,
180 const gfx::Rect& damage_rect) {} 180 const gfx::Rect& damage_rect) {}
181 181
182 void DelegatedFrameHostAndroid::DidRejectCompositorFrame() {
183 NOTREACHED();
184 }
185
182 void DelegatedFrameHostAndroid::OnNeedsBeginFrames(bool needs_begin_frames) { 186 void DelegatedFrameHostAndroid::OnNeedsBeginFrames(bool needs_begin_frames) {
183 support_->SetNeedsBeginFrame(needs_begin_frames); 187 support_->SetNeedsBeginFrame(needs_begin_frames);
184 } 188 }
185 189
186 void DelegatedFrameHostAndroid::OnDidFinishFrame(const cc::BeginFrameAck& ack) { 190 void DelegatedFrameHostAndroid::OnDidFinishFrame(const cc::BeginFrameAck& ack) {
187 // If there was damage, SubmitCompositorFrame includes the ack. 191 // If there was damage, SubmitCompositorFrame includes the ack.
188 if (!ack.has_damage) 192 if (!ack.has_damage)
189 support_->BeginFrameDidNotSwap(ack); 193 support_->BeginFrameDidNotSwap(ack);
190 } 194 }
191 195
192 void DelegatedFrameHostAndroid::CreateNewCompositorFrameSinkSupport() { 196 void DelegatedFrameHostAndroid::CreateNewCompositorFrameSinkSupport() {
193 constexpr bool is_root = false; 197 constexpr bool is_root = false;
194 constexpr bool handles_frame_sink_id_invalidation = false; 198 constexpr bool handles_frame_sink_id_invalidation = false;
195 constexpr bool needs_sync_points = true; 199 constexpr bool needs_sync_points = true;
196 support_.reset(); 200 support_.reset();
197 support_ = cc::CompositorFrameSinkSupport::Create( 201 support_ = cc::CompositorFrameSinkSupport::Create(
198 this, surface_manager_, frame_sink_id_, is_root, 202 this, surface_manager_, frame_sink_id_, is_root,
199 handles_frame_sink_id_invalidation, needs_sync_points); 203 handles_frame_sink_id_invalidation, needs_sync_points);
200 } 204 }
201 205
202 cc::SurfaceId DelegatedFrameHostAndroid::SurfaceId() const { 206 cc::SurfaceId DelegatedFrameHostAndroid::SurfaceId() const {
203 return surface_info_.id(); 207 return surface_info_.id();
204 } 208 }
205 209
206 } // namespace ui 210 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698