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

Unified Diff: ui/compositor/layer.cc

Issue 2582823002: WIP: Surface Synchronization System
Patch Set: First cut propagating LocalSurfaceId when WindowTreeHost requests resize Created 3 years, 9 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 | « ui/compositor/layer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index 3467b0ebf1ef6b217fd970bde12a032ebe89caed..7f944fa3550310bb1121574f6f520b1d8e3933d2 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -675,6 +675,21 @@ void Layer::SetShowPrimarySurface(
mirror->dest()->SetShowPrimarySurface(surface_info, ref_factory);
}
+void Layer::SetFallbackSurface(
+ const cc::SurfaceInfo& surface_info,
+ scoped_refptr<cc::SurfaceReferenceFactory> ref_factory) {
+ DCHECK(type_ == LAYER_TEXTURED || type_ == LAYER_SOLID_COLOR);
+ DCHECK(surface_layer_);
+
+ // TODO(fsamuel): We should compute the gutter in the display compositor.
+ // If the SurfaceLayer is NOT opaque, then the parent client should manually
+ // insert gutter layers.
+ surface_layer_->SetFallbackSurfaceInfo(surface_info);
+
+ for (const auto& mirror : mirrors_)
+ mirror->dest()->SetFallbackSurface(surface_info, ref_factory);
+}
+
void Layer::SetShowSolidColorContent() {
DCHECK_EQ(type_, LAYER_SOLID_COLOR);
« no previous file with comments | « ui/compositor/layer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698