test_image_factory.h 999 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2014 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_IMAGE_FACTORY_H_
  5. #define COMPONENTS_VIZ_TEST_TEST_IMAGE_FACTORY_H_
  6. #include "gpu/command_buffer/service/image_factory.h"
  7. namespace viz {
  8. class TestImageFactory : public gpu::ImageFactory {
  9. public:
  10. TestImageFactory();
  11. TestImageFactory(const TestImageFactory&) = delete;
  12. ~TestImageFactory() override;
  13. TestImageFactory& operator=(const TestImageFactory&) = delete;
  14. // Overridden from gpu::ImageFactory:
  15. scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer(
  16. gfx::GpuMemoryBufferHandle handle,
  17. const gfx::Size& size,
  18. gfx::BufferFormat format,
  19. const gfx::ColorSpace& color_space,
  20. gfx::BufferPlane plane,
  21. int client_id,
  22. gpu::SurfaceHandle surface_handle) override;
  23. };
  24. } // namespace viz
  25. #endif // COMPONENTS_VIZ_TEST_TEST_IMAGE_FACTORY_H_