Don't return frame mailbox until next frame comes.
authorViatcheslav Ostapenko <sl.ostapenko@samsung.com>
Wed, 19 Nov 2014 21:05:04 +0000 (16:05 -0500)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
MailboxOutputSurface expects, that client holds at least one pending mailbox texture.

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=8886
Reviewed by: Antonio Gomes, Balazs Kelemen

Change-Id: Idc360f44a392db20f4e6195ade2d7ca8d9c1b316
Signed-off-by: Viatcheslav Ostapenko <sl.ostapenko@samsung.com>
tizen_src/impl/browser/renderer_host/render_widget_host_view_efl.cc
tizen_src/impl/browser/renderer_host/render_widget_host_view_efl.h

index 4668953..6de7cfe 100644 (file)
@@ -1517,11 +1517,12 @@ void RenderWidgetHostViewEfl::OnSwapCompositorFrame(
     ack.gl_frame_data = frame->gl_frame_data.Pass();
 
     if (m_IsEvasGLInit) {
+      std::swap(ack.gl_frame_data->mailbox, pending_mailbox_);
       gpu::gles2::MailboxManager* manager =
           GLSharedContextEfl::GetMailboxManager();
 
       gpu::gles2::Texture* texture =
-          manager->ConsumeTexture(ack.gl_frame_data->mailbox);
+          manager->ConsumeTexture(pending_mailbox_);
       if (texture != NULL) {
         texture_id_ = GetTextureIdFromTexture(texture);
         evas_object_image_pixels_dirty_set(content_image_, true);
index 994e1a9..d4ad3e7 100644 (file)
@@ -21,6 +21,7 @@
 #include "content/browser/accessibility/browser_accessibility_manager.h"
 #include "content/browser/compositor/image_transport_factory.h"
 #include "content/browser/compositor/owned_mailbox.h"
+#include "gpu/command_buffer/common/mailbox.h"
 #include "ui/base/ime/text_input_client.h"
 #include "eweb_view.h"
 #include "browser/renderer_host/im_context_efl.h"
@@ -336,6 +337,8 @@ class RenderWidgetHostViewEfl
   // The last scroll offset of the view.
   gfx::Vector2dF last_scroll_offset_;
 
+  gpu::Mailbox pending_mailbox_;
+
   DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewEfl);
 };