diff options
author | martina.kollarova <martina.kollarova@intel.com> | 2015-12-14 02:19:45 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-14 10:20:43 +0000 |
commit | 9655baf11f55393ae4e4222eaead7e830ca57265 (patch) | |
tree | 8071b74e1fa8a04290fa66008cbd7d58cbe72662 /gpu | |
parent | b56e1bfc2cbc4d9cf42667266e9dc9381fa75271 (diff) | |
download | chromium_src-9655baf11f55393ae4e4222eaead7e830ca57265.zip chromium_src-9655baf11f55393ae4e4222eaead7e830ca57265.tar.gz chromium_src-9655baf11f55393ae4e4222eaead7e830ca57265.tar.bz2 |
Remove remaining ScopedVector from gpu/ dir
Usage of std::vector for movable types has been recently whitelisted.
https://chromium-cpp.appspot.com/#library-whitelist
BUG=554289
Review URL: https://codereview.chromium.org/1516283002
Cr-Commit-Position: refs/heads/master@{#364994}
Diffstat (limited to 'gpu')
4 files changed, 18 insertions, 20 deletions
diff --git a/gpu/command_buffer/client/mapped_memory.h b/gpu/command_buffer/client/mapped_memory.h index 8d312d8..78f5255 100644 --- a/gpu/command_buffer/client/mapped_memory.h +++ b/gpu/command_buffer/client/mapped_memory.h @@ -9,7 +9,7 @@ #include "base/bind.h" #include "base/macros.h" -#include "base/memory/scoped_vector.h" +#include "base/memory/scoped_ptr.h" #include "base/trace_event/memory_dump_provider.h" #include "gpu/command_buffer/client/fenced_allocator.h" #include "gpu/command_buffer/common/buffer.h" diff --git a/gpu/command_buffer/tests/gl_compressed_copy_texture_CHROMIUM_unittest.cc b/gpu/command_buffer/tests/gl_compressed_copy_texture_CHROMIUM_unittest.cc index e692b7d..1197d42 100644 --- a/gpu/command_buffer/tests/gl_compressed_copy_texture_CHROMIUM_unittest.cc +++ b/gpu/command_buffer/tests/gl_compressed_copy_texture_CHROMIUM_unittest.cc @@ -10,7 +10,6 @@ #include <GLES2/gl2ext.h> #include <GLES2/gl2extchromium.h> -#include "base/memory/scoped_vector.h" #include "gpu/command_buffer/tests/gl_manager.h" #include "gpu/command_buffer/tests/gl_test_utils.h" #include "testing/gmock/include/gmock/gmock.h" @@ -206,42 +205,42 @@ TEST_P(GLCompressedCopyTextureCHROMIUMTest, InternalFormat) { Image(const GLint format, const uint8* data, const GLsizei data_size) : format(format), data(data), data_size(data_size) {} }; - ScopedVector<Image> supported_formats; + std::vector<scoped_ptr<Image>> supported_formats; if ((GLTestHelper::HasExtension("GL_AMD_compressed_ATC_texture") || GLTestHelper::HasExtension("GL_ATI_texture_compression_atitc")) && copy_type != TexSubImage) { - supported_formats.push_back(new Image( + supported_formats.push_back(make_scoped_ptr(new Image( GL_ATC_RGB_AMD, kCompressedImageATC, - sizeof(kCompressedImageATC))); - supported_formats.push_back(new Image( + sizeof(kCompressedImageATC)))); + supported_formats.push_back(make_scoped_ptr(new Image( GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD, kCompressedImageATCIA, - sizeof(kCompressedImageATCIA))); + sizeof(kCompressedImageATCIA)))); } if (GLTestHelper::HasExtension("GL_EXT_texture_compression_dxt1")) { - supported_formats.push_back(new Image( + supported_formats.push_back(make_scoped_ptr(new Image( GL_COMPRESSED_RGB_S3TC_DXT1_EXT, kCompressedImageDXT1, - sizeof(kCompressedImageDXT1))); + sizeof(kCompressedImageDXT1)))); } if (GLTestHelper::HasExtension("GL_ANGLE_texture_compression_dxt5") || GLTestHelper::HasExtension("GL_EXT_texture_compression_s3tc")) { - supported_formats.push_back(new Image( + supported_formats.push_back(make_scoped_ptr(new Image( GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, kCompressedImageDXT5, - sizeof(kCompressedImageDXT5))); + sizeof(kCompressedImageDXT5)))); } if (GLTestHelper::HasExtension("GL_OES_compressed_ETC1_RGB8_texture") && copy_type != TexSubImage) { - supported_formats.push_back(new Image( + supported_formats.push_back(make_scoped_ptr(new Image( GL_ETC1_RGB8_OES, kCompressedImageETC1, - sizeof(kCompressedImageETC1))); + sizeof(kCompressedImageETC1)))); } - for (const Image* image : supported_formats) { + for (const auto& image : supported_formats) { glBindTexture(GL_TEXTURE_2D, textures_[0]); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); diff --git a/gpu/tools/compositor_model_bench/render_tree.cc b/gpu/tools/compositor_model_bench/render_tree.cc index e1a3804..143a1e3 100644 --- a/gpu/tools/compositor_model_bench/render_tree.cc +++ b/gpu/tools/compositor_model_bench/render_tree.cc @@ -78,9 +78,8 @@ ContentLayerNode::~ContentLayerNode() { void ContentLayerNode::Accept(RenderNodeVisitor* v) { v->BeginVisitContentLayerNode(this); - typedef vector<RenderNode*>::iterator node_itr; - for (node_itr i = children_.begin(); i != children_.end(); ++i) { - (*i)->Accept(v); + for (auto& child : children_) { + child->Accept(v); } v->EndVisitContentLayerNode(this); } diff --git a/gpu/tools/compositor_model_bench/render_tree.h b/gpu/tools/compositor_model_bench/render_tree.h index 5a460bc..a1b5321 100644 --- a/gpu/tools/compositor_model_bench/render_tree.h +++ b/gpu/tools/compositor_model_bench/render_tree.h @@ -12,7 +12,7 @@ #include <vector> #include "base/compiler_specific.h" -#include "base/memory/scoped_vector.h" +#include "base/memory/scoped_ptr.h" #include "gpu/tools/compositor_model_bench/shaders.h" #include "ui/gl/gl_bindings.h" #include "ui/gl/gl_implementation.h" @@ -144,11 +144,11 @@ class ContentLayerNode : public RenderNode { } void add_child(RenderNode* child) { - children_.push_back(child); + children_.push_back(make_scoped_ptr(child)); } private: - ScopedVector<RenderNode> children_; + std::vector<scoped_ptr<RenderNode>> children_; bool skipsDraw_; }; |