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

Unified Diff: content/renderer/android/synchronous_compositor_frame_sink.cc

Issue 2404993002: cc: Stop calling DetachFromClient if bind failed. (Closed)
Patch Set: detachinternal: rebase Created 4 years, 2 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: content/renderer/android/synchronous_compositor_frame_sink.cc
diff --git a/content/renderer/android/synchronous_compositor_frame_sink.cc b/content/renderer/android/synchronous_compositor_frame_sink.cc
index 2df8b97fe077bc33ad756ef7e84c36312a165a91..fc652df5ea7ef624de5cba5a1d4af4d59bbd9f25 100644
--- a/content/renderer/android/synchronous_compositor_frame_sink.cc
+++ b/content/renderer/android/synchronous_compositor_frame_sink.cc
@@ -163,7 +163,6 @@ bool SynchronousCompositorFrameSink::BindToClient(
base::Bind(&SynchronousCompositorFrameSink::DidActivatePendingTree,
base::Unretained(this)));
registry_->RegisterCompositorFrameSink(routing_id_, this);
- registered_ = true;
surface_manager_->RegisterFrameSinkId(kFrameSinkId);
surface_manager_->RegisterSurfaceFactoryClient(kFrameSinkId, this);
@@ -193,8 +192,7 @@ void SynchronousCompositorFrameSink::DetachFromClient() {
client_->SetBeginFrameSource(nullptr);
// Destroy the begin frame source on the same thread it was bound on.
begin_frame_source_ = nullptr;
- if (registered_)
- registry_->UnregisterCompositorFrameSink(routing_id_, this);
+ registry_->UnregisterCompositorFrameSink(routing_id_, this);
client_->SetTreeActivationCallback(base::Closure());
if (!root_local_frame_id_.is_null()) {
surface_factory_->Destroy(root_local_frame_id_);
« no previous file with comments | « content/renderer/android/synchronous_compositor_frame_sink.h ('k') | content/renderer/gpu/renderer_compositor_frame_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698