Commit 0e8e291d authored by kbr's avatar kbr Committed by Commit bot

Revert of gpu: Add GL_TEXTURE_RECTANGLE_ARB support to CopyTexSubImage2D...

Revert of gpu: Add GL_TEXTURE_RECTANGLE_ARB support to CopyTexSubImage2D optimization of CopyTexture. (patchset #1 id:1 of https://codereview.chromium.org/1149233005/)

Reason for revert:
May have caused WebGL conformance test failures on OS X; see http://crbug.com/486922 .

Original issue's description:
> gpu: Add GL_TEXTURE_RECTANGLE_ARB support to CopyTexSubImage2D optimization of CopyTexture.
>
> The availability of this extension is already limited to desktop core
> profile as the only reason we need to support it is IOSurfaces on
> MacOSX.
>
> This provides 2x performance improvement of copy operations when using
> IOSurface backed GpuMemoryBuffers.
>
> BUG=486922
>
> Committed: https://crrev.com/48514369cc66bc04ec766adf774de41d396a33ad
> Cr-Commit-Position: refs/heads/master@{#333159}

TBR=piman@chromium.org,dongseong.hwang@intel.com,reveman@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=486922

Review URL: https://codereview.chromium.org/1148853010

Cr-Commit-Position: refs/heads/master@{#333187}
parent ecce6736
...@@ -367,12 +367,12 @@ void CopyTextureCHROMIUMResourceManager::DoCopyTexture( ...@@ -367,12 +367,12 @@ void CopyTextureCHROMIUMResourceManager::DoCopyTexture(
// format of internalformat. // format of internalformat.
// https://www.khronos.org/opengles/sdk/docs/man/xhtml/glCopyTexImage2D.xml // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glCopyTexImage2D.xml
bool source_format_contain_superset_of_dest_format = bool source_format_contain_superset_of_dest_format =
source_internal_format == dest_internal_format || (source_internal_format == dest_internal_format &&
source_internal_format != GL_BGRA_EXT) ||
(source_internal_format == GL_RGBA && dest_internal_format == GL_RGB); (source_internal_format == GL_RGBA && dest_internal_format == GL_RGB);
// Note: GL_TEXTURE_RECTANGLE_ARB is only available if supported on FBOs. // GL_TEXTURE_RECTANGLE_ARB on FBO is supported by OpenGL, not GLES2,
bool valid_source_target = source_target == GL_TEXTURE_2D || // so restrict this to GL_TEXTURE_2D.
source_target == GL_TEXTURE_RECTANGLE_ARB; if (source_target == GL_TEXTURE_2D && !flip_y && !premultiply_alpha_change &&
if (valid_source_target && !flip_y && !premultiply_alpha_change &&
source_format_contain_superset_of_dest_format) { source_format_contain_superset_of_dest_format) {
DoCopyTexImage2D(decoder, DoCopyTexImage2D(decoder,
source_target, source_target,
...@@ -417,12 +417,12 @@ void CopyTextureCHROMIUMResourceManager::DoCopySubTexture( ...@@ -417,12 +417,12 @@ void CopyTextureCHROMIUMResourceManager::DoCopySubTexture(
// format of internalformat. // format of internalformat.
// https://www.khronos.org/opengles/sdk/docs/man/xhtml/glCopyTexImage2D.xml // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glCopyTexImage2D.xml
bool source_format_contain_superset_of_dest_format = bool source_format_contain_superset_of_dest_format =
source_internal_format == dest_internal_format || (source_internal_format == dest_internal_format &&
source_internal_format != GL_BGRA_EXT) ||
(source_internal_format == GL_RGBA && dest_internal_format == GL_RGB); (source_internal_format == GL_RGBA && dest_internal_format == GL_RGB);
// Note: GL_TEXTURE_RECTANGLE_ARB is only available if supported on FBOs. // GL_TEXTURE_RECTANGLE_ARB on FBO is supported by OpenGL, not GLES2,
bool valid_source_target = source_target == GL_TEXTURE_2D || // so restrict this to GL_TEXTURE_2D.
source_target == GL_TEXTURE_RECTANGLE_ARB; if (source_target == GL_TEXTURE_2D && !flip_y && !premultiply_alpha_change &&
if (valid_source_target && !flip_y && !premultiply_alpha_change &&
source_format_contain_superset_of_dest_format) { source_format_contain_superset_of_dest_format) {
DoCopyTexSubImage2D(decoder, source_target, source_id, dest_id, xoffset, DoCopyTexSubImage2D(decoder, source_target, source_id, dest_id, xoffset,
yoffset, x, y, width, height, framebuffer_); yoffset, x, y, width, height, framebuffer_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment