diff options
author | boliu <boliu@chromium.org> | 2015-03-25 09:18:51 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-25 16:19:34 +0000 |
commit | 8f4d93f89393359f6a6f73ad06a0619027a0ca95 (patch) | |
tree | 7cd6da49b677132d068325c88c511260d8ff8ddb /content/browser/renderer_host/delegated_frame_evictor.cc | |
parent | 6072951da5e97bb2571419005dae5da1f24e06cc (diff) | |
download | chromium_src-8f4d93f89393359f6a6f73ad06a0619027a0ca95.zip chromium_src-8f4d93f89393359f6a6f73ad06a0619027a0ca95.tar.gz chromium_src-8f4d93f89393359f6a6f73ad06a0619027a0ca95.tar.bz2 |
Revert of [Android] Stop hiding the RWHV layer subtree when hiding the widget (patchset #10 id:270001 of https://codereview.chromium.org/1001573003/)
Reason for revert:
Breaks Android WebView which does not call ApplicationStatus.initialize
Original issue's description:
> [Android] Preserve the front buffer when the activity is paused
>
> Currently, when an activity is stopped, we explicitly hide the
> foreground Tab. This is problematic, as current hiding semantics
> might clear the visual front buffer before the window is hidden.
> This in turn causes an unpleasant flickering during activity
> transitions, e.g., when backgrounding Chrome or locking the screen.
>
> Wire Activity onPause/onResume notifications to WindowAndroidObservers,
> allowing the foreground tab to preserve its front buffer while hiding
> its web content. If the tab is explicitly hidden, or the root window
> is lost, the front buffer will be cleared as usual.
>
> BUG=462752,434401
>
> Committed: https://crrev.com/764f31d287a4995f0c89915745f5749e1c7063af
> Cr-Commit-Position: refs/heads/master@{#322052}
TBR=sievers@chromium.org,dtrainor@chromium.org,tedchoc@chromium.org,piman@chromium.org,torne@chromium.org,jdduke@chromium.org
BUG=462752,434401
Review URL: https://codereview.chromium.org/1038573004
Cr-Commit-Position: refs/heads/master@{#322170}
Diffstat (limited to 'content/browser/renderer_host/delegated_frame_evictor.cc')
-rw-r--r-- | content/browser/renderer_host/delegated_frame_evictor.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/content/browser/renderer_host/delegated_frame_evictor.cc b/content/browser/renderer_host/delegated_frame_evictor.cc index 65ae483..33d6b2c 100644 --- a/content/browser/renderer_host/delegated_frame_evictor.cc +++ b/content/browser/renderer_host/delegated_frame_evictor.cc @@ -10,13 +10,11 @@ namespace content { DelegatedFrameEvictor::DelegatedFrameEvictor( DelegatedFrameEvictorClient* client) - : client_(client), has_frame_(false), visible_(false) { -} + : client_(client), has_frame_(false) {} DelegatedFrameEvictor::~DelegatedFrameEvictor() { DiscardedFrame(); } void DelegatedFrameEvictor::SwappedFrame(bool visible) { - visible_ = visible; has_frame_ = true; RendererFrameManager::GetInstance()->AddFrame(this, visible); } @@ -27,14 +25,11 @@ void DelegatedFrameEvictor::DiscardedFrame() { } void DelegatedFrameEvictor::SetVisible(bool visible) { - if (visible_ == visible) - return; - visible_ = visible; if (has_frame_) { if (visible) { - LockFrame(); + RendererFrameManager::GetInstance()->LockFrame(this); } else { - UnlockFrame(); + RendererFrameManager::GetInstance()->UnlockFrame(this); } } } |