diff options
author | zmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-06 17:48:26 +0000 |
---|---|---|
committer | zmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-06 17:48:26 +0000 |
commit | a8fb8f44bc56943c45bd06034fc004e22ef5da85 (patch) | |
tree | 0cf04d8183f36b63d56b3704176ea2d53b42f023 /gpu/command_buffer/service/vertex_attrib_manager_unittest.cc | |
parent | b375601e95723c66b63b567c80dfc69544c91c43 (diff) | |
download | chromium_src-a8fb8f44bc56943c45bd06034fc004e22ef5da85.zip chromium_src-a8fb8f44bc56943c45bd06034fc004e22ef5da85.tar.gz chromium_src-a8fb8f44bc56943c45bd06034fc004e22ef5da85.tar.bz2 |
Revert 186416
> Use client side arrays for GL_STREAM_DRAW attributes
>
> Certain GPU/drivers are slow when using constantly changing
> vertex buffers. They also run out of memory as the pipeline
> the buffers so while a buffer is in used being drawn to they
> can't delete it immediately when you upload new data to the
> buffer.
>
> This is an attempt to work around that issue seemlessly by
> using client side arrays for buffers marked as GL_STREAM_DRAW
>
> BUG=178093
>
>
> Review URL: https://chromiumcodereview.appspot.com/12494005
TBR=gman@chromium.org
Review URL: https://codereview.chromium.org/12544006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186459 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/service/vertex_attrib_manager_unittest.cc')
-rw-r--r-- | gpu/command_buffer/service/vertex_attrib_manager_unittest.cc | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/gpu/command_buffer/service/vertex_attrib_manager_unittest.cc b/gpu/command_buffer/service/vertex_attrib_manager_unittest.cc index 71a694c..3ce938c 100644 --- a/gpu/command_buffer/service/vertex_attrib_manager_unittest.cc +++ b/gpu/command_buffer/service/vertex_attrib_manager_unittest.cc @@ -7,7 +7,6 @@ #include "base/memory/scoped_ptr.h" #include "gpu/command_buffer/service/buffer_manager.h" #include "gpu/command_buffer/service/feature_info.h" -#include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h" #include "gpu/command_buffer/service/test_helper.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/gl/gl_mock.h" @@ -110,7 +109,7 @@ TEST_F(VertexAttribManagerTest, Enable) { } TEST_F(VertexAttribManagerTest, SetAttribInfo) { - BufferManager buffer_manager(NULL, NULL); + BufferManager buffer_manager(NULL); buffer_manager.CreateBuffer(1, 2); Buffer* buffer = buffer_manager.GetBuffer(1); ASSERT_TRUE(buffer != NULL); @@ -146,8 +145,7 @@ TEST_F(VertexAttribManagerTest, HaveFixedAttribs) { } TEST_F(VertexAttribManagerTest, CanAccess) { - MockGLES2Decoder decoder; - BufferManager buffer_manager(NULL, NULL); + BufferManager buffer_manager(NULL); buffer_manager.CreateBuffer(1, 2); Buffer* buffer = buffer_manager.GetBuffer(1); ASSERT_TRUE(buffer != NULL); @@ -163,23 +161,17 @@ TEST_F(VertexAttribManagerTest, CanAccess) { EXPECT_FALSE(info->CanAccess(0)); EXPECT_TRUE(buffer_manager.SetTarget(buffer, GL_ARRAY_BUFFER)); - TestHelper::DoBufferData( - gl_.get(), &decoder, &buffer_manager, buffer, 15, GL_STATIC_DRAW, NULL, - GL_NO_ERROR); + buffer_manager.SetInfo(buffer, 15, GL_STATIC_DRAW); EXPECT_FALSE(info->CanAccess(0)); - TestHelper::DoBufferData( - gl_.get(), &decoder, &buffer_manager, buffer, 16, GL_STATIC_DRAW, NULL, - GL_NO_ERROR); + buffer_manager.SetInfo(buffer, 16, GL_STATIC_DRAW); EXPECT_TRUE(info->CanAccess(0)); EXPECT_FALSE(info->CanAccess(1)); manager_->SetAttribInfo(1, buffer, 4, GL_FLOAT, GL_FALSE, 0, 16, 1); EXPECT_FALSE(info->CanAccess(0)); - TestHelper::DoBufferData( - gl_.get(), &decoder, &buffer_manager, buffer, 32, GL_STATIC_DRAW, NULL, - GL_NO_ERROR); + buffer_manager.SetInfo(buffer, 32, GL_STATIC_DRAW); EXPECT_TRUE(info->CanAccess(0)); EXPECT_FALSE(info->CanAccess(1)); manager_->SetAttribInfo(1, buffer, 4, GL_FLOAT, GL_FALSE, 0, 16, 0); @@ -195,7 +187,7 @@ TEST_F(VertexAttribManagerTest, CanAccess) { } TEST_F(VertexAttribManagerTest, Unbind) { - BufferManager buffer_manager(NULL, NULL); + BufferManager buffer_manager(NULL); buffer_manager.CreateBuffer(1, 2); buffer_manager.CreateBuffer(3, 4); Buffer* buffer1 = buffer_manager.GetBuffer(1); @@ -231,9 +223,6 @@ TEST_F(VertexAttribManagerTest, Unbind) { buffer_manager.Destroy(false); } -// TODO(gman): Test ValidateBindings -// TODO(gman): Test ValidateBindings with client side arrays. - } // namespace gles2 } // namespace gpu |