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

Side by Side Diff: gpu/command_buffer/common/logging.h

Issue 6713127: Initialize a few uninitialized members in GPU classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
1 // Copyright (c) 2009 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 #ifndef GPU_COMMAND_BUFFER_COMMON_LOGGING_H_ 5 #ifndef GPU_COMMAND_BUFFER_COMMON_LOGGING_H_
6 #define GPU_COMMAND_BUFFER_COMMON_LOGGING_H_ 6 #define GPU_COMMAND_BUFFER_COMMON_LOGGING_H_
7 7
8 #include <assert.h> 8 #include <assert.h>
9 9
10 #include <iostream> 10 #include <iostream>
11 11
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 121 }
122 122
123 template <typename T> 123 template <typename T>
124 Logger& operator<<(const T& value) { 124 Logger& operator<<(const T& value) {
125 if (!condition_) 125 if (!condition_)
126 std::cerr << value; 126 std::cerr << value;
127 return *this; 127 return *this;
128 } 128 }
129 129
130 private: 130 private:
131 Logger(const Logger& logger): condition_(logger.condition_) { 131 Logger(const Logger& logger)
132 : condition_(logger.condition_),
133 level_(logger.level_) {
132 } 134 }
133 135
134 bool condition_; 136 bool condition_;
135 LogLevel level_; 137 LogLevel level_;
136 }; 138 };
137 139
138 } // namespace gpu 140 } // namespace gpu
139 141
140 #define GPU_CHECK(X) ::gpu::Logger::CheckTrue( \ 142 #define GPU_CHECK(X) ::gpu::Logger::CheckTrue( \
141 (X), __FILE__, __LINE__, #X, "GPU_CHECK") 143 (X), __FILE__, __LINE__, #X, "GPU_CHECK")
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 (X), (Y), __FILE__, __LINE__, #X, #Y, "GPU_DCHECK_GE") 189 (X), (Y), __FILE__, __LINE__, #X, #Y, "GPU_DCHECK_GE")
188 #define GPU_DCHECK_LE(X, Y) ::gpu::Logger::CheckLessEqual( \ 190 #define GPU_DCHECK_LE(X, Y) ::gpu::Logger::CheckLessEqual( \
189 (X), (Y), __FILE__, __LINE__, #X, #Y, "GPU_DCHECK_LE") 191 (X), (Y), __FILE__, __LINE__, #X, #Y, "GPU_DCHECK_LE")
190 #define GPU_DLOG(LEVEL) ::gpu::Logger(true, LEVEL) 192 #define GPU_DLOG(LEVEL) ::gpu::Logger(true, LEVEL)
191 193
192 #endif // NDEBUG 194 #endif // NDEBUG
193 195
194 #define GPU_NOTREACHED() GPU_DCHECK(false) 196 #define GPU_NOTREACHED() GPU_DCHECK(false)
195 197
196 #endif // GPU_COMMAND_BUFFER_COMMON_LOGGING_H_ 198 #endif // GPU_COMMAND_BUFFER_COMMON_LOGGING_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698