Skip to content

Commit

Permalink
Fix flickering Mac app launcher progress bar on <10.9
Browse files Browse the repository at this point in the history
On Mavericks, the app lanucher subviews need to have access to a
compositing layer they can share. Otherwise the compositor makes tearing
artifacts. However, doing this on Mountain Lion or earlier results in
flickering whilst an item is installing IF the app launcher menu is also
opened - a different Apple bug.

This CL restricts the fix for the tearing to Mavericks or later.

BUG=362547
TEST=Install a large app from the webstore on Mountain Lion (10.8) or
earlier. Open the app launcher menu. The progress bar should not
flicker.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267189 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
tapted@chromium.org committed Apr 30, 2014
1 parent 7907c65 commit c3a0bf3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ui/app_list/cocoa/app_list_view_controller.mm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#import "ui/app_list/cocoa/app_list_view_controller.h"

#include "base/mac/foundation_util.h"
#include "base/mac/mac_util.h"
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
#include "skia/ext/skia_utils_mac.h"
Expand Down Expand Up @@ -199,9 +200,12 @@ -(void)loadAndSetView {
contentsView_.reset([[FlippedView alloc] initWithFrame:contentsRect]);

// The contents view contains animations both from an NSCollectionView and the
// app list's own transitive drag layers. Ensure the subviews have access to
// a compositing layer they can share.
[contentsView_ setWantsLayer:YES];
// app list's own transitive drag layers. On Mavericks, the subviews need to
// have access to a compositing layer they can share. Otherwise the compositor
// makes tearing artifacts. However, doing this on Mountain Lion or earler
// results in flickering whilst an item is installing.
if (base::mac::IsOSMavericksOrLater())
[contentsView_ setWantsLayer:YES];

backgroundView_.reset(
[[BackgroundView alloc] initWithFrame:
Expand Down

0 comments on commit c3a0bf3

Please sign in to comment.