Commit 025c4917 authored by akaba's avatar akaba Committed by Commit Bot

Make Frame eviction more consistent between between Android and Desktop.

A follow up CL to
https://chromium.googlesource.com/chromium/src.git/+/ebc96c6441c8c03dfde6ddd04b0b8465a83c858e
to make DelegatedFrameHost::EvictDelegatedFrame consistant with
DelegatedFrameHostAndroid::EvictDelegatedFrame.

Bug: 861764
Change-Id: I71b5e3a4c34f08f911bc0022d2b2dcb08427bb5a
Reviewed-on: https://chromium-review.googlesource.com/1141991Reviewed-by: default avatarSaman Sami <samans@chromium.org>
Reviewed-by: default avatarFady Samuel <fsamuel@chromium.org>
Commit-Queue: Andre Kaba <akaba@google.com>
Cr-Commit-Position: refs/heads/master@{#577029}
parent 363f2431
......@@ -402,8 +402,16 @@ void DelegatedFrameHost::OnBeginFrame(const viz::BeginFrameArgs& args) {
}
void DelegatedFrameHost::EvictDelegatedFrame() {
// Replaces the SurfaceLayer with a SolidColorLayer.
client_->DelegatedFrameHostGetLayer()->SetShowSolidColorContent();
// Reset fallback and primary surfaces.
if (HasFallbackSurface()) {
client_->DelegatedFrameHostGetLayer()->SetFallbackSurfaceId(
viz::SurfaceId());
}
if (HasPrimarySurface()) {
client_->DelegatedFrameHostGetLayer()->SetShowPrimarySurface(
viz::SurfaceId(), current_frame_size_in_dip_, GetGutterColor(),
cc::DeadlinePolicy::UseDefaultDeadline(), false);
}
if (!HasSavedFrame())
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment