Changeset 137294 in webkit
- Timestamp:
- Dec 11, 2012 4:54:59 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r137292 r137294 1 2012-12-11 Kondapally Kalyan <kalyan.kondapally@intel.com> 2 3 [EFL][WebGL] Regression(r137211) WebGL is broken with NVIDIA Drivers. 4 https://bugs.webkit.org/show_bug.cgi?id=104652. 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Reverting some of the changes from r137211, as it causes regressions 9 on NVIDIA drivers. 10 11 * platform/graphics/efl/GraphicsContext3DEfl.cpp: 12 (WebCore::GraphicsContext3D::GraphicsContext3D): 13 * platform/graphics/efl/GraphicsContext3DPrivate.cpp: 14 (GraphicsContext3DPrivate::copyToGraphicsSurface): 15 * platform/graphics/opengl/GLPlatformSurface.cpp: 16 (WebCore::GLPlatformSurface::updateContents): 17 * platform/graphics/opengl/GLPlatformSurface.h: 18 (GLPlatformSurface): 19 1 20 2012-12-11 Pavel Feldman <pfeldman@chromium.org> 2 21 -
trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp
r137211 r137294 81 81 if (renderStyle == RenderOffscreen) { 82 82 // Create buffers for the canvas FBO. 83 m_private->m_platformSurface->initialize(&m_fbo);83 glGenFramebuffers(/* count */ 1, &m_fbo); 84 84 85 85 // Create a texture to render into. -
trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.cpp
r137211 r137294 159 159 } 160 160 161 m_platformSurface->updateContents(m_context->m_ boundFBO);161 m_platformSurface->updateContents(m_context->m_texture, m_context->m_boundFBO, m_context->m_boundTexture0); 162 162 163 163 if (enableScissorTest) -
trunk/Source/WebCore/platform/graphics/opengl/GLPlatformSurface.cpp
r137211 r137294 73 73 } 74 74 75 void GLPlatformSurface::initialize(GLuint* frameBufferId)76 {77 if (!m_fboId)78 glGenFramebuffers(1, &m_fboId);79 80 *frameBufferId = m_fboId;81 }82 83 75 PlatformSurface GLPlatformSurface::handle() const 84 76 { … … 106 98 } 107 99 108 void GLPlatformSurface::updateContents(const GLuint bindFboId)100 void GLPlatformSurface::updateContents(const uint32_t texture, const GLuint bindFboId, const uint32_t bindTexture) 109 101 { 110 102 if (!m_fboId) 111 return;103 glGenFramebuffers(1, &m_fboId); 112 104 113 105 m_restoreNeeded = false; … … 119 111 120 112 glBindFramebuffer(GL_READ_FRAMEBUFFER, m_fboId); 113 glBindTexture(GL_TEXTURE_2D, texture); 114 glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture, 0); 121 115 glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); 122 116 // Use NEAREST as no scale is performed during the blit. 123 117 glBlitFramebuffer(x, y, width, height, x, y, width, height, GL_COLOR_BUFFER_BIT, GL_NEAREST); 124 118 swapBuffers(); 119 glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0); 120 glBindTexture(GL_TEXTURE_2D, bindTexture); 125 121 glBindFramebuffer(GL_FRAMEBUFFER, bindFboId); 126 122 } -
trunk/Source/WebCore/platform/graphics/opengl/GLPlatformSurface.h
r137211 r137294 53 53 const IntRect& geometry() const; 54 54 55 // Creates FBO used by the surface. Buffers can be bound to this FBO.56 void initialize(GLuint* frameBufferId);57 58 55 // Get the underlying platform specific surface handle. 59 56 PlatformSurface handle() const; … … 63 60 virtual void swapBuffers(); 64 61 65 // Convenience Function to update surface contents.62 // Convenience Function to update surface backbuffer with texture contents, restore current FBO and Texture. 66 63 // Function does the following(in order): 67 // a) Blits back buffer contents to frontbuffer.64 // a) Blits texture contents to back buffer. 68 65 // b) Calls Swap Buffers. 69 66 // c) Sets current FBO as bindFboId. 70 virtual void updateContents(const GLuint bindFboId);67 virtual void updateContents(const uint32_t texture, const GLuint bindFboId, const uint32_t bindTexture); 71 68 72 69 virtual void setGeometry(const IntRect& newRect);
Note: See TracChangeset
for help on using the changeset viewer.