test_output_surface_provider.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_VIZ_TEST_TEST_OUTPUT_SURFACE_PROVIDER_H_
  5. #define COMPONENTS_VIZ_TEST_TEST_OUTPUT_SURFACE_PROVIDER_H_
  6. #include <memory>
  7. #include "components/viz/service/display_embedder/output_surface_provider.h"
  8. namespace viz {
  9. // Test implementation that creates a fake OutputSurface.
  10. class TestOutputSurfaceProvider : public OutputSurfaceProvider {
  11. public:
  12. TestOutputSurfaceProvider();
  13. TestOutputSurfaceProvider(const TestOutputSurfaceProvider&) = delete;
  14. TestOutputSurfaceProvider& operator=(const TestOutputSurfaceProvider&) =
  15. delete;
  16. ~TestOutputSurfaceProvider() override;
  17. // OutputSurfaceProvider implementation.
  18. std::unique_ptr<DisplayCompositorMemoryAndTaskController> CreateGpuDependency(
  19. bool gpu_compositing,
  20. gpu::SurfaceHandle surface_handle) override;
  21. std::unique_ptr<OutputSurface> CreateOutputSurface(
  22. gpu::SurfaceHandle surface_handle,
  23. bool gpu_compositing,
  24. mojom::DisplayClient* display_client,
  25. DisplayCompositorMemoryAndTaskController* display_controller,
  26. const RendererSettings& renderer_settings,
  27. const DebugRendererSettings* debug_settings) override;
  28. };
  29. } // namespace viz
  30. #endif // COMPONENTS_VIZ_TEST_TEST_OUTPUT_SURFACE_PROVIDER_H_