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

Unified Diff: android_webview/browser/render_thread_manager.cc

Issue 1943963003: WIP Handle AwContents needing multiple live functors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Testing framework changes to support testing multiple RenderThreadManager instances. Created 4 years, 7 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
Index: android_webview/browser/render_thread_manager.cc
diff --git a/android_webview/browser/render_thread_manager.cc b/android_webview/browser/render_thread_manager.cc
index c2c9c6e0eecc061fed1b4402ff9eb6b765abe6b9..af95f63016864ddc43c12254c5e676ba7b53a5b0 100644
--- a/android_webview/browser/render_thread_manager.cc
+++ b/android_webview/browser/render_thread_manager.cc
@@ -104,9 +104,10 @@ RenderThreadManager::RenderThreadManager(
}
RenderThreadManager::~RenderThreadManager() {
+ LOG(WARNING) << "XXX " << __PRETTY_FUNCTION__;
DCHECK(ui_loop_->BelongsToCurrentThread());
if (compositor_frame_producer_) {
- compositor_frame_producer_->OnCompositorFrameConsumerWillDestroy();
+ compositor_frame_producer_->RemoveCompositorFrameConsumer(this);
}
DCHECK(!hardware_renderer_.get());
}
@@ -158,7 +159,7 @@ void RenderThreadManager::ClientRequestInvokeGLOnUI() {
void RenderThreadManager::UpdateParentDrawConstraintsOnUI() {
DCHECK(ui_loop_->BelongsToCurrentThread());
if (compositor_frame_producer_) {
- compositor_frame_producer_->OnParentDrawConstraintsUpdated();
+ compositor_frame_producer_->OnParentDrawConstraintsUpdated(this);
}
}
@@ -362,6 +363,9 @@ void RenderThreadManager::DeleteHardwareRendererOnUI() {
void RenderThreadManager::SetCompositorFrameProducer(
CompositorFrameProducer* compositor_frame_producer) {
+ DCHECK(compositor_frame_producer == compositor_frame_producer_ ||
+ compositor_frame_producer_ == nullptr ||
+ compositor_frame_producer == nullptr);
compositor_frame_producer_ = compositor_frame_producer;
}

Powered by Google App Engine
This is Rietveld 408576698