OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/fake_output_surface.h" | 5 #include "cc/test/fake_output_surface.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "cc/output/compositor_frame_ack.h" | 9 #include "cc/output/compositor_frame_ack.h" |
10 #include "cc/output/output_surface_client.h" | 10 #include "cc/output/output_surface_client.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 last_sent_frame_->delegated_frame_data->resource_list.end()); | 57 last_sent_frame_->delegated_frame_data->resource_list.end()); |
58 } | 58 } |
59 | 59 |
60 ++num_sent_frames_; | 60 ++num_sent_frames_; |
61 } else { | 61 } else { |
62 last_swap_rect_ = frame_copy->gl_frame_data->sub_buffer_rect; | 62 last_swap_rect_ = frame_copy->gl_frame_data->sub_buffer_rect; |
63 last_sent_frame_ = std::move(frame_copy); | 63 last_sent_frame_ = std::move(frame_copy); |
64 ++num_sent_frames_; | 64 ++num_sent_frames_; |
65 } | 65 } |
66 PostSwapBuffersComplete(); | 66 PostSwapBuffersComplete(); |
67 client_->DidSwapBuffers(); | |
68 } | 67 } |
69 | 68 |
70 void FakeOutputSurface::BindFramebuffer() { | 69 void FakeOutputSurface::BindFramebuffer() { |
71 if (framebuffer_) { | 70 if (framebuffer_) { |
72 context_provider_->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, | 71 context_provider_->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, |
73 framebuffer_); | 72 framebuffer_); |
74 } else { | 73 } else { |
75 OutputSurface::BindFramebuffer(); | 74 OutputSurface::BindFramebuffer(); |
76 } | 75 } |
77 } | 76 } |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 const { | 126 const { |
128 return overlay_candidate_validator_; | 127 return overlay_candidate_validator_; |
129 } | 128 } |
130 | 129 |
131 void FakeOutputSurface::SetMemoryPolicyToSetAtBind( | 130 void FakeOutputSurface::SetMemoryPolicyToSetAtBind( |
132 std::unique_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind) { | 131 std::unique_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind) { |
133 memory_policy_to_set_at_bind_.swap(memory_policy_to_set_at_bind); | 132 memory_policy_to_set_at_bind_.swap(memory_policy_to_set_at_bind); |
134 } | 133 } |
135 | 134 |
136 } // namespace cc | 135 } // namespace cc |
OLD | NEW |