Changeset 203498 in webkit
- Timestamp:
- Jul 21, 2016, 12:29:39 AM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/GraphicsContext3D.h (modified) (1 diff)
-
platform/graphics/cairo/GraphicsContext3DCairo.cpp (modified) (4 diffs)
-
platform/graphics/opengl/GraphicsContext3DOpenGL.cpp (modified) (1 diff)
-
platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp (modified) (1 diff)
-
platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r203497 r203498 1 2016-07-21 Miguel Gomez <magomez@igalia.com> 2 3 [Threaded Compositor] Flickering when zooming in/out in maps.google.com 4 https://bugs.webkit.org/show_bug.cgi?id=154069 5 6 Reviewed by Carlos Garcia Campos. 7 8 Add a new extra buffer to GraphicsContext3D when using the Threaded Compositor, 9 so it doesn't have to reuse the buffers that are still waiting for composition. 10 11 Covered by existing tests. 12 13 * platform/graphics/GraphicsContext3D.h: 14 Add a new texture to use for the rendering. Remove the compositor fbo we were using. 15 * platform/graphics/cairo/GraphicsContext3DCairo.cpp: 16 (WebCore::GraphicsContext3D::GraphicsContext3D): 17 Initialize the new texture and remove the previous fbo related code. 18 (WebCore::GraphicsContext3D::~GraphicsContext3D): 19 Properly destroy the new texture and remove the previous fbo related code. 20 * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: 21 (WebCore::GraphicsContext3D::reshapeFBOs): 22 Allocate the new texture and remove the previous fbo allocation. 23 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: 24 (WebCore::GraphicsContext3D::prepareTexture): 25 Use a single fbo with three textures instead of two fbos with a texture each. 26 Rotate the three textures usage so: 27 - m_texture becomes m_compositorTexture to be pushed to the compositor. 28 - m_intermediateTexture becomes m_texture to receive the next rendering. 29 - m_compositorTexture becomes m_intermediateTexture. 30 And add a glFlush() to ensure that the gl commands are sent to the pipeline. 31 * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: 32 (WebCore::GraphicsContext3D::reshapeFBOs): 33 Allocate the new texture. 34 1 35 2016-07-21 Carlos Garcia Campos <cgarcia@igalia.com> 2 36 -
trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h
r199819 r203498 1423 1423 GC3Duint m_fbo; 1424 1424 #if USE(COORDINATED_GRAPHICS_THREADED) 1425 GC3Duint m_ compositorFBO;1425 GC3Duint m_intermediateTexture; 1426 1426 #endif 1427 1427 -
trunk/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp
r200940 r203498 86 86 , m_fbo(0) 87 87 #if USE(COORDINATED_GRAPHICS_THREADED) 88 , m_ compositorFBO(0)88 , m_intermediateTexture(0) 89 89 #endif 90 90 , m_depthStencilBuffer(0) … … 114 114 115 115 #if USE(COORDINATED_GRAPHICS_THREADED) 116 ::glGenFramebuffers(1, &m_compositorFBO);117 116 ::glGenTextures(1, &m_compositorTexture); 118 117 ::glBindTexture(GL_TEXTURE_2D, m_compositorTexture); … … 121 120 ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 122 121 ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 122 123 ::glGenTextures(1, &m_intermediateTexture); 124 ::glBindTexture(GL_TEXTURE_2D, m_intermediateTexture); 125 ::glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 126 ::glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 127 ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 128 ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 129 123 130 ::glBindTexture(GL_TEXTURE_2D, 0); 124 131 #endif … … 190 197 ::glDeleteFramebuffers(1, &m_fbo); 191 198 #if USE(COORDINATED_GRAPHICS_THREADED) 192 ::glDelete Framebuffers(1, &m_compositorFBO);199 ::glDeleteTextures(1, &m_intermediateTexture); 193 200 #endif 194 201 } -
trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
r194933 r203498 178 178 ::glBindTexture(GL_TEXTURE_2D, 0); 179 179 #if USE(COORDINATED_GRAPHICS_THREADED) 180 ::glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_compositorFBO); 181 ::glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, m_compositorTexture, 0); 182 attachDepthAndStencilBufferIfNeeded(internalDepthStencilFormat, width, height); 183 ::glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); 180 ::glBindTexture(GL_TEXTURE_2D, m_intermediateTexture); 181 ::glTexImage2D(GL_TEXTURE_2D, 0, m_internalColorFormat, width, height, 0, colorFormat, GL_UNSIGNED_BYTE, 0); 182 ::glBindTexture(GL_TEXTURE_2D, 0); 184 183 #endif 185 184 } -
trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
r202242 r203498 237 237 238 238 #if USE(COORDINATED_GRAPHICS_THREADED) 239 std::swap(m_fbo, m_compositorFBO);240 239 std::swap(m_texture, m_compositorTexture); 241 242 if (m_state.boundFBO != m_compositorFBO) 240 std::swap(m_texture, m_intermediateTexture); 241 ::glBindFramebuffer(GL_FRAMEBUFFER, m_fbo); 242 ::glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, m_texture, 0); 243 glFlush(); 244 245 if (m_state.boundFBO != m_fbo) 243 246 ::glBindFramebufferEXT(GraphicsContext3D::FRAMEBUFFER, m_state.boundFBO); 244 247 else -
trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
r183432 r203498 111 111 } 112 112 113 #if USE(COORDINATED_GRAPHICS_THREADED) 114 ::glBindTexture(GL_TEXTURE_2D, m_intermediateTexture); 115 ::glTexImage2D(GL_TEXTURE_2D, 0, m_internalColorFormat, width, height, 0, colorFormat, GL_UNSIGNED_BYTE, 0); 116 ::glBindTexture(GL_TEXTURE_2D, 0); 117 #endif 118 113 119 Extensions3DOpenGLES* extensions = static_cast<Extensions3DOpenGLES*>(getExtensions()); 114 120 if (extensions->isImagination() && m_attrs.antialias) {
Note:
See TracChangeset
for help on using the changeset viewer.