Changeset 199536 in webkit
- Timestamp:
- Apr 14, 2016 4:09:37 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r199529 r199536 1 2016-04-14 Antoine Quint <graouts@apple.com> 2 3 WebGL based canvases composite incorrectly after changing size 4 https://bugs.webkit.org/show_bug.cgi?id=152556 5 <rdar://problem/24012678> 6 7 Reviewed by Dean Jackson. 8 9 Adding a new test that sets the size of the backing store to a different 10 size than the layout size after the layout size of the <canvas> element 11 has been applied to ensure that the implementation correctly retains the 12 layout size as the canvas backing store is resized. 13 14 * webgl/webgl-backing-store-size-update-expected.html: Added. 15 * webgl/webgl-backing-store-size-update.html: Added. 16 1 17 2016-04-13 Joseph Pecoraro <pecoraro@apple.com> 2 18 -
trunk/Source/WebCore/ChangeLog
r199531 r199536 1 2016-04-14 Antoine Quint <graouts@apple.com> 2 3 WebGL based canvases composite incorrectly after changing size 4 https://bugs.webkit.org/show_bug.cgi?id=152556 5 <rdar://problem/24012678> 6 7 Reviewed by Dean Jackson. 8 9 On iOS, we use the CAEAGLLayer's bounds to set the size of the backing store. 10 However, that layer's bounds is also used to size the layer during layout. If 11 the canvas backing store is resized after layout has been performed, the call 12 to setBounds loses the layout value and the <canvas> element is incorrectly 13 sized on screen. 14 15 To address this, when updating the backing store, we keep track of the previous 16 layer bounds so we can reset it after we sized the backing store. 17 18 Test: webgl/webgl-backing-store-size-update.html 19 20 * platform/graphics/GraphicsContext3D.h: 21 * platform/graphics/mac/GraphicsContext3DMac.mm: 22 (WebCore::GraphicsContext3D::setRenderbufferStorageFromDrawable): 23 1 24 2016-04-13 Carlos Garcia Campos <cgarcia@igalia.com> 2 25 -
trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h
r199314 r199536 1292 1292 1293 1293 #if PLATFORM(IOS) 1294 boolsetRenderbufferStorageFromDrawable(GC3Dsizei width, GC3Dsizei height);1294 void setRenderbufferStorageFromDrawable(GC3Dsizei width, GC3Dsizei height); 1295 1295 #endif 1296 1296 -
trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm
r199314 r199536 341 341 342 342 #if PLATFORM(IOS) 343 bool GraphicsContext3D::setRenderbufferStorageFromDrawable(GC3Dsizei width, GC3Dsizei height) 344 { 343 void GraphicsContext3D::setRenderbufferStorageFromDrawable(GC3Dsizei width, GC3Dsizei height) 344 { 345 // We need to make a call to setBounds below to update the backing store size but we also 346 // do not want to clobber the bounds set during layout. 347 CGRect previousBounds = [m_webGLLayer.get() bounds]; 348 345 349 [m_webGLLayer setBounds:CGRectMake(0, 0, width, height)]; 346 350 [m_webGLLayer setOpaque:(m_internalColorFormat != GL_RGBA8)]; 347 351 348 return [m_contextObj renderbufferStorage:GL_RENDERBUFFER fromDrawable:static_cast<id<EAGLDrawable>>(m_webGLLayer.get())]; 352 [m_contextObj renderbufferStorage:GL_RENDERBUFFER fromDrawable:static_cast<id<EAGLDrawable>>(m_webGLLayer.get())]; 353 354 [m_webGLLayer setBounds:previousBounds]; 349 355 } 350 356 #endif
Note: See TracChangeset
for help on using the changeset viewer.