1 #pragma once 2 3 // Android system might want to allocate some color buffers with formats 4 // that are not compatible with most OpenGL implementations, 5 // such as YV12. 6 // In this situation, we need to convert to some OpenGL format such as 7 // RGB888 that actually works. 8 // While we can do some of this conversion in the guest gralloc driver itself 9 // (which would make ColorBuffer see only the OpenGL formatted pixels), 10 // it may be advantageous to do the conversion on the host as well. 11 // FrameworkFormat tracks whether the incoming color buffer from the guest 12 // can be directly used as a GL texture (FRAMEWORK_FORMAT_GL_COMPATIBLE). 13 // Otherwise, we need to know which format it is (e.g., FRAMEWORK_FORMAT_YV12) 14 // and convert on the host. 15 enum FrameworkFormat { 16 FRAMEWORK_FORMAT_GL_COMPATIBLE = 0, 17 FRAMEWORK_FORMAT_YV12 = 1, 18 FRAMEWORK_FORMAT_YUV_420_888 = 2, 19 }; 20