 Chromium Code Reviews
 Chromium Code Reviews Issue 1246363002:
  Avoid updating compositor animations in hitTest path  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master
    
  
    Issue 1246363002:
  Avoid updating compositor animations in hitTest path  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master| OLD | NEW | 
|---|---|
| 1 /* | 1 /* | 
| 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 
| 3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> | 
| 4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> | 
| 5 * 2000 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> | 
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 
| 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 
| 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 
| 9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. | 
| 10 * | 10 * | 
| (...skipping 2441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2452 { | 2452 { | 
| 2453 frame().localFrameRoot()->view()->updateAllLifecyclePhasesInternal(); | 2453 frame().localFrameRoot()->view()->updateAllLifecyclePhasesInternal(); | 
| 2454 } | 2454 } | 
| 2455 | 2455 | 
| 2456 // TODO(chrishtr): add a scrolling update lifecycle phase, after compositing and before invalidation. | 2456 // TODO(chrishtr): add a scrolling update lifecycle phase, after compositing and before invalidation. | 
| 2457 void FrameView::updateLifecycleToCompositingCleanPlusScrolling() | 2457 void FrameView::updateLifecycleToCompositingCleanPlusScrolling() | 
| 2458 { | 2458 { | 
| 2459 frame().localFrameRoot()->view()->updateStyleAndLayoutIfNeededRecursive(); | 2459 frame().localFrameRoot()->view()->updateStyleAndLayoutIfNeededRecursive(); | 
| 2460 LayoutView* view = layoutView(); | 2460 LayoutView* view = layoutView(); | 
| 2461 if (view) | 2461 if (view) | 
| 2462 view->compositor()->updateIfNeededRecursive(); | 2462 view->compositor()->updateLifecycleToCompositingClean(); | 
| 
qiankun
2015/08/14 09:40:46
I agree with esprehn that this fix has issues espr
 | |
| 2463 scrollContentsIfNeededRecursive(); | 2463 scrollContentsIfNeededRecursive(); | 
| 2464 | 2464 | 
| 2465 ASSERT(lifecycle().state() >= DocumentLifecycle::CompositingClean); | 2465 ASSERT(lifecycle().state() >= DocumentLifecycle::CompositingClean); | 
| 2466 } | 2466 } | 
| 2467 | 2467 | 
| 2468 void FrameView::updateAllLifecyclePhasesInternal() | 2468 void FrameView::updateAllLifecyclePhasesInternal() | 
| 2469 { | 2469 { | 
| 2470 // This must be called from the root frame, since it recurses down, not up. Otherwise the lifecycles of the frames might be out of sync. | 2470 // This must be called from the root frame, since it recurses down, not up. Otherwise the lifecycles of the frames might be out of sync. | 
| 2471 ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalF rame())); | 2471 ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalF rame())); | 
| 2472 | 2472 | 
| (...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3944 | 3944 | 
| 3945 if (!graphicsLayer) | 3945 if (!graphicsLayer) | 
| 3946 return; | 3946 return; | 
| 3947 | 3947 | 
| 3948 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL ayoutObject(), paintInvalidationContainer, viewRect); | 3948 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL ayoutObject(), paintInvalidationContainer, viewRect); | 
| 3949 | 3949 | 
| 3950 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect))); | 3950 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect))); | 
| 3951 } | 3951 } | 
| 3952 | 3952 | 
| 3953 } // namespace blink | 3953 } // namespace blink | 
| OLD | NEW |