Fix SkQP tests (android 10 cts r3)
bug: 139956393
This addresses a bug where in Q CTS r3 (more recent than that we've used
to validate before), SkQP test cases fail due to glTexSubImage2D not
accounting for different settings for offset and row length.
Test: ./cts-tradefed run cts -m CtsSkQPTestCases on android 10 r3: 0 failures
Change-Id: I771d81bc831b4ea86bc4a985f311c687cb60694a
diff --git a/system/GLESv2_enc/gl2_enc.cpp b/system/GLESv2_enc/gl2_enc.cpp
index 0df93f8..fb70443 100644
--- a/system/GLESv2_enc/gl2_enc.cpp
+++ b/system/GLESv2_enc/gl2_enc.cpp
@@ -3344,7 +3344,7 @@
stream->writeFully(&__size_pixels,4);
if (useChecksum) checksumCalculator->addBuffer(&__size_pixels,4);
if (pixels != NULL) {
- stream->writeFully(pixels, __size_pixels);
+ stream->uploadPixels(self, width, height, format, type, pixels);
if (useChecksum) checksumCalculator->addBuffer(pixels, __size_pixels);
}
buf = stream->alloc(checksumSize);
@@ -3497,7 +3497,7 @@
stream->writeFully(&__size_pixels,4);
if (useChecksum) checksumCalculator->addBuffer(&__size_pixels,4);
if (pixels != NULL) {
- stream->writeFully(pixels, __size_pixels);
+ stream->uploadPixels(self, width, height, format, type, pixels);
if (useChecksum) checksumCalculator->addBuffer(pixels, __size_pixels);
}
buf = stream->alloc(checksumSize);