OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/direct_compositor_frame_sink.h" | 5 #include "cc/surfaces/direct_compositor_frame_sink.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "cc/output/renderer_settings.h" | 9 #include "cc/output/renderer_settings.h" |
10 #include "cc/output/texture_mailbox_deleter.h" | 10 #include "cc/output/texture_mailbox_deleter.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 compositor_frame_sink_client_.did_lose_compositor_frame_sink_called()); | 68 compositor_frame_sink_client_.did_lose_compositor_frame_sink_called()); |
69 } | 69 } |
70 | 70 |
71 ~DirectCompositorFrameSinkTest() override { | 71 ~DirectCompositorFrameSinkTest() override { |
72 compositor_frame_sink_->DetachFromClient(); | 72 compositor_frame_sink_->DetachFromClient(); |
73 } | 73 } |
74 | 74 |
75 void SwapBuffersWithDamage(const gfx::Rect& damage_rect) { | 75 void SwapBuffersWithDamage(const gfx::Rect& damage_rect) { |
76 std::unique_ptr<RenderPass> render_pass(RenderPass::Create()); | 76 std::unique_ptr<RenderPass> render_pass(RenderPass::Create()); |
77 render_pass->SetNew(RenderPassId(1, 1), display_rect_, damage_rect, | 77 render_pass->SetNew(RenderPassId(1, 1), display_rect_, damage_rect, |
78 gfx::Transform()); | 78 gfx::Transform(), FilterOperations(), |
| 79 FilterOperations()); |
79 | 80 |
80 CompositorFrame frame; | 81 CompositorFrame frame; |
81 frame.render_pass_list.push_back(std::move(render_pass)); | 82 frame.render_pass_list.push_back(std::move(render_pass)); |
82 | 83 |
83 compositor_frame_sink_->SubmitCompositorFrame(std::move(frame)); | 84 compositor_frame_sink_->SubmitCompositorFrame(std::move(frame)); |
84 } | 85 } |
85 | 86 |
86 void SetUp() override { | 87 void SetUp() override { |
87 // Draw the first frame to start in an "unlocked" state. | 88 // Draw the first frame to start in an "unlocked" state. |
88 SwapBuffersWithDamage(display_rect_); | 89 SwapBuffersWithDamage(display_rect_); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 EXPECT_EQ(1u, display_output_surface_->num_sent_frames()); | 147 EXPECT_EQ(1u, display_output_surface_->num_sent_frames()); |
147 | 148 |
148 SwapBuffersWithDamage(gfx::Rect()); | 149 SwapBuffersWithDamage(gfx::Rect()); |
149 EXPECT_EQ(1u, display_output_surface_->num_sent_frames()); | 150 EXPECT_EQ(1u, display_output_surface_->num_sent_frames()); |
150 task_runner_->RunUntilIdle(); | 151 task_runner_->RunUntilIdle(); |
151 EXPECT_EQ(1u, display_output_surface_->num_sent_frames()); | 152 EXPECT_EQ(1u, display_output_surface_->num_sent_frames()); |
152 } | 153 } |
153 | 154 |
154 } // namespace | 155 } // namespace |
155 } // namespace cc | 156 } // namespace cc |
OLD | NEW |