Skip to content

Commit

Permalink
Fix android_opengl_shaders_cache to match style guide
Browse files Browse the repository at this point in the history
  • Loading branch information
GreyCat committed Apr 13, 2020
1 parent a13da38 commit 2a59c5b
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions media/android_opengl_shaders_cache.ksy
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ meta:
endian: le

doc: |
Android apps using directly or indirectly OpenGL cache compiled shaders into com.android.opengl.shaders_cache file.
Android apps using directly or indirectly OpenGL cache compiled shaders
into com.android.opengl.shaders_cache file.
doc-ref: https://android.googlesource.com/platform/frameworks/native/+/master/opengl/libs/EGL/FileBlobCache.cpp

seq:
- id: signature
contents: ["EGL$"]
- id: magic
contents: "EGL$"
- id: crc32
type: u4
doc: crc32 of `contents`
Expand All @@ -25,22 +26,22 @@ types:
- id: alignment
size: "(_io.pos + 3) & ~3 - _io.pos"
doc: garbage from memory
string:
prefixed_string:
seq:
- id: length
- id: len_str
type: u4
-orig-id: mBuildIdLength
- id: str
type: strz
encoding: ascii
size: length
size: len_str
-orig-id: mBuildId, buildId
- id: alignment
type: alignment
cache:
doc-ref: https://android.googlesource.com/platform/frameworks/native/+/master/opengl/libs/EGL/BlobCache.cpp
seq:
- id: signature
- id: magic
-orig-id: mMagicNumber, blobCacheMagic
contents: ["$bB_"]
- id: version
Expand All @@ -49,29 +50,29 @@ types:
- id: device_version
type: u4
-orig-id: mDeviceVersion, blobCacheDeviceVersion
- id: count_of_entries
- id: num_entries
type: u4
-orig-id: mNumEntries
- id: build_id
type: string
type: prefixed_string
-orig-id: mBuildIdLength, mBuildId, buildId
if: version >= 3 # hypothesis, needs deeper investigation
- id: entries
type: entry
repeat: expr
repeat-expr: count_of_entries
repeat-expr: num_entries
types:
entry:
seq:
- id: key_size
- id: len_key
type: u4
-orig-id: mKeySize, keySize
- id: value_size
- id: len_value
type: u4
-orig-id: mValueSize, valueSize
- id: key
size: key_size
size: len_key
- id: value
size: value_size
size: len_value
- id: alignment
type: alignment

0 comments on commit 2a59c5b

Please sign in to comment.