| Index: cc/test/fake_output_surface.cc
|
| diff --git a/cc/test/fake_output_surface.cc b/cc/test/fake_output_surface.cc
|
| index f124764458ae3db707558f207689985fb55c3433..7d5a296b32e4d26de065c3d1320f6fd454212b6b 100644
|
| --- a/cc/test/fake_output_surface.cc
|
| +++ b/cc/test/fake_output_surface.cc
|
| @@ -23,18 +23,12 @@ FakeOutputSurface::FakeOutputSurface(
|
|
|
| FakeOutputSurface::~FakeOutputSurface() = default;
|
|
|
| -void FakeOutputSurface::SwapBuffers(CompositorFrame frame) {
|
| - ReturnResourcesHeldByParent();
|
| -
|
| - last_sent_frame_.reset(new CompositorFrame(std::move(frame)));
|
| +void FakeOutputSurface::SwapBuffers(OutputSurfaceFrame frame) {
|
| + last_sent_frame_.reset(new OutputSurfaceFrame(std::move(frame)));
|
| ++num_sent_frames_;
|
|
|
| - if (last_sent_frame_->delegated_frame_data) {
|
| - auto* frame_data = last_sent_frame_->delegated_frame_data.get();
|
| - last_swap_rect_ = frame_data->render_pass_list.back()->damage_rect;
|
| - last_swap_rect_valid_ = true;
|
| - } else if (context_provider()) {
|
| - last_swap_rect_ = last_sent_frame_->gl_frame_data->sub_buffer_rect;
|
| + if (context_provider()) {
|
| + last_swap_rect_ = last_sent_frame_->sub_buffer_rect;
|
| last_swap_rect_valid_ = true;
|
| } else {
|
| // Unknown for direct software frames.
|
| @@ -42,15 +36,6 @@ void FakeOutputSurface::SwapBuffers(CompositorFrame frame) {
|
| last_swap_rect_valid_ = false;
|
| }
|
|
|
| - if (last_sent_frame_->delegated_frame_data || !context_provider()) {
|
| - if (last_sent_frame_->delegated_frame_data) {
|
| - auto* frame_data = last_sent_frame_->delegated_frame_data.get();
|
| - resources_held_by_parent_.insert(resources_held_by_parent_.end(),
|
| - frame_data->resource_list.begin(),
|
| - frame_data->resource_list.end());
|
| - }
|
| - }
|
| -
|
| PostSwapBuffersComplete();
|
| }
|
|
|
| @@ -95,17 +80,4 @@ unsigned FakeOutputSurface::GetOverlayTextureId() const {
|
| return 0;
|
| }
|
|
|
| -void FakeOutputSurface::ReturnResourcesHeldByParent() {
|
| - // Check |delegated_frame_data| because we shouldn't reclaim resources
|
| - // for the Display which does not swap delegated frames.
|
| - if (last_sent_frame_ && last_sent_frame_->delegated_frame_data) {
|
| - // Return the last frame's resources immediately.
|
| - ReturnedResourceArray resources;
|
| - for (const auto& resource : resources_held_by_parent_)
|
| - resources.push_back(resource.ToReturnedResource());
|
| - resources_held_by_parent_.clear();
|
| - client_->ReclaimResources(resources);
|
| - }
|
| -}
|
| -
|
| } // namespace cc
|
|
|