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

Issue 867273003: Mac: Optimize toolbar/bookmark drawing during live resize (Closed)

Created:
5 years, 10 months ago by Andre
Modified:
5 years, 10 months ago
Reviewers:
Robert Sesek
CC:
chromium-reviews, erikchen
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/4f0f726c38ce69c3fc4ee437114631c513b60152 Cr-Commit-Position: refs/heads/master@{#314661}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Fix for rsesek #

Patch Set 3 : Rebased off 900613003 #

Total comments: 3

Patch Set 4 : Fix indent #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -1 line) Patch
M chrome/browser/ui/cocoa/background_gradient_view.mm View 1 2 3 1 chunk +30 lines, -1 line 0 comments Download

Messages

Total messages: 22 (7 generated)
Andre
Robert, please review. https://codereview.chromium.org/867273003/diff/1/chrome/browser/ui/cocoa/background_gradient_view.mm File chrome/browser/ui/cocoa/background_gradient_view.mm (left): https://codereview.chromium.org/867273003/diff/1/chrome/browser/ui/cocoa/background_gradient_view.mm#oldcode130 chrome/browser/ui/cocoa/background_gradient_view.mm:130: removeObserver:self This looks like a bug. ...
5 years, 10 months ago (2015-01-31 01:00:48 UTC) #2
Robert Sesek
https://codereview.chromium.org/867273003/diff/1/chrome/browser/ui/cocoa/background_gradient_view.mm File chrome/browser/ui/cocoa/background_gradient_view.mm (right): https://codereview.chromium.org/867273003/diff/1/chrome/browser/ui/cocoa/background_gradient_view.mm#newcode162 chrome/browser/ui/cocoa/background_gradient_view.mm:162: NSViewLayerContentsRedrawOnSetNeedsDisplay]; nit: over-indented https://codereview.chromium.org/867273003/diff/1/chrome/browser/ui/cocoa/tabs/tab_strip_view.mm File chrome/browser/ui/cocoa/tabs/tab_strip_view.mm (right): https://codereview.chromium.org/867273003/diff/1/chrome/browser/ui/cocoa/tabs/tab_strip_view.mm#newcode103 chrome/browser/ui/cocoa/tabs/tab_strip_view.mm:103: ...
5 years, 10 months ago (2015-02-02 19:32:16 UTC) #3
Andre
https://codereview.chromium.org/867273003/diff/1/chrome/browser/ui/cocoa/background_gradient_view.mm File chrome/browser/ui/cocoa/background_gradient_view.mm (right): https://codereview.chromium.org/867273003/diff/1/chrome/browser/ui/cocoa/background_gradient_view.mm#newcode162 chrome/browser/ui/cocoa/background_gradient_view.mm:162: NSViewLayerContentsRedrawOnSetNeedsDisplay]; On 2015/02/02 19:32:16, Robert Sesek wrote: > nit: ...
5 years, 10 months ago (2015-02-02 21:40:09 UTC) #4
Robert Sesek
LGTM
5 years, 10 months ago (2015-02-02 21:43:13 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/867273003/20001
5 years, 10 months ago (2015-02-02 21:45:51 UTC) #7
Andre
I found a bug with this. TabStripView was relying on BackgroundGradientView calling cr_recursivelySetNeedsDisplay to trigger ...
5 years, 10 months ago (2015-02-03 18:44:12 UTC) #9
Andre
Robert, PTAL at patch #3. It is rebased off https://codereview.chromium.org/900613003/
5 years, 10 months ago (2015-02-04 00:34:22 UTC) #10
Robert Sesek
LGTM https://codereview.chromium.org/867273003/diff/40001/chrome/browser/ui/cocoa/background_gradient_view.mm File chrome/browser/ui/cocoa/background_gradient_view.mm (right): https://codereview.chromium.org/867273003/diff/40001/chrome/browser/ui/cocoa/background_gradient_view.mm#newcode133 chrome/browser/ui/cocoa/background_gradient_view.mm:133: NSViewLayerContentsRedrawOnSetNeedsDisplay]; nit: over-indented
5 years, 10 months ago (2015-02-04 16:13:50 UTC) #11
Andre
https://codereview.chromium.org/867273003/diff/40001/chrome/browser/ui/cocoa/background_gradient_view.mm File chrome/browser/ui/cocoa/background_gradient_view.mm (right): https://codereview.chromium.org/867273003/diff/40001/chrome/browser/ui/cocoa/background_gradient_view.mm#newcode133 chrome/browser/ui/cocoa/background_gradient_view.mm:133: NSViewLayerContentsRedrawOnSetNeedsDisplay]; On 2015/02/04 16:13:49, Robert Sesek wrote: > nit: ...
5 years, 10 months ago (2015-02-04 16:46:26 UTC) #13
Robert Sesek
https://codereview.chromium.org/867273003/diff/40001/chrome/browser/ui/cocoa/background_gradient_view.mm File chrome/browser/ui/cocoa/background_gradient_view.mm (right): https://codereview.chromium.org/867273003/diff/40001/chrome/browser/ui/cocoa/background_gradient_view.mm#newcode133 chrome/browser/ui/cocoa/background_gradient_view.mm:133: NSViewLayerContentsRedrawOnSetNeedsDisplay]; On 2015/02/04 16:46:26, Andre wrote: > On 2015/02/04 ...
5 years, 10 months ago (2015-02-04 16:54:56 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/867273003/60001
5 years, 10 months ago (2015-02-04 17:27:19 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/30547)
5 years, 10 months ago (2015-02-04 18:28:08 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/867273003/60001
5 years, 10 months ago (2015-02-04 22:25:58 UTC) #20
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 10 months ago (2015-02-04 22:27:09 UTC) #21
commit-bot: I haz the power
5 years, 10 months ago (2015-02-04 22:28:09 UTC) #22
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/4f0f726c38ce69c3fc4ee437114631c513b60152
Cr-Commit-Position: refs/heads/master@{#314661}

Powered by Google App Engine
This is Rietveld 408576698