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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 1364063007: Throttle rendering pipeline for invisible frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IntersectionObserverification Created 5 years, 2 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 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 #endif 834 #endif
835 835
836 String LocalFrame::localLayerTreeAsText(unsigned flags) const 836 String LocalFrame::localLayerTreeAsText(unsigned flags) const
837 { 837 {
838 if (!contentLayoutObject()) 838 if (!contentLayoutObject())
839 return String(); 839 return String();
840 840
841 return contentLayoutObject()->compositor()->layerTreeAsText(static_cast<Laye rTreeFlags>(flags)); 841 return contentLayoutObject()->compositor()->layerTreeAsText(static_cast<Laye rTreeFlags>(flags));
842 } 842 }
843 843
844 bool LocalFrame::shouldThrottleRenderingPipeline() const
845 {
846 return view() && view()->shouldThrottleRenderingPipeline();
847 }
848
849 bool LocalFrame::shouldThrottleStyleLayoutAndCompositingUpdates() const
850 {
851 return view() && view()->shouldThrottleStyleLayoutAndCompositingUpdates();
852 }
853
844 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO wner* owner) 854 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO wner* owner)
845 : Frame(client, host, owner) 855 : Frame(client, host, owner)
846 , m_loader(this) 856 , m_loader(this)
847 , m_navigationScheduler(NavigationScheduler::create(this)) 857 , m_navigationScheduler(NavigationScheduler::create(this))
848 , m_script(ScriptController::create(this)) 858 , m_script(ScriptController::create(this))
849 , m_editor(Editor::create(*this)) 859 , m_editor(Editor::create(*this))
850 , m_spellChecker(SpellChecker::create(*this)) 860 , m_spellChecker(SpellChecker::create(*this))
851 , m_selection(FrameSelection::create(this)) 861 , m_selection(FrameSelection::create(this))
852 , m_eventHandler(adoptPtrWillBeNoop(new EventHandler(this))) 862 , m_eventHandler(adoptPtrWillBeNoop(new EventHandler(this)))
853 , m_console(FrameConsole::create(*this)) 863 , m_console(FrameConsole::create(*this))
(...skipping 23 matching lines...) Expand all
877 if (!context) 887 if (!context)
878 return; 888 return;
879 889
880 WebSecurityOrigin securityOrigin(context->securityOrigin()); 890 WebSecurityOrigin securityOrigin(context->securityOrigin());
881 frameScheduler()->setFrameOrigin(&securityOrigin); 891 frameScheduler()->setFrameOrigin(&securityOrigin);
882 } 892 }
883 893
884 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame); 894 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame);
885 895
886 } // namespace blink 896 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698