From a62aa2c0096063787aaea2eb140d4259ae2277f6 Mon Sep 17 00:00:00 2001 From: Amit Feller Date: Wed, 6 Jul 2011 09:52:38 +0300 Subject: [PATCH] opengl translator: add native config id to EglConfig The EGL_CONFIG_ID attribute should be uniqueue for each config, at some cases we duplicate a configuration in order to simulate different pixel format (RGB_565) at that case we want to keep the native config_id of the backend OpenGL the same on both configs. This change adds extra attribute 'native_config_id' for that purpose. Change-Id: I7e560a4badd01d146b9753cee603ff4707ccfd7f --- tools/emulator/opengl/host/libs/Translator/EGL/EglConfig.cpp | 3 +++ tools/emulator/opengl/host/libs/Translator/EGL/EglConfig.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/tools/emulator/opengl/host/libs/Translator/EGL/EglConfig.cpp b/tools/emulator/opengl/host/libs/Translator/EGL/EglConfig.cpp index 3d9a95e14..66a691c5e 100644 --- a/tools/emulator/opengl/host/libs/Translator/EGL/EglConfig.cpp +++ b/tools/emulator/opengl/host/libs/Translator/EGL/EglConfig.cpp @@ -48,6 +48,7 @@ EglConfig::EglConfig(EGLint red_size, m_bind_to_tex_rgba(EGL_FALSE), //not supported for now m_caveat(caveat), m_config_id(config_id), + m_native_config_id(config_id), m_frame_buffer_level(frame_buffer_level), m_depth_size(depth_size), m_max_pbuffer_width(max_pbuffer_width), @@ -82,6 +83,7 @@ EglConfig::EglConfig(EGLint red_size, m_bind_to_tex_rgba(conf.m_bind_to_tex_rgba), m_caveat(conf.m_caveat), m_config_id(conf.m_config_id), + m_native_config_id(conf.m_native_config_id), m_frame_buffer_level(conf.m_frame_buffer_level), m_depth_size(conf.m_depth_size), m_max_pbuffer_width(conf.m_max_pbuffer_width), @@ -121,6 +123,7 @@ EglConfig::EglConfig(const EglConfig& conf, m_bind_to_tex_rgba(conf.m_bind_to_tex_rgba), m_caveat(conf.m_caveat), m_config_id(config_id), + m_native_config_id(conf.m_native_config_id), m_frame_buffer_level(conf.m_frame_buffer_level), m_depth_size(conf.m_depth_size), m_max_pbuffer_width(conf.m_max_pbuffer_width), diff --git a/tools/emulator/opengl/host/libs/Translator/EGL/EglConfig.h b/tools/emulator/opengl/host/libs/Translator/EGL/EglConfig.h index b9da52e0f..3d733f976 100644 --- a/tools/emulator/opengl/host/libs/Translator/EGL/EglConfig.h +++ b/tools/emulator/opengl/host/libs/Translator/EGL/EglConfig.h @@ -32,6 +32,7 @@ public: bool choosen(const EglConfig& dummy); EGLint surfaceType(){ return m_surface_type;}; EGLint id(){return m_config_id;}; + EGLint nativeId(){return m_native_config_id;}; EGLNativePixelFormatType nativeConfig(){ return m_nativeFormat;} EglConfig(EGLint red_size, @@ -78,6 +79,7 @@ private: const EGLBoolean m_bind_to_tex_rgba; const EGLenum m_caveat; const EGLint m_config_id; + const EGLint m_native_config_id; const EGLint m_frame_buffer_level; const EGLint m_depth_size; const EGLint m_max_pbuffer_width;