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

Unified Diff: android_webview/browser/surfaces_instance.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 side-by-side diff with in-line comments
Download patch
Index: android_webview/browser/surfaces_instance.cc
diff --git a/android_webview/browser/surfaces_instance.cc b/android_webview/browser/surfaces_instance.cc
index b8599fe91175b5e7f1707cb68f7d8cf789bf212a..76d1df9b2df8aa91624dcfe2fa8bf4e363b30746 100644
--- a/android_webview/browser/surfaces_instance.cc
+++ b/android_webview/browser/surfaces_instance.cc
@@ -139,6 +139,7 @@ void SurfacesInstance::DrawAndSwap(const gfx::Size& viewport,
frame.metadata.begin_frame_ack =
cc::BeginFrameAck::CreateManualAckWithDamage();
frame.render_pass_list.push_back(std::move(render_pass));
+ frame.metadata.device_scale_factor = 1.f;
frame.metadata.referenced_surfaces = child_ids_;
if (!root_id_.is_valid() || frame_size != surface_size_) {
@@ -186,6 +187,7 @@ void SurfacesInstance::SetSolidColorRootFrame() {
frame.metadata.begin_frame_ack =
cc::BeginFrameAck::CreateManualAckWithDamage();
frame.metadata.referenced_surfaces = child_ids_;
+ frame.metadata.device_scale_factor = 1;
support_->SubmitCompositorFrame(root_id_, std::move(frame));
}
@@ -206,4 +208,8 @@ void SurfacesInstance::ReclaimResources(
CHECK(resources.empty());
}
+void SurfacesInstance::DidRejectCompositorFrame() {
+ NOTREACHED();
+}
+
} // namespace android_webview

Powered by Google App Engine
This is Rietveld 408576698