Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: Source/core/frame/FrameView.cpp

Issue 1246363002: Avoid updating compositor animations in hitTest path (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix comments#7 Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 11 matching lines...) Expand all
22 * along with this library; see the file COPYING.LIB. If not, write to 22 * along with this library; see the file COPYING.LIB. If not, write to
23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301, USA. 24 * Boston, MA 02110-1301, USA.
25 */ 25 */
26 26
27 #include "config.h" 27 #include "config.h"
28 #include "core/frame/FrameView.h" 28 #include "core/frame/FrameView.h"
29 29
30 #include "core/HTMLNames.h" 30 #include "core/HTMLNames.h"
31 #include "core/MediaTypeNames.h" 31 #include "core/MediaTypeNames.h"
32 #include "core/animation/DocumentAnimations.h"
32 #include "core/css/FontFaceSet.h" 33 #include "core/css/FontFaceSet.h"
33 #include "core/css/resolver/StyleResolver.h" 34 #include "core/css/resolver/StyleResolver.h"
34 #include "core/dom/AXObjectCache.h" 35 #include "core/dom/AXObjectCache.h"
35 #include "core/dom/DocumentMarkerController.h" 36 #include "core/dom/DocumentMarkerController.h"
36 #include "core/dom/Fullscreen.h" 37 #include "core/dom/Fullscreen.h"
37 #include "core/editing/FrameSelection.h" 38 #include "core/editing/FrameSelection.h"
38 #include "core/editing/RenderedPosition.h" 39 #include "core/editing/RenderedPosition.h"
39 #include "core/fetch/ResourceFetcher.h" 40 #include "core/fetch/ResourceFetcher.h"
40 #include "core/fetch/ResourceLoadPriorityOptimizer.h" 41 #include "core/fetch/ResourceLoadPriorityOptimizer.h"
41 #include "core/frame/FrameHost.h" 42 #include "core/frame/FrameHost.h"
(...skipping 2449 matching lines...) Expand 10 before | Expand all | Expand 10 after
2491 } 2492 }
2492 2493
2493 void FrameView::updatePostLifecycleData() 2494 void FrameView::updatePostLifecycleData()
2494 { 2495 {
2495 LayoutView* view = layoutView(); 2496 LayoutView* view = layoutView();
2496 ASSERT(view); 2497 ASSERT(view);
2497 2498
2498 if (view->compositor()->inCompositingMode() && m_frame->isLocalRoot()) 2499 if (view->compositor()->inCompositingMode() && m_frame->isLocalRoot())
2499 scrollingCoordinator()->updateAfterCompositingChangeIfNeeded(); 2500 scrollingCoordinator()->updateAfterCompositingChangeIfNeeded();
2500 2501
2502 DocumentAnimations::updateCompositorAnimations(view->document());
2503
2504 view->frameView()->scrollableArea()->updateCompositorScrollAnimations();
2505 if (const FrameView::ScrollableAreaSet* animatingScrollableAreas = view->fra meView()->animatingScrollableAreas()) {
2506 for (ScrollableArea* scrollableArea : *animatingScrollableAreas)
2507 scrollableArea->updateCompositorScrollAnimations();
2508 }
2509
2510
2501 updateCompositedSelectionIfNeeded(); 2511 updateCompositedSelectionIfNeeded();
2502 if (RuntimeEnabledFeatures::frameTimingSupportEnabled()) 2512 if (RuntimeEnabledFeatures::frameTimingSupportEnabled())
2503 updateFrameTimingRequestsIfNeeded(); 2513 updateFrameTimingRequestsIfNeeded();
2504 } 2514 }
2505 2515
2506 void FrameView::updateFrameTimingRequestsIfNeeded() 2516 void FrameView::updateFrameTimingRequestsIfNeeded()
2507 { 2517 {
2508 GraphicsLayerFrameTimingRequests graphicsLayerTimingRequests; 2518 GraphicsLayerFrameTimingRequests graphicsLayerTimingRequests;
2509 // TODO(mpb) use a 'dirty' bit to not call this every time. 2519 // TODO(mpb) use a 'dirty' bit to not call this every time.
2510 collectFrameTimingRequestsRecursive(graphicsLayerTimingRequests); 2520 collectFrameTimingRequestsRecursive(graphicsLayerTimingRequests);
(...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after
3944 3954
3945 if (!graphicsLayer) 3955 if (!graphicsLayer)
3946 return; 3956 return;
3947 3957
3948 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL ayoutObject(), paintInvalidationContainer, viewRect); 3958 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL ayoutObject(), paintInvalidationContainer, viewRect);
3949 3959
3950 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect))); 3960 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect)));
3951 } 3961 }
3952 3962
3953 } // namespace blink 3963 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698