diff options
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/client/gles2_implementation.cc | 15 | ||||
-rw-r--r-- | gpu/command_buffer/common/logging.h | 6 | ||||
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 1 | ||||
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.h | 4 | ||||
-rw-r--r-- | gpu/command_buffer/service/program_manager.cc | 1 | ||||
-rw-r--r-- | gpu/command_buffer/service/texture_manager.h | 1 | ||||
-rw-r--r-- | gpu/common/gpu_trace_event.cc | 10 |
7 files changed, 26 insertions, 12 deletions
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc index 88f5499..b51aefa 100644 --- a/gpu/command_buffer/client/gles2_implementation.cc +++ b/gpu/command_buffer/client/gles2_implementation.cc @@ -1,8 +1,8 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. -// A class to emluate GLES2 over command buffers. +// A class to emulate GLES2 over command buffers. #include "../client/gles2_implementation.h" #include <GLES2/gles2_command_buffer.h> @@ -446,6 +446,7 @@ GLES2Implementation::GLES2Implementation( // Allocate space for simple GL results. result_buffer_ = transfer_buffer; result_shm_offset_ = 0; + memset(&reserved_ids_, 0, sizeof(reserved_ids_)); mapped_memory_.reset(new MappedMemoryManager(helper_)); @@ -664,7 +665,7 @@ void GLES2Implementation::Flush() { // Insert the cmd to call glFlush helper_->Flush(); // Flush our command buffer - // (tell the service to execute upto the flush cmd.) + // (tell the service to execute up to the flush cmd.) helper_->CommandBufferHelper::Flush(); } @@ -672,7 +673,7 @@ void GLES2Implementation::Finish() { // Insert the cmd to call glFinish helper_->Finish(); // Finish our command buffer - // (tell the service to execute upto the Finish cmd and wait for it to + // (tell the service to execute up to the Finish cmd and wait for it to // execute.) helper_->CommandBufferHelper::Finish(); } @@ -1037,7 +1038,7 @@ void GLES2Implementation::TexSubImage2D( height -= num_rows; } } else { - // Transfer by sub rows. Beacuse GL has no maximum texture dimensions. + // Transfer by sub rows. Because GL has no maximum texture dimensions. uint32 temp; GLES2Util::ComputeImageDataSize( 1, 1, format, type, unpack_alignment_, &temp); @@ -1255,7 +1256,7 @@ void GLES2Implementation::ReadPixels( return; } - // glReadPixel pads the size of each row of pixels by an ammount specified by + // glReadPixel pads the size of each row of pixels by an amount specified by // glPixelStorei. So, we have to take that into account both in the fact that // the pixels returned from the ReadPixel command will include that padding // and that when we copy the results to the user's buffer we need to not @@ -1320,7 +1321,7 @@ void GLES2Implementation::ReadPixels( height -= num_rows; } } else { - // Transfer by sub rows. Beacuse GL has no maximum texture dimensions. + // Transfer by sub rows. Because GL has no maximum texture dimensions. GLES2Util::ComputeImageDataSize( 1, 1, format, type, pack_alignment_, &temp_size); GLsizeiptr element_size = temp_size; diff --git a/gpu/command_buffer/common/logging.h b/gpu/command_buffer/common/logging.h index c94bc7a..6142335 100644 --- a/gpu/command_buffer/common/logging.h +++ b/gpu/command_buffer/common/logging.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -128,7 +128,9 @@ class Logger { } private: - Logger(const Logger& logger): condition_(logger.condition_) { + Logger(const Logger& logger) + : condition_(logger.condition_), + level_(logger.level_) { } bool condition_; diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 49413e5..94f3ad0 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -1783,6 +1783,7 @@ GLES2DecoderImpl::GLES2DecoderImpl(ContextGroup* group) offscreen_target_depth_format_(0), offscreen_target_stencil_format_(0), offscreen_target_samples_(0), + copy_texture_to_parent_texture_fb_(0), offscreen_saved_color_format_(0), back_buffer_color_format_(0), current_decoder_error_(error::kNoError), diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.h b/gpu/command_buffer/service/gles2_cmd_decoder.h index 92d5300..1646c90 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -26,6 +26,8 @@ class ContextGroup; class GLES2Util; struct DisallowedExtensions { + DisallowedExtensions() : multisampling(false) {} + bool multisampling; }; diff --git a/gpu/command_buffer/service/program_manager.cc b/gpu/command_buffer/service/program_manager.cc index d618405..3bc5dea 100644 --- a/gpu/command_buffer/service/program_manager.cc +++ b/gpu/command_buffer/service/program_manager.cc @@ -32,6 +32,7 @@ ProgramManager::ProgramInfo::UniformInfo::UniformInfo(GLsizei _size, const std::string& _name) : size(_size), type(_type), + is_array(false), name(_name) { } diff --git a/gpu/command_buffer/service/texture_manager.h b/gpu/command_buffer/service/texture_manager.h index 9699873..f89fde6 100644 --- a/gpu/command_buffer/service/texture_manager.h +++ b/gpu/command_buffer/service/texture_manager.h @@ -41,6 +41,7 @@ class TextureManager { texture_complete_(false), cube_complete_(false), npot_(false), + has_been_bound_(false), owned_(true) { } diff --git a/gpu/common/gpu_trace_event.cc b/gpu/common/gpu_trace_event.cc index 1b834f4..1a3edfc 100644 --- a/gpu/common/gpu_trace_event.cc +++ b/gpu/common/gpu_trace_event.cc @@ -57,7 +57,13 @@ const char* GetPhaseStr(TraceEventPhase phase) { } } -TraceEvent::TraceEvent() { +TraceEvent::TraceEvent() + : processId(0), + threadId(0), + phase(GPU_TRACE_EVENT_PHASE_BEGIN), + category(NULL), + name(NULL) { + memset(&argNames, 0, sizeof(argNames)); } TraceEvent::~TraceEvent() { @@ -129,7 +135,7 @@ TraceLog::~TraceLog() { TraceCategory* TraceLog::GetCategory(const char* name) { AutoLock lock(lock_); // TODO(nduca): replace with a hash_map. - for (int i = static_cast<int>(categories_.size()) - 1; i >= 0; i-- ) { + for (int i = static_cast<int>(categories_.size()) - 1; i >= 0; i--) { if (strcmp(categories_[i]->name(), name) == 0) return categories_[i]; } |