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

Unified Diff: ui/compositor/layer.cc

Issue 2919373002: cc: De-special-case SurfaceLayer code (Closed)
Patch Set: Fix cc_unittests Created 3 years, 6 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/aura/local/window_port_local.cc ('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 8e6138549251fe4adfee427cd6283498c2d8af42..d93b603475acdeabdfb3b3aac9905444525232cc 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -177,9 +177,13 @@ std::unique_ptr<Layer> Layer::Clone() const {
clone->SetAlphaShape(base::MakeUnique<SkRegion>(*alpha_shape_));
// cc::Layer state.
- if (surface_layer_ && surface_layer_->primary_surface_info().is_valid()) {
- clone->SetShowPrimarySurface(surface_layer_->primary_surface_info(),
- surface_layer_->surface_reference_factory());
+ if (surface_layer_) {
+ if (surface_layer_->primary_surface_info().is_valid()) {
+ clone->SetShowPrimarySurface(surface_layer_->primary_surface_info(),
+ surface_layer_->surface_reference_factory());
+ }
+ if (surface_layer_->fallback_surface_info().is_valid())
+ clone->SetFallbackSurface(surface_layer_->fallback_surface_info());
} else if (type_ == LAYER_SOLID_COLOR) {
clone->SetColor(GetTargetColor());
}
« no previous file with comments | « ui/aura/local/window_port_local.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698