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

Unified Diff: ui/aura/mus/client_surface_embedder.cc

Issue 2919523004: Surface synchronization: Don't gutter translucent windows (Closed)
Patch Set: Created 3 years, 7 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 | « services/ui/public/interfaces/window_manager.mojom ('k') | ui/views/mus/mus_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/client_surface_embedder.cc
diff --git a/ui/aura/mus/client_surface_embedder.cc b/ui/aura/mus/client_surface_embedder.cc
index 4458206266e05b3322dc1170b2e4aed70fbab637..426059be1eb6a68779898fab0ce2d990b19a667a 100644
--- a/ui/aura/mus/client_surface_embedder.cc
+++ b/ui/aura/mus/client_surface_embedder.cc
@@ -76,7 +76,8 @@ void ClientSurfaceEmbedder::UpdateSizeAndGutters() {
fallback_device_scale_factor, fallback_surface_info->size_in_pixels());
}
gfx::Rect window_bounds(window_->bounds());
- if (fallback_surface_size_in_dip.width() < window_bounds.width()) {
+ if (!window_->transparent() &&
+ fallback_surface_size_in_dip.width() < window_bounds.width()) {
right_gutter_ = base::MakeUnique<ui::Layer>(ui::LAYER_SOLID_COLOR);
// TODO(fsamuel): Use the embedded client's background color.
right_gutter_->SetColor(SK_ColorWHITE);
@@ -93,7 +94,7 @@ void ClientSurfaceEmbedder::UpdateSizeAndGutters() {
// Only create a bottom gutter if a fallback surface is available. Otherwise,
// the right gutter will fill the whole window until a fallback is available.
- if (!fallback_surface_size_in_dip.IsEmpty() &&
+ if (!window_->transparent() && !fallback_surface_size_in_dip.IsEmpty() &&
fallback_surface_size_in_dip.height() < window_bounds.height()) {
bottom_gutter_ = base::MakeUnique<ui::Layer>(ui::LAYER_SOLID_COLOR);
// TODO(fsamuel): Use the embedded client's background color.
« no previous file with comments | « services/ui/public/interfaces/window_manager.mojom ('k') | ui/views/mus/mus_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698