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

Side by Side Diff: ui/android/delegated_frame_host_android.cc

Issue 2807653003: Move Work From CompositorFrameSinkSupport() To Init() (Closed)
Patch Set: Add CompositorFrameSinkSupport::Create 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
« no previous file with comments | « content/renderer/android/synchronous_compositor_frame_sink.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 support_->SetNeedsBeginFrame(needs_begin_frames); 181 support_->SetNeedsBeginFrame(needs_begin_frames);
182 } 182 }
183 183
184 void DelegatedFrameHostAndroid::OnDidFinishFrame(const cc::BeginFrameAck& ack) { 184 void DelegatedFrameHostAndroid::OnDidFinishFrame(const cc::BeginFrameAck& ack) {
185 // If there was damage, SubmitCompositorFrame includes the ack. 185 // If there was damage, SubmitCompositorFrame includes the ack.
186 if (!ack.has_damage) 186 if (!ack.has_damage)
187 support_->BeginFrameDidNotSwap(ack); 187 support_->BeginFrameDidNotSwap(ack);
188 } 188 }
189 189
190 void DelegatedFrameHostAndroid::CreateNewCompositorFrameSinkSupport() { 190 void DelegatedFrameHostAndroid::CreateNewCompositorFrameSinkSupport() {
191 constexpr bool is_root = false;
192 constexpr bool handles_frame_sink_id_invalidation = false;
193 constexpr bool needs_sync_points = true;
191 support_.reset(); 194 support_.reset();
192 support_ = base::MakeUnique<cc::CompositorFrameSinkSupport>( 195 support_ = cc::CompositorFrameSinkSupport::Create(
193 this, surface_manager_, frame_sink_id_, false /* is_root */, 196 this, surface_manager_, frame_sink_id_, is_root,
194 false /* handles_frame_sink_id_invalidation */, 197 handles_frame_sink_id_invalidation, needs_sync_points);
195 true /* needs_sync_points */);
196 } 198 }
197 199
198 cc::SurfaceId DelegatedFrameHostAndroid::SurfaceId() const { 200 cc::SurfaceId DelegatedFrameHostAndroid::SurfaceId() const {
199 return surface_info_.id(); 201 return surface_info_.id();
200 } 202 }
201 203
202 } // namespace ui 204 } // namespace ui
OLDNEW
« no previous file with comments | « content/renderer/android/synchronous_compositor_frame_sink.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698