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

Side by Side Diff: ui/compositor/layer.cc

Issue 2797263002: Aura-Mus: Implement gutter in the embedder. (Closed)
Patch Set: Addressed sadrul's comments 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/compositor/layer.h" 5 #include "ui/compositor/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 DCHECK(type_ == LAYER_TEXTURED || type_ == LAYER_SOLID_COLOR); 679 DCHECK(type_ == LAYER_TEXTURED || type_ == LAYER_SOLID_COLOR);
680 DCHECK(surface_layer_); 680 DCHECK(surface_layer_);
681 681
682 // TODO(fsamuel): We should compute the gutter in the display compositor. 682 // TODO(fsamuel): We should compute the gutter in the display compositor.
683 surface_layer_->SetFallbackSurfaceInfo(surface_info); 683 surface_layer_->SetFallbackSurfaceInfo(surface_info);
684 684
685 for (const auto& mirror : mirrors_) 685 for (const auto& mirror : mirrors_)
686 mirror->dest()->SetFallbackSurface(surface_info); 686 mirror->dest()->SetFallbackSurface(surface_info);
687 } 687 }
688 688
689 const cc::SurfaceInfo* Layer::GetFallbackSurfaceInfo() const {
690 if (surface_layer_)
691 return &surface_layer_->fallback_surface_info();
692 return nullptr;
693 }
694
689 void Layer::SetShowSolidColorContent() { 695 void Layer::SetShowSolidColorContent() {
690 DCHECK_EQ(type_, LAYER_SOLID_COLOR); 696 DCHECK_EQ(type_, LAYER_SOLID_COLOR);
691 697
692 if (solid_color_layer_.get()) 698 if (solid_color_layer_.get())
693 return; 699 return;
694 700
695 scoped_refptr<cc::SolidColorLayer> new_layer = cc::SolidColorLayer::Create(); 701 scoped_refptr<cc::SolidColorLayer> new_layer = cc::SolidColorLayer::Create();
696 SwitchToLayer(new_layer); 702 SwitchToLayer(new_layer);
697 solid_color_layer_ = new_layer; 703 solid_color_layer_ = new_layer;
698 704
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 const auto it = std::find_if(mirrors_.begin(), mirrors_.end(), 1193 const auto it = std::find_if(mirrors_.begin(), mirrors_.end(),
1188 [mirror](const std::unique_ptr<LayerMirror>& mirror_ptr) { 1194 [mirror](const std::unique_ptr<LayerMirror>& mirror_ptr) {
1189 return mirror_ptr.get() == mirror; 1195 return mirror_ptr.get() == mirror;
1190 }); 1196 });
1191 1197
1192 DCHECK(it != mirrors_.end()); 1198 DCHECK(it != mirrors_.end());
1193 mirrors_.erase(it); 1199 mirrors_.erase(it);
1194 } 1200 }
1195 1201
1196 } // namespace ui 1202 } // namespace ui
OLDNEW
« ui/aura/mus/client_surface_embedder.cc ('K') | « ui/compositor/layer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698