Commit 61ab4887 authored by Sammie Quon's avatar Sammie Quon Committed by Commit Bot

overview: Fix bug with notches in the transformed window.

Think it has something to do with subpixel rendering, and/or the damage
on the bookmark bar is incorrect. It seems like a harmless and logical
enough fix I did not investigate further.

This can happen to any transformed browser window for instance the drag
from shelf feature. I didn't fix that one because its harder to notice
during a drag, and rounding during a drag can cause other visuals that
are less desirable.

Test: manual
Change-Id: Icc680063c3aed19e7811c918b622fb0da5a20d57
Fixed: 1035223
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2307615
Commit-Queue: Sammie Quon <sammiequon@chromium.org>
Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790012}
parent 468dc2e7
...@@ -32,12 +32,11 @@ ...@@ -32,12 +32,11 @@
#include "ui/aura/scoped_window_event_targeting_blocker.h" #include "ui/aura/scoped_window_event_targeting_blocker.h"
#include "ui/aura/window.h" #include "ui/aura/window.h"
#include "ui/compositor/layer.h" #include "ui/compositor/layer.h"
#include "ui/compositor/layer_animation_element.h"
#include "ui/compositor/layer_animation_observer.h" #include "ui/compositor/layer_animation_observer.h"
#include "ui/compositor/layer_animation_sequence.h"
#include "ui/compositor/layer_animator.h" #include "ui/compositor/layer_animator.h"
#include "ui/compositor/layer_observer.h" #include "ui/compositor/layer_observer.h"
#include "ui/gfx/geometry/insets.h" #include "ui/gfx/geometry/insets.h"
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/vector2d_f.h" #include "ui/gfx/geometry/vector2d_f.h"
#include "ui/gfx/transform_util.h" #include "ui/gfx/transform_util.h"
#include "ui/views/layout/layout_provider.h" #include "ui/views/layout/layout_provider.h"
...@@ -439,7 +438,11 @@ gfx::RectF ScopedOverviewTransformWindow::ShrinkRectToFitPreservingAspectRatio( ...@@ -439,7 +438,11 @@ gfx::RectF ScopedOverviewTransformWindow::ShrinkRectToFitPreservingAspectRatio(
break; break;
} }
return new_bounds; // If we do not use whole numbers, there may be some artifacts drawn (i.e.
// shadows, notches). This may be an effect of subpixel rendering. It's ok to
// round it here since this is the last calculation (we don't have to worry
// about roundoff error).
return gfx::RectF(gfx::ToRoundedRect(new_bounds));
} }
aura::Window* ScopedOverviewTransformWindow::GetOverviewWindow() const { aura::Window* ScopedOverviewTransformWindow::GetOverviewWindow() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment