summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/tests
diff options
context:
space:
mode:
authorkbr <kbr@chromium.org>2014-11-26 17:50:15 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-27 01:50:41 +0000
commite3558eac30baa00fe4bb4c1aa79f21185c98b485 (patch)
tree3280c82510a2b8d1920d486ff8495e8f975d66a5 /gpu/command_buffer/tests
parent75643aced21b59dd9955925a13e47058b41c35d2 (diff)
downloadchromium_src-e3558eac30baa00fe4bb4c1aa79f21185c98b485.zip
chromium_src-e3558eac30baa00fe4bb4c1aa79f21185c98b485.tar.gz
chromium_src-e3558eac30baa00fe4bb4c1aa79f21185c98b485.tar.bz2
Revert of gpu: fix CopyTextureCHROMIUM for immutable texture. (patchset #4 id:60001 of https://codereview.chromium.org/744713002/)
Reason for revert: Broke video uploads to WebGL on official builds (taking the hardware accelerated video decode path). See Issue 436538. Original issue's description: > gpu: fix CopyTextureCHROMIUM for immutable texture. > > We cannot use glCopyTexImage2D on the texture which is allocated by glTexStorage2D [1] > [1] https://www.opengl.org/registry/specs/ARB/texture_storage.txt > The fast path uses glCopyTexSubImage2D instead of glCopyTexImage2D. > > In addition, optimize CopyTextureCHROMIUM for GL_TEXTURE_RECTANGLE_ARB, > which is often used by the compositor, so make CopyTextureCHROMIUM use > the fast path. > > Committed: https://crrev.com/df36f0aebe453bdbe842c85b331f6f07a24255a2 > Cr-Commit-Position: refs/heads/master@{#305268} TBR=sievers@chromium.org,reveman@chromium.org,dongseong.hwang@intel.com BUG=436538 Review URL: https://codereview.chromium.org/760173002 Cr-Commit-Position: refs/heads/master@{#305937}
Diffstat (limited to 'gpu/command_buffer/tests')
-rw-r--r--gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc37
1 files changed, 0 insertions, 37 deletions
diff --git a/gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc b/gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc
index a8cbb66..2c44e1a 100644
--- a/gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc
+++ b/gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc
@@ -76,43 +76,6 @@ TEST_F(GLCopyTextureCHROMIUMTest, Basic) {
EXPECT_TRUE(GL_NO_ERROR == glGetError());
}
-TEST_F(GLCopyTextureCHROMIUMTest, ImmutableTexture) {
- if (!GLTestHelper::HasExtension("GL_EXT_texture_storage")) {
- LOG(INFO) << "GL_EXT_texture_storage not supported. Skipping test...";
- return;
- }
-
- uint8 pixels[1 * 4] = {255u, 0u, 0u, 255u};
-
- glBindTexture(GL_TEXTURE_2D, textures_[0]);
- glTexStorage2DEXT(GL_TEXTURE_2D, 1, GL_RGBA8_OES, 1, 1);
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE,
- pixels);
-
- glBindTexture(GL_TEXTURE_2D, textures_[1]);
- glTexStorage2DEXT(GL_TEXTURE_2D, 1, GL_RGBA8_OES, 1, 1);
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D,
- textures_[1], 0);
- EXPECT_TRUE(glGetError() == GL_NO_ERROR);
-
- glCopyTextureCHROMIUM(GL_TEXTURE_2D, textures_[0], textures_[1], 0, GL_RGBA,
- GL_UNSIGNED_BYTE);
- EXPECT_TRUE(glGetError() == GL_NO_ERROR);
-
- // Check the FB is still bound.
- GLint value = 0;
- glGetIntegerv(GL_FRAMEBUFFER_BINDING, &value);
- GLuint fb_id = value;
- EXPECT_EQ(framebuffer_id_, fb_id);
-
- // Check that FB is complete.
- EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_COMPLETE),
- glCheckFramebufferStatus(GL_FRAMEBUFFER));
-
- GLTestHelper::CheckPixels(0, 0, 1, 1, 0, pixels);
- EXPECT_TRUE(GL_NO_ERROR == glGetError());
-}
-
TEST_F(GLCopyTextureCHROMIUMTest, InternalFormat) {
GLint src_formats[] = {GL_ALPHA, GL_RGB, GL_RGBA,
GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_BGRA_EXT};