OSDN Git Service

Pitch fix for IO surfaces
authorAlexis Hetu <sugoi@google.com>
Fri, 11 May 2018 19:31:12 +0000 (15:31 -0400)
committerAlexis Hétu <sugoi@google.com>
Fri, 11 May 2018 20:24:59 +0000 (20:24 +0000)
commit5fd1cfaaeaa47ddf685ca3b4c7b4225adf21a907
tree26a786d090f7850ab303a232a84ed0d5c9ef0408
parent0641aebe315542f42606aac98d8afaca3be9b208
Pitch fix for IO surfaces

On MacOS, a Surface constructor receiving the 'pitchPprovided'
parameter wasn't using it for the surface's external pitch,
which was causing an error when using the Image::getPitch()
function, which returns getExternalPitchB(). Image::getPitch()
is used within Image::loadImageData(), which is used by gl
functions like glTexImage2D() and glTexSubImage2D(). Both the
internal and external buffers now use the parameter to solve
this issue.

Bug b/19979104

Change-Id: I9762ed53b535ae9eb052f57ee1ceed8ee87cb29c
Reviewed-on: https://swiftshader-review.googlesource.com/18828
Tested-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
src/Renderer/Surface.cpp