Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(499)

Unified Diff: src/opts/SkTextureCompression_opts_arm.cpp

Issue 422023006: Add query for block dimensions of a given format (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Turn off compression Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/opts/SkTextureCompression_opts_arm.cpp
diff --git a/src/opts/SkTextureCompression_opts_arm.cpp b/src/opts/SkTextureCompression_opts_arm.cpp
index 3a97a5ed9a161a099f60324c1d6ca86f1b6f49d7..3ec64249d280c9a6266b2362efec52f4e11f879a 100644
--- a/src/opts/SkTextureCompression_opts_arm.cpp
+++ b/src/opts/SkTextureCompression_opts_arm.cpp
@@ -36,3 +36,24 @@ SkTextureCompressorGetPlatformProc(SkColorType colorType, SkTextureCompressor::F
}
#endif
}
+
robertphillips 2014/07/29 16:16:04 '*'s go on the LHS
krajcevski 2014/07/29 17:49:51 Done.
+bool SkTextureCompressorGetPlatformDims(SkTextureCompressor::Format fmt, int *dimX, int* dimY) {
+#if SK_ARM_NEON_IS_NONE
+ return false;
+#else
+#if SK_ARM_NEON_IS_DYNAMIC
+ if (!sk_cpu_arm_has_neon()) {
+ return false;
+ }
+#endif
+ switch (fmt) {
+ case SkTextureCompressor::kR11_EAC_Format:
+ *dimX = 16;
+ *dimY = 4;
+ return true;
robertphillips 2014/07/29 16:16:04 Why not ASTC here?
krajcevski 2014/07/29 17:49:51 We don't have ARM NEON optimized ASTC encoders.
+ default:
+ return false;
+ }
+ return false;
+#endif
+}

Powered by Google App Engine
This is Rietveld 408576698