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 "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 TestContextProvider::Create(context.Pass()), false)); | 94 TestContextProvider::Create(context.Pass()), false)); |
95 surface->capabilities_.uses_default_gl_framebuffer = false; | 95 surface->capabilities_.uses_default_gl_framebuffer = false; |
96 return surface.Pass(); | 96 return surface.Pass(); |
97 } | 97 } |
98 | 98 |
99 CompositorFrame& last_sent_frame() { return last_sent_frame_; } | 99 CompositorFrame& last_sent_frame() { return last_sent_frame_; } |
100 size_t num_sent_frames() { return num_sent_frames_; } | 100 size_t num_sent_frames() { return num_sent_frames_; } |
101 | 101 |
102 void SwapBuffers(CompositorFrame* frame) override; | 102 void SwapBuffers(CompositorFrame* frame) override; |
103 | 103 |
| 104 OutputSurfaceClient* client() { return client_; } |
104 bool BindToClient(OutputSurfaceClient* client) override; | 105 bool BindToClient(OutputSurfaceClient* client) override; |
105 | 106 |
106 void set_framebuffer(unsigned framebuffer) { framebuffer_ = framebuffer; } | 107 void set_framebuffer(unsigned framebuffer) { framebuffer_ = framebuffer; } |
107 void BindFramebuffer() override; | 108 void BindFramebuffer() override; |
108 | 109 |
109 using OutputSurface::ReleaseGL; | 110 using OutputSurface::ReleaseGL; |
110 using OutputSurface::InitializeAndSetContext3d; | 111 using OutputSurface::InitializeAndSetContext3d; |
111 | 112 |
112 void SetTreeActivationCallback(const base::Closure& callback); | 113 void SetTreeActivationCallback(const base::Closure& callback); |
113 | 114 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 bool has_external_stencil_test_; | 154 bool has_external_stencil_test_; |
154 unsigned framebuffer_; | 155 unsigned framebuffer_; |
155 TransferableResourceArray resources_held_by_parent_; | 156 TransferableResourceArray resources_held_by_parent_; |
156 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_; | 157 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_; |
157 gfx::Rect last_swap_rect_; | 158 gfx::Rect last_swap_rect_; |
158 }; | 159 }; |
159 | 160 |
160 } // namespace cc | 161 } // namespace cc |
161 | 162 |
162 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ | 163 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ |
OLD | NEW |