mustRestoreFBO = true;
GL_CMD(glBindFramebuffer(GL_FRAMEBUFFER, m_fbo));
}
-
- // FIXME: Do we need to care for preserveDrawingBuffer here? I haven't found the case.
- // It seems we don't need to copy from m_texture to m_compositorTexture. It might be enough
- // that using m_compositorTexture only, then we might be able to improve a bit performance
- // since no texture copy is required.
- // But I don't have any confidence & evidence it'll make no problem, so let's keep
- // the legacy codes. If redering directly to compositorTexture causes an any issue,
- // then recover the case seperating preserveDrawingBuffer.
- GL_CMD(glBindTexture(GL_TEXTURE_2D, m_texture));
- GL_CMD(glTexImage2D(GL_TEXTURE_2D, 0, m_internalColorFormat, width, height, 0, colorFormat, type, 0));
- GL_CMD(glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_texture, 0));
- GL_CMD(glBindTexture(GL_TEXTURE_2D, m_compositorTexture));
- GL_CMD(glTexImage2D(GL_TEXTURE_2D, 0, m_internalColorFormat, width, height, 0, colorFormat, type, 0));
-
- GL_CMD(glBindTexture(GL_TEXTURE_2D, 0));
-
- if (!m_attributes.antialias) {
- if (m_attributes.stencil) {
- GL_CMD(glBindRenderbuffer(GL_RENDERBUFFER, m_stencilBuffer));
- GL_CMD(glRenderbufferStorage(GL_RENDERBUFFER, GL_STENCIL_INDEX8, width, height));
- GL_CMD(glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, m_stencilBuffer));
- }
-
- if (m_attributes.depth) {
- GL_CMD(glBindRenderbuffer(GL_RENDERBUFFER, m_depthBuffer));
- GL_CMD(glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, width, height));
- GL_CMD(glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, m_depthBuffer));
- }
-
- GL_CMD(glBindRenderbuffer(GL_RENDERBUFFER, 0));
- }
#endif // !ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
// Initialize renderbuffers to 0.
void GraphicsContext3DOffscreen::bufferData(GC3Denum target, GC3Dsizeiptr size, const void* data, GC3Denum usage)
{
+#if !ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+ if (!size)
+ return;
+#endif
GraphicsContext3DInternal::bufferData(target, size, data, usage);
// FIXME : Driver issue!