Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(727)

Side by Side Diff: gpu/tools/compositor_model_bench/render_models.cc

Issue 7718020: Initial checkin of the compositor_model_bench tool, which simulates the GPU demands of Chromium's... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
5 #include "gpu/tools/compositor_model_bench/render_models.h"
6
7 #include <string>
8
9 #include "gpu/tools/compositor_model_bench/forward_render_model.h"
10
11 const char* ModelToString(RenderModel m) {
12 switch (m) {
13 case ForwardRenderModel:
14 return "Forward Rendering";
15 default:
16 return "(unknown render model name)";
17 }
18 }
19
20 RenderModelSimulator::RenderModelSimulator(RenderNode* root) : root_(root) {
21 }
22
23 RenderModelSimulator::~RenderModelSimulator() {
24 }
25
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;
39 }
40 }
41
OLDNEW
« no previous file with comments | « gpu/tools/compositor_model_bench/render_models.h ('k') | gpu/tools/compositor_model_bench/render_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698