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

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

Issue 13710002: Clean up scoped_array<T> construction from NULL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | net/spdy/spdy_framer_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "gpu/tools/compositor_model_bench/render_model_utils.h" 7 #include "gpu/tools/compositor_model_bench/render_model_utils.h"
8 8
9 #include <cstdlib> 9 #include <cstdlib>
10 #include <map> 10 #include <map>
11 #include <set> 11 #include <set>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/logging.h" 14 #include "base/logging.h"
15 15
16 TextureGenerator::TextureGenerator(RenderNode* root) 16 TextureGenerator::TextureGenerator(RenderNode* root)
17 : stage_(DiscoveryStage), 17 : stage_(DiscoveryStage),
18 tex_ids_(NULL),
19 image_data_(NULL),
20 images_generated_(0) { 18 images_generated_(0) {
21 DiscoverInputIDs(root); 19 DiscoverInputIDs(root);
22 GenerateGLTexIDs(); 20 GenerateGLTexIDs();
23 AssignIDMapping(); 21 AssignIDMapping();
24 WriteOutNewIDs(root); 22 WriteOutNewIDs(root);
25 AllocateImageArray(); 23 AllocateImageArray();
26 BuildTextureImages(root); 24 BuildTextureImages(root);
27 } 25 }
28 26
29 TextureGenerator::~TextureGenerator() { 27 TextureGenerator::~TextureGenerator() {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 glTexImage2D(GL_TEXTURE_2D, 165 glTexImage2D(GL_TEXTURE_2D,
168 0, 166 0,
169 format, 167 format,
170 width, height, 168 width, height,
171 0, 169 0,
172 format, 170 format,
173 GL_UNSIGNED_BYTE, 171 GL_UNSIGNED_BYTE,
174 image_data_[imgID].get()); 172 image_data_[imgID].get());
175 } 173 }
176 174
OLDNEW
« no previous file with comments | « no previous file | net/spdy/spdy_framer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698