Commit ebc96c64 authored by akaba's avatar akaba Committed by Commit Bot

Frame Eviction reset the whole surface range

Frame eviction shouldn't just reset the fallback to an unvalid surface but should reset the primary too. This is done by replacing the SurfaceLayer with a SolidColorLayer.

Bug: 861764
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I18b9ee11c9d0132dd41eb34a8dc79bdae09af393
Reviewed-on: https://chromium-review.googlesource.com/1136847
Commit-Queue: Andre Kaba <akaba@google.com>
Reviewed-by: default avatarFady Samuel <fsamuel@chromium.org>
Reviewed-by: default avatarSaman Sami <samans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575340}
parent 0d4d0331
......@@ -60,7 +60,7 @@ class CC_EXPORT SurfaceLayer : public Layer {
private:
~SurfaceLayer() override;
// Returns a SurfaceRange corresponding the surface layer.
// Returns a SurfaceRange corresponding to the surface layer.
viz::SurfaceRange GetSurfaceRange() const;
viz::SurfaceId primary_surface_id_;
......
......@@ -402,13 +402,8 @@ void DelegatedFrameHost::OnBeginFrame(const viz::BeginFrameArgs& args) {
}
void DelegatedFrameHost::EvictDelegatedFrame() {
// It is possible that we are embedding the contents of previous
// DelegatedFrameHost. In this case, HasSavedFrame() will return false but we
// still need to clear the layer.
if (HasFallbackSurface()) {
client_->DelegatedFrameHostGetLayer()->SetFallbackSurfaceId(
viz::SurfaceId());
}
// Replaces the SurfaceLayer with a SolidColorLayer.
client_->DelegatedFrameHostGetLayer()->SetShowSolidColorContent();
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