Mac: Optimize toolbar/bookmark drawing during live resize
commit4f0f726c38ce69c3fc4ee437114631c513b60152
authorandresantoso <andresantoso@chromium.org>
Wed, 4 Feb 2015 22:26:40 +0000 (4 14:26 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 4 Feb 2015 22:27:39 +0000 (4 22:27 +0000)
tree7550762a1e768dd890fe23318b0f25fbebedb4b7
parent715cb510d3fe596bf604c2e48741fbc08d1e9aee
Mac: Optimize toolbar/bookmark drawing during live resize

The default theme's background image is a subtle texture pattern that we can
scale without being easily noticed.
When using the default theme, let the layer get scaled during live resize
and redraw at the end of resize.

TabStripView is changed to no longer be a subclass of
BackgroundGradientView because we don't want to scale its layer (it may
draw a drop arrow).
It is also inefficient for it to call cr_recursivelySetNeedsDisplay.

With this optimization, the following views no longer redraw repeatedly
during live resize (when using default theme):
    ToolbarView
    BookmarkBarToolbarView
    DownloadShelfView
    OmniboxPopupTopSeparatorView

BUG=453996

Review URL: https://codereview.chromium.org/867273003

Cr-Commit-Position: refs/heads/master@{#314661}
chrome/browser/ui/cocoa/background_gradient_view.mm