MCPcopy Create free account
hub / github.com/defold/defold / delta_decode

Function delta_decode

engine/render/src/render/font/fontmap.cpp:55–64  ·  view source on GitHub ↗

https://en.wikipedia.org/wiki/Delta_encoding

Source from the content-addressed store, hash-verified

53
54 // https://en.wikipedia.org/wiki/Delta_encoding
55 static void delta_decode(uint8_t* buffer, int length)
56 {
57 uint8_t last = 0;
58 for (int i = 0; i < length; i++)
59 {
60 uint8_t delta = buffer[i];
61 buffer[i] = delta + last;
62 last = buffer[i];
63 }
64 }
65
66 // Font maps have no mips, so we need to make sure we use a supported min filter
67 static dmGraphics::TextureFilter ConvertMinTextureFilter(dmGraphics::TextureFilter filter)

Callers 1

UpdateGlyphTextureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected