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