Use ES3 in iOS test harness
Bug: skia:
Change-Id: I365c82a058c97e8741ee91e999cb6faab5a5ecf5
Reviewed-on: https://skia-review.googlesource.com/c/175422
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/tests/TransferPixelsTest.cpp b/tests/TransferPixelsTest.cpp
index 537b5fe..5dd360d 100644
--- a/tests/TransferPixelsTest.cpp
+++ b/tests/TransferPixelsTest.cpp
@@ -68,7 +68,12 @@
// set up the data
const int kTextureWidth = 16;
const int kTextureHeight = 16;
+#ifdef SK_BUILD_FOR_IOS
+ // UNPACK_ROW_LENGTH is broken on iOS so rowBytes needs to match data width
+ const int kBufferWidth = GrBackendApi::kOpenGL == context->contextPriv().getBackend() ? 16 : 20;
+#else
const int kBufferWidth = 20;
+#endif
const int kBufferHeight = 16;
size_t rowBytes = kBufferWidth * sizeof(GrColor);
SkAutoTMalloc<GrColor> srcBuffer(kBufferWidth*kBufferHeight);
@@ -137,7 +142,12 @@
//////////////////////////
// transfer partial data
-
+#ifdef SK_BUILD_FOR_IOS
+ // UNPACK_ROW_LENGTH is broken on iOS so we can't do partial transfers
+ if (GrBackendApi::kOpenGL == context->contextPriv().getBackend()) {
+ continue;
+ }
+#endif
const int kLeft = 2;
const int kTop = 10;
const int kWidth = 10;