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

Unified Diff: cc/layers/surface_layer_impl.cc

Issue 2880023002: cc::SurfaceDependencyTracker should not crash when a Display goes away (Closed)
Patch Set: Fix LayerTreeHostImpl unit tests 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
« no previous file with comments | « no previous file | cc/layers/surface_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/surface_layer_impl.cc
diff --git a/cc/layers/surface_layer_impl.cc b/cc/layers/surface_layer_impl.cc
index 714e88bd0037c80bb14df677fbb97d60bec100c1..e42bca07ed53d0445ff749fab0cc890b0be9ec1a 100644
--- a/cc/layers/surface_layer_impl.cc
+++ b/cc/layers/surface_layer_impl.cc
@@ -72,7 +72,8 @@ void SurfaceLayerImpl::AppendQuads(RenderPass* render_pass,
// Emitting a fallback SurfaceDrawQuad is unnecessary if the primary and
// fallback surface Ids match.
bool needs_fallback =
- fallback_surface_info_.id() != primary_surface_info_.id();
+ fallback_surface_info_.is_valid() &&
+ (fallback_surface_info_.id() != primary_surface_info_.id());
if (primary && needs_fallback) {
// Add the primary surface ID as a dependency.
append_quads_data->activation_dependencies.push_back(
« no previous file with comments | « no previous file | cc/layers/surface_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698