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

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: comments addressed; unittests TODO 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..1bb44aa75c313e4fedabc107a41e9beb2e01e4dc 100644
--- a/android_webview/browser/render_thread_manager.cc
+++ b/android_webview/browser/render_thread_manager.cc
@@ -106,7 +106,7 @@ RenderThreadManager::RenderThreadManager(
RenderThreadManager::~RenderThreadManager() {
DCHECK(ui_loop_->BelongsToCurrentThread());
if (compositor_frame_producer_) {
- compositor_frame_producer_->OnCompositorFrameConsumerWillDestroy();
+ compositor_frame_producer_->RemoveCompositorFrameConsumer(this);
}
DCHECK(!hardware_renderer_.get());
}
@@ -158,7 +158,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 +362,9 @@ void RenderThreadManager::DeleteHardwareRendererOnUI() {
void RenderThreadManager::SetCompositorFrameProducer(
CompositorFrameProducer* compositor_frame_producer) {
+ DCHECK(compositor_frame_producer == compositor_frame_producer_ ||
boliu 2016/05/06 15:53:13 DCHECK is also a stream (like LOG), pipe in compos
+ compositor_frame_producer_ == nullptr ||
+ compositor_frame_producer == nullptr);
compositor_frame_producer_ = compositor_frame_producer;
}

Powered by Google App Engine
This is Rietveld 408576698