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

Unified Diff: ui/android/delegated_frame_host_android.cc

Issue 2810813004: Hide fullscreen rotation jank (Closed)
Patch Set: Build error fixes 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 2d9389e5063601dd8617d1bf18fd419c03ce2e30..60c26e6c7ba3a1d1d38b1d4d8724c0b48d174a09 100644
--- a/ui/android/delegated_frame_host_android.cc
+++ b/ui/android/delegated_frame_host_android.cc
@@ -136,6 +136,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