Changeset 139030 in webkit
- Timestamp:
- Jan 7, 2013 8:58:03 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r139029 r139030 1 2013-01-07 Viatcheslav Ostapenko <sl.ostapenko@samsung.com> 2 3 [EFL][WebGL] Crash of WebKitTestRunner when running webgl layout tests 4 https://bugs.webkit.org/show_bug.cgi?id=105936 5 6 Reviewed by Laszlo Gombos. 7 8 If canvas window becomes invalid don't create pixmap from it and don't 9 use it for painting. 10 11 Improves stability of existing webgl layout tests. 12 13 * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp: 14 (WebCore::GraphicsSurfacePrivate::createPixmap): 15 (WebCore::GraphicsSurfacePrivate::size): 16 (WebCore::GraphicsSurface::platformGetTextureID): 17 (WebCore::GraphicsSurface::platformPaintToTextureMapper): 18 1 19 2013-01-07 Hajime Morrita <morrita@google.com> 2 20 -
trunk/Source/WebCore/platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp
r138614 r139030 238 238 { 239 239 XWindowAttributes attr; 240 XGetWindowAttributes(m_display, winId, &attr); 240 if (!XGetWindowAttributes(m_display, winId, &attr)) 241 return; 242 m_size = IntSize(attr.width, attr.height); 241 243 242 244 XRenderPictFormat* format = XRenderFindVisualFormat(m_display, attr.visual); … … 342 344 if (m_size.isEmpty()) { 343 345 XWindowAttributes attr; 344 XGetWindowAttributes(m_display, m_surface, &attr);345 const_cast<GraphicsSurfacePrivate*>(this)->m_size = IntSize(attr.width, attr.height);346 if (XGetWindowAttributes(m_display, m_surface, &attr)) 347 const_cast<GraphicsSurfacePrivate*>(this)->m_size = IntSize(attr.width, attr.height); 346 348 } 347 349 return m_size; … … 411 413 { 412 414 if (!m_texture) { 415 GLXPixmap pixmap = m_private->glxPixmap(); 416 if (!pixmap) 417 return 0; 418 413 419 glGenTextures(1, &m_texture); 414 420 glBindTexture(GL_TEXTURE_2D, m_texture); … … 417 423 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 418 424 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 419 pGlXBindTexImageEXT(m_private->display(), m_private->glxPixmap(), GLX_FRONT_EXT, 0);425 pGlXBindTexImageEXT(m_private->display(), pixmap, GLX_FRONT_EXT, 0); 420 426 } 421 427 … … 437 443 { 438 444 TextureMapperGL* texMapGL = static_cast<TextureMapperGL*>(textureMapper); 445 IntSize size = m_private->size(); 446 if (size.isEmpty()) 447 return; 448 uint32_t texture = platformGetTextureID(); 449 if (!texture) 450 return; 439 451 TransformationMatrix adjustedTransform = transform; 440 adjustedTransform.multiply(TransformationMatrix::rectToRect(FloatRect(FloatPoint::zero(), m_private->size()), targetRect));452 adjustedTransform.multiply(TransformationMatrix::rectToRect(FloatRect(FloatPoint::zero(), size), targetRect)); 441 453 TextureMapperGL::Flags flags = m_private->textureIsYInverted() ? TextureMapperGL::ShouldFlipTexture : 0; 442 454 flags |= TextureMapperGL::ShouldBlend; 443 texMapGL->drawTexture( platformGetTextureID(), flags, m_private->size(), targetRect, adjustedTransform, opacity, mask);455 texMapGL->drawTexture(texture, flags, size, targetRect, adjustedTransform, opacity, mask); 444 456 } 445 457
Note: See TracChangeset
for help on using the changeset viewer.