We started redesigning GpuMemoryBuffer interface to handle multiple buffers [0].
[chromium-blink-merge.git] / gpu / tools / compositor_model_bench / render_models.cc
blobbbbfac6cda64845392370af38f3b940e0de91d81
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"
7 #include <string>
9 #include "gpu/tools/compositor_model_bench/forward_render_model.h"
11 const char* ModelToString(RenderModel m) {
12 switch (m) {
13 case ForwardRenderModel:
14 return "Forward Rendering";
15 default:
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,
28 int window_width,
29 int window_height) {
30 switch (model) {
31 case ForwardRenderModel:
32 return new ForwardRenderSimulator(render_tree_root,
33 window_width,
34 window_height);
35 default:
36 LOG(ERROR) << "Unrecognized render model. "
37 "If we know its name, then it's..." << ModelToString(model);
38 return 0;