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

Unified Diff: ui/android/delegated_frame_host_android.cc

Issue 2810813004: Hide fullscreen rotation jank (Closed)
Patch Set: Show a black frame during fullscreen transitions to hide jank 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 side-by-side diff with in-line comments
Download patch
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 e33c8b443c49a75fd9021635d6c26b9b74186bb9..0de9596f2bcaf1f2ffcc551e891ee57c3897a676 100644
--- a/ui/android/delegated_frame_host_android.cc
+++ b/ui/android/delegated_frame_host_android.cc
@@ -131,6 +131,18 @@ void DelegatedFrameHostAndroid::DestroyDelegatedContent() {
surface_info_ = cc::SurfaceInfo();
}
+namespace {
+void IgnoreDrawCallback() {}
+void IgnoreWillDrawCallback(const cc::LocalSurfaceId&, const gfx::Rect&) {}
+}
+
+void DelegatedFrameHostAndroid::ForceFrame(cc::CompositorFrame frame) {
+ cc::Surface* surface = surface_manager_->GetSurfaceForId(SurfaceId());
+ if (surface)
+ surface->QueueFrame(std::move(frame), base::Bind(&IgnoreDrawCallback),
+ base::BindRepeating(&IgnoreWillDrawCallback));
+}
+
bool DelegatedFrameHostAndroid::HasDelegatedContent() const {
return surface_info_.is_valid();
}

Powered by Google App Engine
This is Rietveld 408576698