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 #include "gpu/tools/compositor_model_bench/render_models.h"
9 #include "gpu/tools/compositor_model_bench/forward_render_model.h"
11 const char* ModelToString(RenderModel m
) {
13 case ForwardRenderModel
:
14 return "Forward Rendering";
16 return "(unknown render model name)";
20 RenderModelSimulator::RenderModelSimulator(RenderNode
* root
) : root_(root
) {
23 RenderModelSimulator::~RenderModelSimulator() {
26 RenderModelSimulator
* ConstructSimulationModel(RenderModel model
,
27 RenderNode
* render_tree_root
,
31 case ForwardRenderModel
:
32 return new ForwardRenderSimulator(render_tree_root
,
36 LOG(ERROR
) << "Unrecognized render model. "
37 "If we know its name, then it's..." << ModelToString(model
);