diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-30 03:55:47 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-30 03:55:47 +0000 |
commit | 542bdfe5dde965d920bfca1328d0f6e70e8dbb9b (patch) | |
tree | 69f191ddc519eef4fd2ad6c0fae3fc3e3f9f780e /gpu | |
parent | 4e212c3b271b13d22156945997443d00feed6e02 (diff) | |
download | chromium_src-542bdfe5dde965d920bfca1328d0f6e70e8dbb9b.zip chromium_src-542bdfe5dde965d920bfca1328d0f6e70e8dbb9b.tar.gz chromium_src-542bdfe5dde965d920bfca1328d0f6e70e8dbb9b.tar.bz2 |
Revert 67662 - FBTF: Remove unneeded headers from base/ (part 10)
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/5139006
TBR=thestig@chromium.org
Review URL: http://codereview.chromium.org/5270010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67674 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/service/buffer_manager.cc | 7 | ||||
-rw-r--r-- | gpu/command_buffer/service/buffer_manager.h | 7 | ||||
-rw-r--r-- | gpu/command_buffer/service/command_buffer_service.h | 1 | ||||
-rw-r--r-- | gpu/command_buffer/service/texture_manager.cc | 21 | ||||
-rw-r--r-- | gpu/command_buffer/service/texture_manager.h | 17 |
5 files changed, 26 insertions, 27 deletions
diff --git a/gpu/command_buffer/service/buffer_manager.cc b/gpu/command_buffer/service/buffer_manager.cc index de188c6..07a9753 100644 --- a/gpu/command_buffer/service/buffer_manager.cc +++ b/gpu/command_buffer/service/buffer_manager.cc @@ -54,11 +54,6 @@ void BufferManager::RemoveBufferInfo(GLuint client_id) { } } -void BufferManager::BufferInfo::set_target(GLenum target) { - DCHECK_EQ(target_, 0u); // you can only set this once. - target_ = target; -} - BufferManager::BufferInfo::BufferInfo(GLuint service_id) : service_id_(service_id), target_(0), @@ -211,3 +206,5 @@ bool BufferManager::SetTarget(BufferManager::BufferInfo* info, GLenum target) { } // namespace gles2 } // namespace gpu + + diff --git a/gpu/command_buffer/service/buffer_manager.h b/gpu/command_buffer/service/buffer_manager.h index d28a618..81ad2af 100644 --- a/gpu/command_buffer/service/buffer_manager.h +++ b/gpu/command_buffer/service/buffer_manager.h @@ -95,7 +95,10 @@ class BufferManager { return target_; } - void set_target(GLenum target); + void set_target(GLenum target) { + DCHECK_EQ(target_, 0u); // you can only set this once. + target_ = target; + } bool shadowed() const { return shadowed_; @@ -179,3 +182,5 @@ class BufferManager { } // namespace gpu #endif // GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_ + + diff --git a/gpu/command_buffer/service/command_buffer_service.h b/gpu/command_buffer/service/command_buffer_service.h index 9a62df6..d9be20a 100644 --- a/gpu/command_buffer/service/command_buffer_service.h +++ b/gpu/command_buffer/service/command_buffer_service.h @@ -12,6 +12,7 @@ #include "base/linked_ptr.h" #include "base/scoped_ptr.h" #include "base/shared_memory.h" +#include "base/task.h" #include "gpu/command_buffer/common/command_buffer.h" namespace gpu { diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc index 07728b4..250da70 100644 --- a/gpu/command_buffer/service/texture_manager.cc +++ b/gpu/command_buffer/service/texture_manager.cc @@ -3,11 +3,7 @@ // found in the LICENSE file. #include "gpu/command_buffer/service/texture_manager.h" - -#include <algorithm> - #include "base/bits.h" -#include "base/logging.h" #include "gpu/command_buffer/common/gles2_cmd_utils.h" #include "gpu/command_buffer/service/feature_info.h" #include "gpu/command_buffer/service/gles2_cmd_decoder.h" @@ -281,16 +277,6 @@ void TextureManager::TextureInfo::SetParameter( Update(feature_info); } -void TextureManager::TextureInfo::SetTarget(GLenum target, GLint max_levels) { - DCHECK_EQ(0u, target_); // you can only set this once. - target_ = target; - size_t num_faces = (target == GL_TEXTURE_2D) ? 1 : 6; - level_infos_.resize(num_faces); - for (size_t ii = 0; ii < num_faces; ++ii) { - level_infos_[ii].resize(max_levels); - } -} - void TextureManager::TextureInfo::Update(const FeatureInfo* feature_info) { // Update npot status. npot_ = false; @@ -440,11 +426,6 @@ bool TextureManager::ValidForTarget( (target != GL_TEXTURE_2D || (depth == 1)); } -void TextureManager::SetInfoTarget(TextureInfo* info, GLenum target) { - DCHECK(info); - info->SetTarget(target, MaxLevelsForTarget(target)); -} - void TextureManager::SetLevelInfo( const FeatureInfo* feature_info, TextureManager::TextureInfo* info, @@ -545,3 +526,5 @@ bool TextureManager::GetClientId(GLuint service_id, GLuint* client_id) const { } // namespace gles2 } // namespace gpu + + diff --git a/gpu/command_buffer/service/texture_manager.h b/gpu/command_buffer/service/texture_manager.h index 7e07422..182e0d1 100644 --- a/gpu/command_buffer/service/texture_manager.h +++ b/gpu/command_buffer/service/texture_manager.h @@ -8,6 +8,7 @@ #include <map> #include <vector> #include "base/basictypes.h" +#include "base/logging.h" #include "base/ref_counted.h" #include "gpu/command_buffer/service/gl_utils.h" @@ -166,7 +167,15 @@ class TextureManager { // Parameters: // target: GL_TEXTURE_2D or GL_TEXTURE_CUBE_MAP // max_levels: The maximum levels this type of target can have. - void SetTarget(GLenum target, GLint max_levels); + void SetTarget(GLenum target, GLint max_levels) { + DCHECK_EQ(0u, target_); // you can only set this once. + target_ = target; + size_t num_faces = (target == GL_TEXTURE_2D) ? 1 : 6; + level_infos_.resize(num_faces); + for (size_t ii = 0; ii < num_faces; ++ii) { + level_infos_[ii].resize(max_levels); + } + } // Update info about this texture. void Update(const FeatureInfo* feature_info); @@ -235,7 +244,10 @@ class TextureManager { // Parameters: // target: GL_TEXTURE_2D or GL_TEXTURE_CUBE_MAP // max_levels: The maximum levels this type of target can have. - void SetInfoTarget(TextureInfo* info, GLenum target); + void SetInfoTarget(TextureInfo* info, GLenum target) { + DCHECK(info); + info->SetTarget(target, MaxLevelsForTarget(target)); + } // Set the info for a particular level in a TexureInfo. void SetLevelInfo( @@ -320,3 +332,4 @@ class TextureManager { } // namespace gpu #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ + |