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

Unified Diff: cc/layers/surface_layer_impl.cc

Issue 2861593002: cc: Only add surface ID to embedded_surfaces if fallback does not match (Closed)
Patch Set: Updated Created 3 years, 8 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 7a1bfbd9795c782104a565971fac205ee98ad678..4581e556b2a5ebf87456c134e4f2d2af15a4b3bc 100644
--- a/cc/layers/surface_layer_impl.cc
+++ b/cc/layers/surface_layer_impl.cc
@@ -65,12 +65,14 @@ void SurfaceLayerImpl::PushPropertiesTo(LayerImpl* layer) {
void SurfaceLayerImpl::AppendQuads(RenderPass* render_pass,
AppendQuadsData* append_quads_data) {
AppendRainbowDebugBorder(render_pass);
+ bool needs_synchronization =
danakj 2017/05/04 19:14:08 nit: needs_fallback?
Fady Samuel 2017/05/04 20:03:48 Done.
+ fallback_surface_info_.id() != primary_surface_info_.id();
auto* primary = CreateSurfaceDrawQuad(
render_pass, SurfaceDrawQuadType::PRIMARY, primary_surface_info_,
- &append_quads_data->embedded_surfaces);
+ needs_synchronization ? &append_quads_data->embedded_surfaces : nullptr);
danakj 2017/05/04 19:14:08 The side effects here are very unclear, with the r
Fady Samuel 2017/05/04 20:03:48 Done.
// Emitting a fallback SurfaceDrawQuad is unnecessary if the primary and
// fallback surface Ids match.
- if (primary && fallback_surface_info_.id() != primary_surface_info_.id()) {
+ if (primary && needs_synchronization) {
primary->fallback_quad = CreateSurfaceDrawQuad(
render_pass, SurfaceDrawQuadType::FALLBACK, fallback_surface_info_,
nullptr /* embedded_surfaces */);
« 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