#define MAX_SURFACE_WIDTH_EGL 4096 //max supported Framebuffer width
#define MAX_SURFACE_HEIGHT_EGL 4096 //max supported Framebuffer height
+// These two constants are redefinitions of the original constants defined
+// in evas_common.c. These are not supposed to be used directly by apps,
+// but we do this because of chromium uses fbo for direct rendering.
+#define EVAS_GL_OPTIONS_DIRECT_MEMORY_OPTIMIZE (1 << 12)
+#define EVAS_GL_OPTIONS_DIRECT_OVERRIDE (1 << 13)
+
namespace content {
namespace {
void RenderWidgetHostViewEfl::Init_EvasGL(int width, int height) {
CHECK(width > 0 && height > 0);
- setenv("EVAS_GL_DIRECT_OVERRIDE", "1", 1);
- setenv("EVAS_GL_DIRECT_MEM_OPT", "1",1);
-
evas_gl_config_ = evas_gl_config_new();
- evas_gl_config_->options_bits = EVAS_GL_OPTIONS_DIRECT;
+ evas_gl_config_->options_bits = (Evas_GL_Options_Bits)(
+ EVAS_GL_OPTIONS_DIRECT | EVAS_GL_OPTIONS_DIRECT_MEMORY_OPTIMIZE |
+ EVAS_GL_OPTIONS_DIRECT_OVERRIDE);
evas_gl_config_->color_format = EVAS_GL_RGBA_8888;
evas_gl_config_->depth_bits = EVAS_GL_DEPTH_BIT_24;
evas_gl_config_->stencil_bits = EVAS_GL_STENCIL_BIT_8;