diff options
Diffstat (limited to 'emulator/opengl/host/tools/emugen/tests/t.001/expected/encoder/foo_enc.cpp')
-rw-r--r-- | emulator/opengl/host/tools/emugen/tests/t.001/expected/encoder/foo_enc.cpp | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/emulator/opengl/host/tools/emugen/tests/t.001/expected/encoder/foo_enc.cpp b/emulator/opengl/host/tools/emugen/tests/t.001/expected/encoder/foo_enc.cpp deleted file mode 100644 index 5e1758e..0000000 --- a/emulator/opengl/host/tools/emugen/tests/t.001/expected/encoder/foo_enc.cpp +++ /dev/null @@ -1,84 +0,0 @@ -// Generated Code - DO NOT EDIT !! -// generated by 'emugen' - - -#include <string.h> -#include "foo_opcodes.h" - -#include "foo_enc.h" - - -#include <stdio.h> - -namespace { - -void enc_unsupported() -{ - ALOGE("Function is unsupported\n"); -} - -void fooAlphaFunc_enc(void *self , FooInt func, FooFloat ref) -{ - - foo_encoder_context_t *ctx = (foo_encoder_context_t *)self; - IOStream *stream = ctx->m_stream; - - unsigned char *ptr; - const size_t packetSize = 8 + 4 + 4; - ptr = stream->alloc(packetSize); - int tmp = OP_fooAlphaFunc;memcpy(ptr, &tmp, 4); ptr += 4; - memcpy(ptr, &packetSize, 4); ptr += 4; - - memcpy(ptr, &func, 4); ptr += 4; - memcpy(ptr, &ref, 4); ptr += 4; -} - -FooBoolean fooIsBuffer_enc(void *self , void* stuff) -{ - - foo_encoder_context_t *ctx = (foo_encoder_context_t *)self; - IOStream *stream = ctx->m_stream; - - const unsigned int __size_stuff = (4 * sizeof(float)); - unsigned char *ptr; - const size_t packetSize = 8 + __size_stuff + 1*4; - ptr = stream->alloc(packetSize); - int tmp = OP_fooIsBuffer;memcpy(ptr, &tmp, 4); ptr += 4; - memcpy(ptr, &packetSize, 4); ptr += 4; - - *(unsigned int *)(ptr) = __size_stuff; ptr += 4; - memcpy(ptr, stuff, __size_stuff);ptr += __size_stuff; - - FooBoolean retval; - stream->readback(&retval, 1); - return retval; -} - -void fooDoEncoderFlush_enc(void *self , FooInt param) -{ - - foo_encoder_context_t *ctx = (foo_encoder_context_t *)self; - IOStream *stream = ctx->m_stream; - - unsigned char *ptr; - const size_t packetSize = 8 + 4; - ptr = stream->alloc(packetSize); - int tmp = OP_fooDoEncoderFlush;memcpy(ptr, &tmp, 4); ptr += 4; - memcpy(ptr, &packetSize, 4); ptr += 4; - - memcpy(ptr, ¶m, 4); ptr += 4; - stream->flush(); -} - -} // namespace - -foo_encoder_context_t::foo_encoder_context_t(IOStream *stream) -{ - m_stream = stream; - - this->fooAlphaFunc = &fooAlphaFunc_enc; - this->fooIsBuffer = &fooIsBuffer_enc; - this->fooUnsupported = (fooUnsupported_client_proc_t) &enc_unsupported; - this->fooDoEncoderFlush = &fooDoEncoderFlush_enc; -} - |