Changeset 95978 in webkit


Ignore:
Timestamp:
Sep 26, 2011 12:51:15 PM (13 years ago)
Author:
jer.noble@apple.com
Message:

White flash when entering full-screen using element.webkitRequestFullScreen()
https://bugs.webkit.org/show_bug.cgi?id=68481

Reviewed by Simon Fraser.

Source/WebCore:

No new tests; covered by existing full screen tests.

During an animation, renderers may try to paint into the FullScreenRenderer's
GraphicsLayer, and an optimization we previously added for the FullScreenRenderer's
background will cause these paints to fail. Remove this optimization in
containsPaintedContent, and taking non-composited elements into full screen will
animate correctly.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::containsPaintedContent):

Source/WebKit2:

Do not re-enable screen updates after exiting compositing mode until a repaint has completed.

  • UIProcess/mac/WKFullScreenWindowController.mm:

(-[WKFullScreenWindowController exitAcceleratedCompositingMode]):
(continueExitCompositingModeAfterRepaintCallback):
(-[WKFullScreenWindowController _continueExitCompositingModeAfterRepaint]):

Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r95974 r95978  
     12011-09-26  Jer Noble  <jer.noble@apple.com>
     2
     3        White flash when entering full-screen using element.webkitRequestFullScreen()
     4        https://bugs.webkit.org/show_bug.cgi?id=68481
     5
     6        Reviewed by Simon Fraser.
     7
     8        No new tests; covered by existing full screen tests.
     9
     10        During an animation, renderers may try to paint into the FullScreenRenderer's
     11        GraphicsLayer, and an optimization we previously added for the FullScreenRenderer's
     12        background will cause these paints to fail. Remove this optimization in
     13        containsPaintedContent, and taking non-composited elements into full screen will
     14        animate correctly.
     15
     16        * rendering/RenderLayerBacking.cpp:
     17        (WebCore::RenderLayerBacking::containsPaintedContent):
     18
    1192011-09-26  Mihai Parparita  <mihaip@chromium.org>
    220
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r95901 r95978  
    911911        return hasBoxDecorationsOrBackground(renderer());
    912912#endif
    913 #if ENABLE(FULLSCREEN_API)
    914     if (renderer()->isRenderFullScreen())
    915         return false;
    916 #endif
    917913
    918914    return true;
  • trunk/Source/WebKit2/ChangeLog

    r95968 r95978  
     12011-09-26  Jer Noble  <jer.noble@apple.com>
     2
     3        White flash when entering full-screen using element.webkitRequestFullScreen()
     4        https://bugs.webkit.org/show_bug.cgi?id=68481
     5
     6        Reviewed by Simon Fraser.
     7
     8        Do not re-enable screen updates after exiting compositing mode until a repaint has completed.
     9
     10        * UIProcess/mac/WKFullScreenWindowController.mm:
     11        (-[WKFullScreenWindowController exitAcceleratedCompositingMode]):
     12        (continueExitCompositingModeAfterRepaintCallback):
     13        (-[WKFullScreenWindowController _continueExitCompositingModeAfterRepaint]):
     14
    1152011-09-23  Simon Fraser  <simon.fraser@apple.com>
    216
  • trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm

    r95901 r95978  
    7676@end
    7777
     78static void continueExitCompositingModeAfterRepaintCallback(WKErrorRef error, void* context);
     79
    7880@interface WKFullScreenWindowController(Private)
    7981- (void)_requestExitFullScreenWithAnimation:(BOOL)animation;
     
    8587- (WebPageProxy*)_page;
    8688- (WebFullScreenManagerProxy*)_manager;
     89- (void)_continueExitCompositingModeAfterRepaint;
    8790@end
    8891
     
    413416   
    414417    _layerHostingView = 0;
     418    [self _page]->forceRepaint(VoidCallback::create(self, continueExitCompositingModeAfterRepaintCallback));
     419}
     420
     421static void continueExitCompositingModeAfterRepaintCallback(WKErrorRef error, void* context)
     422{
     423    [(WKFullScreenWindowController*)context _continueExitCompositingModeAfterRepaint];
     424}
     425
     426- (void)_continueExitCompositingModeAfterRepaint
     427{
    415428    NSEnableScreenUpdates();
    416429
Note: See TracChangeset for help on using the changeset viewer.