forward_render_model.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright (c) 2011 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. // A render model simulator for the original model used in Chromium.
  5. #ifndef GPU_TOOLS_COMPOSITOR_MODEL_BENCH_FORWARD_RENDER_MODEL_H_
  6. #define GPU_TOOLS_COMPOSITOR_MODEL_BENCH_FORWARD_RENDER_MODEL_H_
  7. #include <memory>
  8. #include "gpu/tools/compositor_model_bench/render_model_utils.h"
  9. #include "gpu/tools/compositor_model_bench/render_models.h"
  10. class ForwardRenderNodeVisitor;
  11. class ForwardRenderSimulator : public RenderModelSimulator {
  12. public:
  13. ForwardRenderSimulator() = delete;
  14. ForwardRenderSimulator(std::unique_ptr<RenderNode> root,
  15. int window_width,
  16. int window_height);
  17. ForwardRenderSimulator(const ForwardRenderSimulator&) = delete;
  18. ForwardRenderSimulator& operator=(const ForwardRenderSimulator&) = delete;
  19. ~ForwardRenderSimulator() override;
  20. void Update() override;
  21. void Resize(int width, int height) override;
  22. private:
  23. std::unique_ptr<ForwardRenderNodeVisitor> visitor_;
  24. std::unique_ptr<TextureGenerator> textures_;
  25. };
  26. #endif // GPU_TOOLS_COMPOSITOR_MODEL_BENCH_FORWARD_RENDER_MODEL_H_