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

Unified Diff: cc/layers/surface_layer_impl.cc

Issue 2696303002: Only emit a fallback SurfaceDrawQuad if differs from primary (Closed)
Patch Set: Created 3 years, 10 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 16eac7bfbefeabd8e451c67e06dbfe6d920d8f29..17f78a3570514080b7c852a82555a857f9f2e11f 100644
--- a/cc/layers/surface_layer_impl.cc
+++ b/cc/layers/surface_layer_impl.cc
@@ -66,7 +66,9 @@ void SurfaceLayerImpl::AppendQuads(RenderPass* render_pass,
AppendRainbowDebugBorder(render_pass);
auto* primary = CreateSurfaceDrawQuad(
render_pass, SurfaceDrawQuadType::PRIMARY, primary_surface_info_);
- if (primary) {
+ // Emitting a fallback SurfaceDrawQuad is unnecessary if the primary and
+ // fallback surface Ids match.
+ if (primary && fallback_surface_info_.id() != primary_surface_info_.id()) {
vmpstr 2017/02/16 00:52:12 I'm guessing this comparison takes into account th
Fady Samuel 2017/02/16 01:16:10 If the fallback SurfaceId is invalid then CreateS
primary->fallback_quad = CreateSurfaceDrawQuad(
render_pass, SurfaceDrawQuadType::FALLBACK, fallback_surface_info_);
}
« 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