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

Unified Diff: cc/test/fake_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
« no previous file with comments | « cc/test/fake_compositor_frame_sink.h ('k') | content/renderer/android/synchronous_compositor_frame_sink.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_compositor_frame_sink.cc
diff --git a/cc/test/fake_compositor_frame_sink.cc b/cc/test/fake_compositor_frame_sink.cc
index 73336bc59517f94a480258e65e41686a9e4e8a07..b8e085ae09e1c37ddad58acbb0b0a7e26c1793be 100644
--- a/cc/test/fake_compositor_frame_sink.cc
+++ b/cc/test/fake_compositor_frame_sink.cc
@@ -22,6 +22,11 @@ FakeCompositorFrameSink::FakeCompositorFrameSink(
FakeCompositorFrameSink::~FakeCompositorFrameSink() = default;
+void FakeCompositorFrameSink::DetachFromClient() {
+ ReturnResourcesHeldByParent();
+ CompositorFrameSink::DetachFromClient();
+}
+
void FakeCompositorFrameSink::SwapBuffers(CompositorFrame frame) {
ReturnResourcesHeldByParent();
@@ -55,20 +60,6 @@ void FakeCompositorFrameSink::SwapBuffersAck() {
client_->DidSwapBuffersComplete();
}
-bool FakeCompositorFrameSink::BindToClient(CompositorFrameSinkClient* client) {
- if (CompositorFrameSink::BindToClient(client)) {
- client_ = client;
- return true;
- } else {
- return false;
- }
-}
-
-void FakeCompositorFrameSink::DetachFromClient() {
- ReturnResourcesHeldByParent();
- CompositorFrameSink::DetachFromClient();
-}
-
void FakeCompositorFrameSink::ReturnResourcesHeldByParent() {
// Check |delegated_frame_data| because we shouldn't reclaim resources
// for the Display which does not swap delegated frames.
« no previous file with comments | « cc/test/fake_compositor_frame_sink.h ('k') | content/renderer/android/synchronous_compositor_frame_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698