[M48] Enable sync point related code for delegated renderer.
authorChandan Padhi <c.padhi@samsung.com>
Thu, 7 Jan 2016 10:39:54 +0000 (16:09 +0530)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 07:55:23 +0000 (07:55 +0000)
In M48, sync_point has been replaced by gpu::SyncToken in
GLFrameData class.
This commit adapts the same on chromium-efl side as well.

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=15389

Reviewed by: dhyuna.ko, g.czajkowski, sns.park, venu.musham

Change-Id: Id7b86e28e88fe17794dbcb195827624f4da8216d
Signed-off-by: Chandan Padhi <c.padhi@samsung.com>
tizen_src/chromium_impl/content/browser/renderer_host/context_factory_efl.cc

index 8c75d6e..bb54610 100644 (file)
@@ -79,18 +79,15 @@ class NativeOutputSurfaceEfl : public cc::OutputSurface {
     // static pages and IE Fish page. (black screen issue was seen on Tizen TV
     context_provider_->ContextGL()->Flush();
 
-#if !defined(EWK_BRINGUP)
-// [M48_2564] Temporary disabling the codes for switching to new chromium
-//            FIXME: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=15389
-    frame->gl_frame_data->sync_point =
+    uint32 sync_point =
         context_provider_->ContextGL()->InsertSyncPointCHROMIUM();
-#endif
+
+    frame->gl_frame_data->sync_token = gpu::SyncToken(sync_point);
 
     base::Closure closure =
         base::Bind(&NativeOutputSurfaceEfl::OnSwapAck, base::Unretained(this),
                    base::Passed(&frame->gl_frame_data));
-    uint32 sync_point =
-        context_provider_->ContextGL()->InsertSyncPointCHROMIUM();
+
     context_provider()->ContextSupport()->SignalSyncPoint(sync_point, closure);
 
     client_->DidSwapBuffers();
@@ -174,8 +171,9 @@ class MailboxOutputSurfaceEfl : public cc::OutputSurface {
         TransferableFrame& texture = returned_textures_.front();
         if (texture.size == surface_size_) {
           current_backing_ = texture;
-          if (current_backing_.sync_point)
-            gl->WaitSyncPointCHROMIUM(current_backing_.sync_point);
+          if (current_backing_.sync_token.HasData())
+            gl->WaitSyncTokenCHROMIUM(
+                current_backing_.sync_token.GetConstData());
           returned_textures_.pop();
           break;
         }
@@ -275,11 +273,7 @@ class MailboxOutputSurfaceEfl : public cc::OutputSurface {
         }
       }
       DCHECK(it != pending_textures_.end());
-#if !defined(EWK_BRINGUP)
-// [M48_2564] Temporary disabling the codes for switching to new chromium
-//            FIXME: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=15389
-      it->sync_point = gl_frame_data->sync_point;
-#endif
+      it->sync_token = gl_frame_data->sync_token;
 
       if (!is_backbuffer_discarded_) {
         returned_textures_.push(*it);
@@ -337,11 +331,7 @@ class MailboxOutputSurfaceEfl : public cc::OutputSurface {
     uint32 sync_point =
         context_provider_->ContextGL()->InsertSyncPointCHROMIUM();
 
-#if !defined(EWK_BRINGUP)
-// [M48_2564] Temporary disabling the codes for switching to new chromium
-//            FIXME: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=15389
-    frame->gl_frame_data->sync_point = sync_point;
-#endif
+    frame->gl_frame_data->sync_token = gpu::SyncToken(sync_point);
 
     base::Closure closure =
         base::Bind(&MailboxOutputSurfaceEfl::OnSwapAck, base::Unretained(this),
@@ -370,17 +360,17 @@ class MailboxOutputSurfaceEfl : public cc::OutputSurface {
 
  private:
   struct TransferableFrame {
-    TransferableFrame() : texture_id(0), sync_point(0) {}
+    TransferableFrame() : texture_id(0) {}
 
     TransferableFrame(uint32 texture_id,
                       const gpu::Mailbox& mailbox,
                       const gfx::Size size)
-        : texture_id(texture_id), mailbox(mailbox), size(size), sync_point(0) {}
+        : texture_id(texture_id), mailbox(mailbox), size(size) {}
 
     uint32 texture_id;
     gpu::Mailbox mailbox;
     gfx::Size size;
-    uint32 sync_point;
+    gpu::SyncToken sync_token;
   };
   content::CommandBufferProxyImpl* GetCommandBufferProxy() {
     content::ContextProviderCommandBuffer* provider_command_buffer =