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

Side by Side Diff: cc/test/test_compositor_frame_sink.cc

Issue 2807653003: Move Work From CompositorFrameSinkSupport() To Init() (Closed)
Patch Set: More Init Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/test/test_compositor_frame_sink.h" 5 #include "cc/test/test_compositor_frame_sink.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // We want the Display's OutputSurface to hear about lost context, and when 95 // We want the Display's OutputSurface to hear about lost context, and when
96 // this shares a context with it we should not be listening for lost context 96 // this shares a context with it we should not be listening for lost context
97 // callbacks on the context here. 97 // callbacks on the context here.
98 if (display_context_shared_with_compositor && context_provider()) 98 if (display_context_shared_with_compositor && context_provider())
99 context_provider()->SetLostContextCallback(base::Closure()); 99 context_provider()->SetLostContextCallback(base::Closure());
100 100
101 support_ = base::MakeUnique<CompositorFrameSinkSupport>( 101 support_ = base::MakeUnique<CompositorFrameSinkSupport>(
102 this, surface_manager_.get(), frame_sink_id_, false /* is_root */, 102 this, surface_manager_.get(), frame_sink_id_, false /* is_root */,
103 true /* handles_frame_sink_id_invalidation */, 103 true /* handles_frame_sink_id_invalidation */,
104 true /* needs_sync_points */); 104 true /* needs_sync_points */);
105 support_->Init();
105 client_->SetBeginFrameSource(&external_begin_frame_source_); 106 client_->SetBeginFrameSource(&external_begin_frame_source_);
106 107
107 display_->Initialize(this, surface_manager_.get()); 108 display_->Initialize(this, surface_manager_.get());
108 display_->renderer_for_testing()->SetEnlargePassTextureAmountForTesting( 109 display_->renderer_for_testing()->SetEnlargePassTextureAmountForTesting(
109 enlarge_pass_texture_amount_); 110 enlarge_pass_texture_amount_);
110 display_->SetVisible(true); 111 display_->SetVisible(true);
111 return true; 112 return true;
112 } 113 }
113 114
114 void TestCompositorFrameSink::DetachFromClient() { 115 void TestCompositorFrameSink::DetachFromClient() {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 support_->SetNeedsBeginFrame(needs_begin_frames); 204 support_->SetNeedsBeginFrame(needs_begin_frames);
204 } 205 }
205 206
206 void TestCompositorFrameSink::OnDidFinishFrame(const BeginFrameAck& ack) {} 207 void TestCompositorFrameSink::OnDidFinishFrame(const BeginFrameAck& ack) {}
207 208
208 void TestCompositorFrameSink::SendCompositorFrameAckToClient() { 209 void TestCompositorFrameSink::SendCompositorFrameAckToClient() {
209 client_->DidReceiveCompositorFrameAck(); 210 client_->DidReceiveCompositorFrameAck();
210 } 211 }
211 212
212 } // namespace cc 213 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698