| 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 #ifndef CC_TEST_FAKE_OUTPUT_SURFACE_H_ | 5 #ifndef CC_TEST_FAKE_OUTPUT_SURFACE_H_ |
| 6 #define CC_TEST_FAKE_OUTPUT_SURFACE_H_ | 6 #define CC_TEST_FAKE_OUTPUT_SURFACE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 } | 110 } |
| 111 | 111 |
| 112 CompositorFrame& last_sent_frame() { return last_sent_frame_; } | 112 CompositorFrame& last_sent_frame() { return last_sent_frame_; } |
| 113 size_t num_sent_frames() { return num_sent_frames_; } | 113 size_t num_sent_frames() { return num_sent_frames_; } |
| 114 | 114 |
| 115 void SwapBuffers(CompositorFrame* frame) override; | 115 void SwapBuffers(CompositorFrame* frame) override; |
| 116 | 116 |
| 117 OutputSurfaceClient* client() { return client_; } | 117 OutputSurfaceClient* client() { return client_; } |
| 118 bool BindToClient(OutputSurfaceClient* client) override; | 118 bool BindToClient(OutputSurfaceClient* client) override; |
| 119 | 119 |
| 120 void set_framebuffer(unsigned framebuffer) { framebuffer_ = framebuffer; } | 120 void set_framebuffer(GLint framebuffer, GLenum format) { |
| 121 framebuffer_ = framebuffer; |
| 122 framebuffer_format_ = format; |
| 123 } |
| 121 void BindFramebuffer() override; | 124 void BindFramebuffer() override; |
| 125 uint32_t GetFramebufferCopyTextureFormat() override; |
| 122 | 126 |
| 123 void SetTreeActivationCallback(const base::Closure& callback); | 127 void SetTreeActivationCallback(const base::Closure& callback); |
| 124 | 128 |
| 125 const TransferableResourceArray& resources_held_by_parent() { | 129 const TransferableResourceArray& resources_held_by_parent() { |
| 126 return resources_held_by_parent_; | 130 return resources_held_by_parent_; |
| 127 } | 131 } |
| 128 | 132 |
| 129 void ReturnResource(unsigned id, CompositorFrameAck* ack); | 133 void ReturnResource(unsigned id, CompositorFrameAck* ack); |
| 130 | 134 |
| 131 bool HasExternalStencilTest() const override; | 135 bool HasExternalStencilTest() const override; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 158 bool delegated_rendering); | 162 bool delegated_rendering); |
| 159 | 163 |
| 160 FakeOutputSurface(std::unique_ptr<SoftwareOutputDevice> software_device, | 164 FakeOutputSurface(std::unique_ptr<SoftwareOutputDevice> software_device, |
| 161 bool delegated_rendering); | 165 bool delegated_rendering); |
| 162 | 166 |
| 163 FakeOutputSurface(scoped_refptr<ContextProvider> context_provider, | 167 FakeOutputSurface(scoped_refptr<ContextProvider> context_provider, |
| 164 scoped_refptr<ContextProvider> worker_context_provider, | 168 scoped_refptr<ContextProvider> worker_context_provider, |
| 165 std::unique_ptr<SoftwareOutputDevice> software_device, | 169 std::unique_ptr<SoftwareOutputDevice> software_device, |
| 166 bool delegated_rendering); | 170 bool delegated_rendering); |
| 167 | 171 |
| 168 OutputSurfaceClient* client_; | 172 OutputSurfaceClient* client_ = nullptr; |
| 169 CompositorFrame last_sent_frame_; | 173 CompositorFrame last_sent_frame_; |
| 170 size_t num_sent_frames_; | 174 size_t num_sent_frames_ = 0; |
| 171 bool has_external_stencil_test_; | 175 bool has_external_stencil_test_ = false; |
| 172 bool suspended_for_recycle_; | 176 bool suspended_for_recycle_ = false; |
| 173 unsigned framebuffer_; | 177 GLint framebuffer_ = 0; |
| 178 GLenum framebuffer_format_ = 0; |
| 174 TransferableResourceArray resources_held_by_parent_; | 179 TransferableResourceArray resources_held_by_parent_; |
| 175 std::unique_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_; | 180 std::unique_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_; |
| 176 OverlayCandidateValidator* overlay_candidate_validator_; | 181 OverlayCandidateValidator* overlay_candidate_validator_ = nullptr; |
| 177 gfx::Rect last_swap_rect_; | 182 gfx::Rect last_swap_rect_; |
| 178 }; | 183 }; |
| 179 | 184 |
| 180 } // namespace cc | 185 } // namespace cc |
| 181 | 186 |
| 182 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ | 187 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ |
| OLD | NEW |