diff options
author | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-01 23:55:35 +0000 |
---|---|---|
committer | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-01 23:55:35 +0000 |
commit | 7b2bc7c98e541467cc86a32121a20f943ebaf590 (patch) | |
tree | 2395d2099d6ede52eb042af8d8e8cd2c3c29fff9 | |
parent | ff13e49b5490c1874a36a64afd0d4a127cc8c410 (diff) | |
download | chromium_src-7b2bc7c98e541467cc86a32121a20f943ebaf590.zip chromium_src-7b2bc7c98e541467cc86a32121a20f943ebaf590.tar.gz chromium_src-7b2bc7c98e541467cc86a32121a20f943ebaf590.tar.bz2 |
Core Animation: Work around for white tab issue
Tabs created in the background would just appear white and not update.
It appears that the software layer for the tab is getting draw calls
but nothing seems to get flushed to the screen.
Moving the layer creation to after the view has been parented seems to
work around the issue.
BUG=255569
TEST=Disable GPU composting.
Run chrome with --use-core-animation="lazy". Non-lazy core animation
doesn't have this issue.
Open a link in the background. Switch to the new tab and verify that
it's painting correctly.
Review URL: https://chromiumcodereview.appspot.com/18230003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209546 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/browser/renderer_host/render_widget_host_view_mac.mm | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm index b61cf08..7e86f054 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -2361,6 +2361,11 @@ void RenderWidgetHostViewMac::FrameSwapped() { } } +- (void)viewDidMoveToSuperview { + if ([[self superview] wantsLayer]) + renderWidgetHostView_->EnableCoreAnimation(); +} + - (void)viewWillMoveToWindow:(NSWindow*)newWindow { NSWindow* oldWindow = [self window]; @@ -2369,13 +2374,6 @@ void RenderWidgetHostViewMac::FrameSwapped() { if (!renderWidgetHostView_->use_core_animation_) [oldWindow disableScreenUpdatesUntilFlush]; - // If the new window for this view is using CoreAnimation then enable - // CoreAnimation on this view. - if (GetCoreAnimationStatus() == CORE_ANIMATION_ENABLED_LAZY && - [[newWindow contentView] wantsLayer]) { - renderWidgetHostView_->EnableCoreAnimation(); - } - NSNotificationCenter* notificationCenter = [NSNotificationCenter defaultCenter]; if (oldWindow) { |