Blinking issue was observed after resizing becasue newly created surface was not
finished compositing before delivering buffer to NUI App. Changed to ensure
completion of compositing by calling |glFinish|. And call |glClear| to fill
resized area using the background color.
Change-Id: I478aff1e1fc3850ac7c1bcbe91c76c9e8cb3b57f
Signed-off-by: YongGeol Jung <yg48.jung@samsung.com>
clear_bits |= GL_STENCIL_BUFFER_BIT;
gl_->Clear(clear_bits);
}
+#if defined(TIZEN_TBM_SUPPORT)
+ else
+ output_surface_->ClearFramebufferIfNeeded();
+#endif`
}
void GLRenderer::BeginDrawingFrame() {
pending_receiver);
#if defined(TIZEN_TBM_SUPPORT)
+ virtual void ClearFramebufferIfNeeded() {}
+ virtual void SetBackgroundColor(SkColor background_color) {}
+
virtual void* RenderedOffscreenBuffer() { return nullptr; }
virtual void CopySurface(
unsigned char* dest, int x, int y, int width, int height) {}
client_->ClearBrowserFrame(background_color_);
+#if defined(TIZEN_TBM_SUPPORT)
+ if (client_->OffscreenRenderingEnabled())
+ output_surface_->SetBackgroundColor(background_color_);
+#endif
+
display::DeviceDisplayInfoEfl display_info;
viz::AggregatedRenderPassList render_pass_list;
gl->GenTextures(1, &render_target_texture_);
gl->BindTexture(GL_TEXTURE_2D, render_target_texture_);
gl->ImageTargetTexture2DOES(image_);
+
+ swapped_before_ = false;
}
void EvasGLTBMBuffer::Destory() {
}
}
+void EvasGLTBMOutputSurface::ClearFramebufferIfNeeded() {
+ auto gl = ContextGLEfl();
+ gl->ClearColor(
+ static_cast<float>(SkColorGetR(background_color_)) / 255.0f,
+ static_cast<float>(SkColorGetG(background_color_)) / 255.0f,
+ static_cast<float>(SkColorGetB(background_color_)) / 255.0f,
+ static_cast<float>(SkColorGetA(background_color_)) / 255.0f);
+ gl->Clear(GL_COLOR_BUFFER_BIT);
+}
+
+void EvasGLTBMOutputSurface::SetBackgroundColor(SkColor background_color) {
+ background_color_ = background_color;
+}
+
void* EvasGLTBMOutputSurface::RenderedOffscreenBuffer() {
return tbm_buffer_[rendered_buffer_].tbm_surface();
}
bool use_stencil) override;
void SwapBuffers(viz::OutputSurfaceFrame frame) override;
- void* RenderedOffscreenBuffer() override;
gpu::gles2::GLES2ImplementationEfl* ContextGLEfl();
+ void ClearFramebufferIfNeeded() override;
+ void SetBackgroundColor(SkColor background_color) override;
+
+ void* RenderedOffscreenBuffer() override;
+
void CopySurface(
unsigned char* dest, int x, int y, int width, int height) override;
unsigned offscreen_framebuffer_id_;
int current_buffer_;
int rendered_buffer_;
+
+ SkColor background_color_ = SK_ColorTRANSPARENT;
};
#endif // TIZEN_TBM_SUPPORT
} // namespace content