| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/surfaces/compositor_frame_sink_support.h" | 5 #include "cc/surfaces/compositor_frame_sink_support.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "cc/output/compositor_frame.h" | 8 #include "cc/output/compositor_frame.h" |
| 9 #include "cc/surfaces/compositor_frame_sink_support_client.h" | 9 #include "cc/surfaces/compositor_frame_sink_support_client.h" |
| 10 #include "cc/surfaces/frame_sink_id.h" | 10 #include "cc/surfaces/frame_sink_id.h" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 supports_.clear(); | 159 supports_.clear(); |
| 160 } | 160 } |
| 161 | 161 |
| 162 // CompositorFrameSinkSupportClient implementation. | 162 // CompositorFrameSinkSupportClient implementation. |
| 163 void DidReceiveCompositorFrameAck() override {} | 163 void DidReceiveCompositorFrameAck() override {} |
| 164 void OnBeginFrame(const BeginFrameArgs& args) override {} | 164 void OnBeginFrame(const BeginFrameArgs& args) override {} |
| 165 void ReclaimResources(const ReturnedResourceArray& resources) override { | 165 void ReclaimResources(const ReturnedResourceArray& resources) override { |
| 166 last_returned_resources_ = resources; | 166 last_returned_resources_ = resources; |
| 167 } | 167 } |
| 168 void WillDrawSurface() override {} | 168 void WillDrawSurface(const LocalSurfaceId& local_surface_id, |
| 169 const gfx::Rect& damage_rect) override {} |
| 169 | 170 |
| 170 private: | 171 private: |
| 171 SurfaceManager surface_manager_; | 172 SurfaceManager surface_manager_; |
| 172 std::unique_ptr<FakeExternalBeginFrameSource> begin_frame_source_; | 173 std::unique_ptr<FakeExternalBeginFrameSource> begin_frame_source_; |
| 173 std::vector<std::unique_ptr<CompositorFrameSinkSupport>> supports_; | 174 std::vector<std::unique_ptr<CompositorFrameSinkSupport>> supports_; |
| 174 ReturnedResourceArray last_returned_resources_; | 175 ReturnedResourceArray last_returned_resources_; |
| 175 | 176 |
| 176 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkSupportTest); | 177 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkSupportTest); |
| 177 }; | 178 }; |
| 178 | 179 |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 // CompositorFrame. Also verify that |child_id1| is no longer a child | 680 // CompositorFrame. Also verify that |child_id1| is no longer a child |
| 680 // reference of |parent_id|. | 681 // reference of |parent_id|. |
| 681 EXPECT_TRUE(parent_surface()->HasActiveFrame()); | 682 EXPECT_TRUE(parent_surface()->HasActiveFrame()); |
| 682 EXPECT_FALSE(parent_surface()->HasPendingFrame()); | 683 EXPECT_FALSE(parent_surface()->HasPendingFrame()); |
| 683 EXPECT_THAT(parent_surface()->blocking_surfaces_for_testing(), IsEmpty()); | 684 EXPECT_THAT(parent_surface()->blocking_surfaces_for_testing(), IsEmpty()); |
| 684 EXPECT_THAT(GetChildReferences(parent_id), UnorderedElementsAre(child_id2)); | 685 EXPECT_THAT(GetChildReferences(parent_id), UnorderedElementsAre(child_id2)); |
| 685 } | 686 } |
| 686 | 687 |
| 687 } // namespace test | 688 } // namespace test |
| 688 } // namespace cc | 689 } // namespace cc |
| OLD | NEW |