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.
5 // Define the interface for a generic simulation, and a factory method for
6 // instantiating different models.
8 #ifndef GPU_TOOLS_COMPOSITOR_MODEL_BENCH_RENDER_MODELS_H_
9 #define GPU_TOOLS_COMPOSITOR_MODEL_BENCH_RENDER_MODELS_H_
11 #include "gpu/tools/compositor_model_bench/render_tree.h"
13 #include "base/basictypes.h"
14 #include "base/memory/scoped_ptr.h"
20 const char* ModelToString(RenderModel m);
22 class RenderModelSimulator {
24 virtual ~RenderModelSimulator();
25 virtual void Update() = 0;
26 virtual void Resize(int width, int height) = 0;
29 explicit RenderModelSimulator(RenderNode* root);
30 scoped_ptr<RenderNode> root_;
33 DISALLOW_IMPLICIT_CONSTRUCTORS(RenderModelSimulator);
36 RenderModelSimulator* ConstructSimulationModel(RenderModel model,
37 RenderNode* render_tree_root,
41 #endif // GPU_TOOLS_COMPOSITOR_MODEL_BENCH_RENDER_MODELS_H_