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

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 1829653002: Fixes failing instrumentation tests on Nakasi (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_android.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index 109d9163ad8750a8454fbe3a09adf99abd256633..177bc849185c037a11252e55d1dbe971f246cbe7 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -553,12 +553,14 @@ void RenderWidgetHostViewAndroid::LockCompositingSurface() {
}
void RenderWidgetHostViewAndroid::UnlockCompositingSurface() {
- if (!frame_evictor_->HasFrame() || locks_on_frame_count_ == 0)
+ if (!frame_evictor_->HasFrame()) {
+ DCHECK_EQ(locks_on_frame_count_, 0u);
return;
+ }
DCHECK(HasValidFrame());
- frame_evictor_->UnlockFrame();
locks_on_frame_count_--;
+ frame_evictor_->UnlockFrame();
if (locks_on_frame_count_ == 0) {
if (last_frame_info_) {
@@ -802,6 +804,7 @@ void RenderWidgetHostViewAndroid::RenderProcessGone(
}
void RenderWidgetHostViewAndroid::Destroy() {
+ host_->ViewDestroyed();
RemoveLayers();
SetContentViewCore(NULL);
@@ -1503,9 +1506,10 @@ void RenderWidgetHostViewAndroid::RequestDisallowInterceptTouchEvent() {
}
void RenderWidgetHostViewAndroid::EvictDelegatedFrame() {
+ DCHECK_EQ(locks_on_frame_count_, 0u);
+ frame_evictor_->DiscardedFrame();
if (layer_.get())
DestroyDelegatedContent();
- frame_evictor_->DiscardedFrame();
}
bool RenderWidgetHostViewAndroid::HasAcceleratedSurface(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698