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

Unified Diff: content/browser/compositor/onscreen_display_client.cc

Issue 677983006: Don't draw display when its OutputSurface is lost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « content/browser/compositor/onscreen_display_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/onscreen_display_client.cc
diff --git a/content/browser/compositor/onscreen_display_client.cc b/content/browser/compositor/onscreen_display_client.cc
index dbec4508926d4e9435a85f6d797d4c8e2ad2e5d2..6e2241d6cb1fbad34c892784d7a5c1968203a223 100644
--- a/content/browser/compositor/onscreen_display_client.cc
+++ b/content/browser/compositor/onscreen_display_client.cc
@@ -25,6 +25,7 @@ OnscreenDisplayClient::OnscreenDisplayClient(
BrowserGpuMemoryBufferManager::current())),
task_runner_(task_runner),
scheduled_draw_(false),
+ output_surface_lost_(false),
deferred_draw_(false),
pending_frames_(0),
weak_ptr_factory_(this) {
@@ -63,11 +64,14 @@ void OnscreenDisplayClient::ScheduleDraw() {
}
void OnscreenDisplayClient::OutputSurfaceLost() {
+ output_surface_lost_ = true;
surface_display_output_surface_->DidLoseOutputSurface();
}
void OnscreenDisplayClient::Draw() {
TRACE_EVENT0("content", "OnscreenDisplayClient::Draw");
+ if (output_surface_lost_)
+ return;
scheduled_draw_ = false;
display_->Draw();
}
« no previous file with comments | « content/browser/compositor/onscreen_display_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698