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_; } | |
105 bool BindToClient(OutputSurfaceClient* client) override; | 104 bool BindToClient(OutputSurfaceClient* client) override; |
106 | 105 |
107 void set_framebuffer(unsigned framebuffer) { framebuffer_ = framebuffer; } | 106 void set_framebuffer(unsigned framebuffer) { framebuffer_ = framebuffer; } |
108 void BindFramebuffer() override; | 107 void BindFramebuffer() override; |
109 | 108 |
110 using OutputSurface::ReleaseGL; | 109 using OutputSurface::ReleaseGL; |
111 using OutputSurface::InitializeAndSetContext3d; | 110 using OutputSurface::InitializeAndSetContext3d; |
112 | 111 |
113 void SetTreeActivationCallback(const base::Closure& callback); | 112 void SetTreeActivationCallback(const base::Closure& callback); |
114 | 113 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 bool has_external_stencil_test_; | 153 bool has_external_stencil_test_; |
155 unsigned framebuffer_; | 154 unsigned framebuffer_; |
156 TransferableResourceArray resources_held_by_parent_; | 155 TransferableResourceArray resources_held_by_parent_; |
157 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_; | 156 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_; |
158 gfx::Rect last_swap_rect_; | 157 gfx::Rect last_swap_rect_; |
159 }; | 158 }; |
160 | 159 |
161 } // namespace cc | 160 } // namespace cc |
162 | 161 |
163 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ | 162 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ |
OLD | NEW |