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

Side by Side Diff: gpu/tools/compositor_model_bench/render_model_utils.h

Issue 1542513002: Switch to standard integer types in gpu/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Whole-tree processing that's likely to be helpful in multiple render models. 5 // Whole-tree processing that's likely to be helpful in multiple render models.
6 6
7 #ifndef GPU_TOOLS_COMPOSITOR_MODEL_BENCH_RENDER_MODEL_UTILS_H_ 7 #ifndef GPU_TOOLS_COMPOSITOR_MODEL_BENCH_RENDER_MODEL_UTILS_H_
8 #define GPU_TOOLS_COMPOSITOR_MODEL_BENCH_RENDER_MODEL_UTILS_H_ 8 #define GPU_TOOLS_COMPOSITOR_MODEL_BENCH_RENDER_MODEL_UTILS_H_
9 9
10 #include <stdint.h>
11
10 #include <map> 12 #include <map>
11 #include <set> 13 #include <set>
12 #include <vector> 14 #include <vector>
13 15
14 #include "base/compiler_specific.h" 16 #include "base/compiler_specific.h"
15 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
16 #include "gpu/tools/compositor_model_bench/render_tree.h" 18 #include "gpu/tools/compositor_model_bench/render_tree.h"
17 19
18 // This is a visitor that runs over the tree structure that was built from the 20 // This is a visitor that runs over the tree structure that was built from the
19 // configuration file. It creates OpenGL textures (random checkerboards) that 21 // configuration file. It creates OpenGL textures (random checkerboards) that
20 // match the specifications of the original textures and overwrites the old 22 // match the specifications of the original textures and overwrites the old
21 // texture ID's in the tree, replacing them with the matching new textures. 23 // texture ID's in the tree, replacing them with the matching new textures.
22 class TextureGenerator : public RenderNodeVisitor { 24 class TextureGenerator : public RenderNodeVisitor {
23 public: 25 public:
24 typedef scoped_ptr<uint8[]> ImagePtr; 26 typedef scoped_ptr<uint8_t[]> ImagePtr;
25 typedef std::vector<Tile>::iterator tile_iter; 27 typedef std::vector<Tile>::iterator tile_iter;
26 28
27 explicit TextureGenerator(RenderNode* root); 29 explicit TextureGenerator(RenderNode* root);
28 ~TextureGenerator() override; 30 ~TextureGenerator() override;
29 31
30 // RenderNodeVisitor functions look for textures and pass them 32 // RenderNodeVisitor functions look for textures and pass them
31 // off to HandleTexture (which behaves appropriately depending 33 // off to HandleTexture (which behaves appropriately depending
32 // on which pass we are in.) 34 // on which pass we are in.)
33 void BeginVisitRenderNode(RenderNode* node) override; 35 void BeginVisitRenderNode(RenderNode* node) override;
34 void BeginVisitCCNode(CCNode* node) override; 36 void BeginVisitCCNode(CCNode* node) override;
(...skipping 18 matching lines...) Expand all
53 std::set<int> discovered_ids_; 55 std::set<int> discovered_ids_;
54 scoped_ptr<GLuint[]> tex_ids_; 56 scoped_ptr<GLuint[]> tex_ids_;
55 std::map<int, int> remapped_ids_; 57 std::map<int, int> remapped_ids_;
56 scoped_ptr<ImagePtr[]> image_data_; 58 scoped_ptr<ImagePtr[]> image_data_;
57 int images_generated_; 59 int images_generated_;
58 std::set<int> ids_for_completed_textures_; 60 std::set<int> ids_for_completed_textures_;
59 }; 61 };
60 62
61 #endif // GPU_TOOLS_COMPOSITOR_MODEL_BENCH_RENDER_MODEL_UTILS_H_ 63 #endif // GPU_TOOLS_COMPOSITOR_MODEL_BENCH_RENDER_MODEL_UTILS_H_
62 64
OLDNEW
« no previous file with comments | « gpu/tools/compositor_model_bench/forward_render_model.cc ('k') | gpu/tools/compositor_model_bench/render_model_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698