From fd19079f0482284bc82b86de928685f6251c4512 Mon Sep 17 00:00:00 2001 From: YongGeol Jung Date: Mon, 29 Apr 2013 20:47:42 +0900 Subject: [PATCH] Remove invalid code. [Title] Remove invalid code. [Issue#] N/A [Problem] Some webgl test cases fail on emulator. [Cause] After initializing webgl context, getError function returns INVALID_VALUE due to invalid code. [Solution] Remove invalid code. Change-Id: Id8617171ae59ad4e5ceb87729c43996fe73cb1fa --- .../efl/tizen/GraphicsContext3DOffscreen.cpp | 35 +++------------------- 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/Source/WebCore/platform/graphics/efl/tizen/GraphicsContext3DOffscreen.cpp b/Source/WebCore/platform/graphics/efl/tizen/GraphicsContext3DOffscreen.cpp index 82a2dd3..18def8f 100755 --- a/Source/WebCore/platform/graphics/efl/tizen/GraphicsContext3DOffscreen.cpp +++ b/Source/WebCore/platform/graphics/efl/tizen/GraphicsContext3DOffscreen.cpp @@ -732,37 +732,6 @@ void GraphicsContext3DOffscreen::reshape(int width, int height) 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. @@ -868,6 +837,10 @@ void GraphicsContext3DOffscreen::bindTexture(GC3Denum target, Platform3DObject t 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! -- 2.7.4