[M94 Migration][DA] Fix webgl contents blinking issue. 04/291004/4
authorYongGeol Jung <yg48.jung@samsung.com>
Wed, 13 Jan 2021 10:56:54 +0000 (02:56 -0800)
committerBot Blink <blinkbot@samsung.com>
Fri, 14 Apr 2023 00:04:57 +0000 (00:04 +0000)
Webgl contents are blinking in Familyhhub 6.0 target(kantm only). This is
occurred because alpha channel of frame buffer is not cleared as 1(It seems
that there is complicated timing issue with kantm target). To fix this issue,
ensure clearing frame buffer after setting rendering target.

Reference Patch : https://review.tizen.org/gerrit/#/c/251417

Change-Id: I65f7a04bb824054c8f4e7b4867d2d097121023e8
Signed-off-by: YongGeol Jung <yg48.jung@samsung.com>
third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc

index 27e3b27d941be8e01710ce13a5845f5c5cbd01ed..bd0e14b6b994f903fa67961a4863a1021f81a10b 100644 (file)
@@ -1847,6 +1847,13 @@ void DrawingBuffer::AttachColorBufferToReadFramebuffer() {
     gl_->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
                               texture_target, id, 0);
   }
+
+#if defined(OS_TIZEN_DA_PRODUCT)
+  // WebGL contents are blinking in Familyhub 6.0 target(kantm only).
+  gl_->ClearColor(0, 0, 0,
+                  DefaultBufferRequiresAlphaChannelToBePreserved() ? 1 : 0);
+  gl_->Clear(GL_COLOR_BUFFER_BIT);
+#endif
 }
 
 bool DrawingBuffer::WantExplicitResolve() {