| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CONTENT_RENDER_LAYOUT_TEST_DEPENDENCIES_H_ | 5 #ifndef CONTENT_RENDER_LAYOUT_TEST_DEPENDENCIES_H_ |
| 6 #define CONTENT_RENDER_LAYOUT_TEST_DEPENDENCIES_H_ | 6 #define CONTENT_RENDER_LAYOUT_TEST_DEPENDENCIES_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 | 12 |
| 13 namespace cc { | 13 namespace cc { |
| 14 class ContextProvider; | |
| 15 class CopyOutputRequest; | 14 class CopyOutputRequest; |
| 16 class LayerTreeFrameSink; | |
| 17 class SwapPromise; | 15 class SwapPromise; |
| 18 } | 16 } |
| 19 | 17 |
| 20 namespace gpu { | |
| 21 class GpuChannelHost; | |
| 22 class GpuMemoryBufferManager; | |
| 23 } | |
| 24 | |
| 25 namespace content { | 18 namespace content { |
| 26 class CompositorDependencies; | |
| 27 | 19 |
| 28 // This class allows injection of LayoutTest-specific behaviour to the | 20 // This class allows injection of LayoutTest-specific behaviour to the |
| 29 // RenderThreadImpl. | 21 // RenderThreadImpl. |
| 30 class LayoutTestDependencies { | 22 class LayoutTestDependencies { |
| 31 public: | 23 public: |
| 32 virtual std::unique_ptr<cc::LayerTreeFrameSink> CreateLayerTreeFrameSink( | |
| 33 int32_t routing_id, | |
| 34 scoped_refptr<gpu::GpuChannelHost> gpu_channel, | |
| 35 scoped_refptr<cc::ContextProvider> compositor_context_provider, | |
| 36 scoped_refptr<cc::ContextProvider> worker_context_provider, | |
| 37 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | |
| 38 CompositorDependencies* deps) = 0; | |
| 39 | |
| 40 // Returns a SwapPromise which should be queued for the next compositor frame. | 24 // Returns a SwapPromise which should be queued for the next compositor frame. |
| 25 // DO NOT SUBMIT: This method (and the whole class) should be removed. We |
| 26 // should wait for SubmitCompositorFrame in the browser process (e.g. see the |
| 27 // comment from kenrb@ in SurfaceHitTestReadyNotifier::WaitForSurfaceReady) |
| 28 // rather than waiting in the renderer. |
| 41 virtual std::unique_ptr<cc::SwapPromise> RequestCopyOfOutput( | 29 virtual std::unique_ptr<cc::SwapPromise> RequestCopyOfOutput( |
| 42 int32_t routing_id, | 30 int32_t routing_id, |
| 43 std::unique_ptr<cc::CopyOutputRequest> request) = 0; | 31 std::unique_ptr<cc::CopyOutputRequest> request) = 0; |
| 44 }; | 32 }; |
| 45 | 33 |
| 46 } // namespace content | 34 } // namespace content |
| 47 | 35 |
| 48 #endif // CONTENT_RENDER_LAYOUT_TEST_DEPENDENCIES_H_ | 36 #endif // CONTENT_RENDER_LAYOUT_TEST_DEPENDENCIES_H_ |
| OLD | NEW |