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

Unified Diff: third_party/android_opengl/etc1/etc1.h

Issue 486093002: Fix thumbnail store crashing on loading old files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Handle endianness of float reads Created 6 years, 4 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: third_party/android_opengl/etc1/etc1.h
diff --git a/third_party/android_opengl/etc1/etc1.h b/third_party/android_opengl/etc1/etc1.h
index 0106967fa37dcc70d980979fe407e9fb3fa61a47..1c4d193de68e27ec8219b80904452e8f1e6da060 100644
--- a/third_party/android_opengl/etc1/etc1.h
+++ b/third_party/android_opengl/etc1/etc1.h
@@ -35,4 +35,24 @@ bool etc1_encode_image(const unsigned char* pIn, unsigned int width, unsigned in
unsigned int pixelSize, unsigned int stride, unsigned char* pOut, unsigned int outWidth,
unsigned int outHeight);
+// Size of a PKM header, in bytes.
+
+#define ETC_PKM_HEADER_SIZE 16
+
+// Format a PKM header
+
+void etc1_pkm_format_header(unsigned char* pHeader, unsigned int width, unsigned int height);
+
+// Check if a PKM header is correctly formatted.
+
+bool etc1_pkm_is_valid(const unsigned char* pHeader);
+
+// Read the image width from a PKM header
+
+unsigned int etc1_pkm_get_width(const unsigned char* pHeader);
+
+// Read the image height from a PKM header
+
+unsigned int etc1_pkm_get_height(const unsigned char* pHeader);
+
#endif // THIRD_PARTY_ANDROID_OPENGL_ETC1_ETC1_H_

Powered by Google App Engine
This is Rietveld 408576698