summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 00:11:27 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 00:11:27 +0000
commitd366c4837137eef92d3b5a5a13115262ff6633f2 (patch)
treede8c8335c06bf3cc7d66e7fcf4951bc308077cb2
parentb41b3e277f6472c97e44e4cc8f402eee9c906c3b (diff)
downloadchromium_src-d366c4837137eef92d3b5a5a13115262ff6633f2.zip
chromium_src-d366c4837137eef92d3b5a5a13115262ff6633f2.tar.gz
chromium_src-d366c4837137eef92d3b5a5a13115262ff6633f2.tar.bz2
Convert LOG(INFO) to VLOG(1) - gpu/.
Also wraps a couple conditionals to comply with the style guide, removes some extra {}s, and simplifies some code. BUG=none TEST=none Review URL: http://codereview.chromium.org/3917001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63148 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--gpu/command_buffer/service/cmd_parser.cc19
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc21
2 files changed, 17 insertions, 23 deletions
diff --git a/gpu/command_buffer/service/cmd_parser.cc b/gpu/command_buffer/service/cmd_parser.cc
index 4380aca..6d66628 100644
--- a/gpu/command_buffer/service/cmd_parser.cc
+++ b/gpu/command_buffer/service/cmd_parser.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -39,16 +39,17 @@ CommandParser::CommandParser(void *shm_address,
// - get_ is modified *after* the command has been executed.
error::Error CommandParser::ProcessCommand() {
CommandBufferOffset get = get_;
- if (get == put_) return error::kNoError;
+ if (get == put_)
+ return error::kNoError;
CommandHeader header = buffer_[get].value_header;
if (header.size == 0) {
- DLOG(INFO) << "Error: zero sized command in command buffer";
+ DVLOG(1) << "Error: zero sized command in command buffer";
return error::kInvalidSize;
}
if (static_cast<int>(header.size) + get > entry_count_) {
- DLOG(INFO) << "Error: get offset out of bounds";
+ DVLOG(1) << "Error: get offset out of bounds";
return error::kOutOfBounds;
}
@@ -62,16 +63,15 @@ error::Error CommandParser::ProcessCommand() {
}
// If get was not set somewhere else advance it.
- if (get == get_) {
+ if (get == get_)
get_ = (get + header.size) % entry_count_;
- }
return result;
}
void CommandParser::ReportError(unsigned int command_id,
error::Error result) {
- DLOG(INFO) << "Error: " << result << " for Command "
- << handler_->GetCommandName(command_id);
+ DVLOG(1) << "Error: " << result << " for Command "
+ << handler_->GetCommandName(command_id);
}
// Processes all the commands, while the buffer is not empty. Stop if an error
@@ -79,7 +79,8 @@ void CommandParser::ReportError(unsigned int command_id,
error::Error CommandParser::ProcessAllCommands() {
while (!IsEmpty()) {
error::Error error = ProcessCommand();
- if (error) return error;
+ if (error)
+ return error;
}
return error::kNoError;
}
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index e3374c0..399547d 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -1798,11 +1798,8 @@ bool GLES2DecoderImpl::Initialize(gfx::GLContext* context,
// available.
const bool depth24_stencil8_supported =
context_->HasExtension("GL_OES_packed_depth_stencil");
- if (depth24_stencil8_supported) {
- LOG(INFO) << "GL_OES_packed_depth_stencil supported.";
- } else {
- LOG(INFO) << "GL_OES_packed_depth_stencil not supported.";
- }
+ VLOG(1) << "GL_OES_packed_depth_stencil "
+ << (depth24_stencil8_supported ? "" : "not ") << "supported.";
if ((attrib_parser.depth_size_ > 0 || attrib_parser.stencil_size_ > 0) &&
depth24_stencil8_supported) {
offscreen_target_depth_format_ = GL_DEPTH24_STENCIL8;
@@ -1824,11 +1821,8 @@ bool GLES2DecoderImpl::Initialize(gfx::GLContext* context,
// formats for depth attachments.
const bool depth24_stencil8_supported =
context_->HasExtension("GL_EXT_packed_depth_stencil");
- if (depth24_stencil8_supported) {
- LOG(INFO) << "GL_EXT_packed_depth_stencil supported.";
- } else {
- LOG(INFO) << "GL_EXT_packed_depth_stencil not supported.";
- }
+ VLOG(1) << "GL_EXT_packed_depth_stencil "
+ << (depth24_stencil8_supported ? "" : "not ") << "supported.";
if ((attrib_parser.depth_size_ > 0 || attrib_parser.stencil_size_ > 0) &&
depth24_stencil8_supported) {
@@ -2459,7 +2453,7 @@ error::Error GLES2DecoderImpl::DoCommand(
error::Error result = error::kNoError;
if (debug()) {
// TODO(gman): Change output to something useful for NaCl.
- DLOG(INFO) << "cmd: " << GetCommandName(command);
+ DVLOG(1) << "cmd: " << GetCommandName(command);
}
unsigned int command_index = command - kStartPoint - 1;
if (command_index < arraysize(g_command_info)) {
@@ -2485,8 +2479,7 @@ error::Error GLES2DecoderImpl::DoCommand(
while ((error = glGetError()) != GL_NO_ERROR) {
// TODO(gman): Change output to something useful for NaCl.
SetGLError(error, NULL);
- DLOG(INFO) << "GL ERROR: " << error
- << " : " << GetCommandName(command);
+ DVLOG(1) << "GL ERROR: " << error << " : " << GetCommandName(command);
}
}
} else {