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

Unified Diff: ui/android/delegated_frame_host_android.cc

Issue 2527283003: cc: Introduce BeginFrame sequence numbers and acknowledgements.
Patch Set: Address Brian's comments. Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/android/delegated_frame_host_android.h ('k') | ui/android/window_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/delegated_frame_host_android.cc
diff --git a/ui/android/delegated_frame_host_android.cc b/ui/android/delegated_frame_host_android.cc
index f9f6e448cb34a7e4144f9cb698aaa667db100b39..7dcae4546e3074c82c3d1ec9175c4ee854705665 100644
--- a/ui/android/delegated_frame_host_android.cc
+++ b/ui/android/delegated_frame_host_android.cc
@@ -70,17 +70,16 @@ void CopyOutputRequestCallback(
} // namespace
-DelegatedFrameHostAndroid::DelegatedFrameHostAndroid(
- ui::ViewAndroid* view,
- SkColor background_color,
- ReturnResourcesCallback return_resources_callback)
+DelegatedFrameHostAndroid::DelegatedFrameHostAndroid(ui::ViewAndroid* view,
+ SkColor background_color,
+ Client* client)
: frame_sink_id_(
ui::ContextProviderFactory::GetInstance()->AllocateFrameSinkId()),
view_(view),
- return_resources_callback_(return_resources_callback),
+ client_(client),
background_layer_(cc::SolidColorLayer::Create()) {
DCHECK(view_);
- DCHECK(!return_resources_callback_.is_null());
+ DCHECK(client_);
surface_manager_ =
ui::ContextProviderFactory::GetInstance()->GetSurfaceManager();
@@ -242,13 +241,12 @@ void DelegatedFrameHostAndroid::UnregisterFrameSinkHierarchy() {
void DelegatedFrameHostAndroid::ReturnResources(
const cc::ReturnedResourceArray& resources) {
- return_resources_callback_.Run(resources);
+ client_->ReturnResources(resources);
}
void DelegatedFrameHostAndroid::SetBeginFrameSource(
cc::BeginFrameSource* begin_frame_source) {
- // TODO(enne): hook this up instead of making RWHVAndroid a
- // WindowAndroidObserver.
+ client_->SetBeginFrameSource(begin_frame_source);
}
void DelegatedFrameHostAndroid::UpdateBackgroundLayer() {
« no previous file with comments | « ui/android/delegated_frame_host_android.h ('k') | ui/android/window_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698