Invoke draw call to evas gl surface only for a valid texture.
authoruzair.jaleel <uzair.jaleel@samsung.com>
Thu, 19 Feb 2015 14:36:24 +0000 (20:06 +0530)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
Currently, texture id is not initialized for a new RWHV. So, when we
navigate to a new page, a draw attempt is made for an undefined texture
and hence we see the black screen. With this patch, we draw only when
the texture is valid.

Bug: http://168.219.209.56/jira/browse/TNEF-166
Reviewed by: Siba Samal, venu musham

Change-Id: I19665a4fa6252d86364b2fc4e4ea484d78a551cf
Signed-off-by: uzair.jaleel <uzair.jaleel@samsung.com>
tizen_src/impl/browser/renderer_host/render_widget_host_view_efl.cc

index 68ff37d..5677b76 100644 (file)
@@ -120,6 +120,7 @@ RenderWidgetHostViewEfl::RenderWidgetHostViewEfl(RenderWidgetHost* widget, EWebV
     egl_image_(NULL),
     current_pixmap_id_(0),
     next_pixmap_id_(0),
+    texture_id_(0),
     surface_id_(0),
     should_restore_selection_menu_(false),
     selection_acked_on_tap_(false),
@@ -367,7 +368,8 @@ void RenderWidgetHostViewEfl::PaintTextureToSurface(GLuint texture_id) {
 
 void RenderWidgetHostViewEfl::EvasObjectImagePixelsGetCallback(void* data, Evas_Object* obj) {
   RenderWidgetHostViewEfl* rwhv_efl = reinterpret_cast<RenderWidgetHostViewEfl*>(data);
-  rwhv_efl->PaintTextureToSurface(rwhv_efl->texture_id_);
+  if (rwhv_efl->texture_id_)
+    rwhv_efl->PaintTextureToSurface(rwhv_efl->texture_id_);
 }
 
 void RenderWidgetHostViewEfl::Init_EvasGL(int width, int height) {