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

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

Issue 2051333005: Let FrameView track object paint invalidations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@TrackInvalidation
Patch Set: NeedsRebaseline Created 4 years, 6 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #include "core/page/ChromeClient.h" 62 #include "core/page/ChromeClient.h"
63 #include "core/page/FocusController.h" 63 #include "core/page/FocusController.h"
64 #include "core/page/Page.h" 64 #include "core/page/Page.h"
65 #include "core/page/scrolling/ScrollingCoordinator.h" 65 #include "core/page/scrolling/ScrollingCoordinator.h"
66 #include "core/paint/ObjectPainter.h" 66 #include "core/paint/ObjectPainter.h"
67 #include "core/paint/PaintInfo.h" 67 #include "core/paint/PaintInfo.h"
68 #include "core/paint/PaintLayer.h" 68 #include "core/paint/PaintLayer.h"
69 #include "core/paint/TransformRecorder.h" 69 #include "core/paint/TransformRecorder.h"
70 #include "core/svg/SVGDocumentExtensions.h" 70 #include "core/svg/SVGDocumentExtensions.h"
71 #include "platform/DragImage.h" 71 #include "platform/DragImage.h"
72 #include "platform/JSONValues.h"
72 #include "platform/PluginScriptForbiddenScope.h" 73 #include "platform/PluginScriptForbiddenScope.h"
73 #include "platform/RuntimeEnabledFeatures.h" 74 #include "platform/RuntimeEnabledFeatures.h"
74 #include "platform/ScriptForbiddenScope.h" 75 #include "platform/ScriptForbiddenScope.h"
75 #include "platform/graphics/GraphicsContext.h" 76 #include "platform/graphics/GraphicsContext.h"
76 #include "platform/graphics/StaticBitmapImage.h" 77 #include "platform/graphics/StaticBitmapImage.h"
77 #include "platform/graphics/paint/ClipRecorder.h" 78 #include "platform/graphics/paint/ClipRecorder.h"
78 #include "platform/graphics/paint/PaintController.h" 79 #include "platform/graphics/paint/PaintController.h"
79 #include "platform/graphics/paint/SkPictureBuilder.h" 80 #include "platform/graphics/paint/SkPictureBuilder.h"
80 #include "platform/graphics/paint/TransformDisplayItem.h" 81 #include "platform/graphics/paint/TransformDisplayItem.h"
81 #include "platform/plugins/PluginData.h" 82 #include "platform/plugins/PluginData.h"
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 void LocalFrame::removeSpellingMarkersUnderWords(const Vector<String>& words) 732 void LocalFrame::removeSpellingMarkersUnderWords(const Vector<String>& words)
732 { 733 {
733 spellChecker().removeSpellingMarkersUnderWords(words); 734 spellChecker().removeSpellingMarkersUnderWords(words);
734 } 735 }
735 736
736 String LocalFrame::layerTreeAsText(unsigned flags) const 737 String LocalFrame::layerTreeAsText(unsigned flags) const
737 { 738 {
738 if (contentLayoutItem().isNull()) 739 if (contentLayoutItem().isNull())
739 return String(); 740 return String();
740 741
741 return contentLayoutItem().compositor()->layerTreeAsText(static_cast<LayerTr eeFlags>(flags)); 742 RefPtr<JSONObject> layerTree = contentLayoutItem().compositor()->layerTreeAs JSON(static_cast<LayerTreeFlags>(flags));
743
744 if (flags & LayerTreeIncludesPaintInvalidations) {
745 RefPtr<JSONArray> objectPaintInvalidations = m_view->trackedObjectPaintI nvalidationsAsJSON();
746 if (objectPaintInvalidations) {
747 if (!layerTree)
748 layerTree = JSONObject::create();
749 layerTree->setArray("objectPaintInvalidations", objectPaintInvalidat ions);
750 }
751 }
752
753 return layerTree ? layerTree->toPrettyJSONString() : String();
742 } 754 }
743 755
744 bool LocalFrame::shouldThrottleRendering() const 756 bool LocalFrame::shouldThrottleRendering() const
745 { 757 {
746 return view() && view()->shouldThrottleRendering(); 758 return view() && view()->shouldThrottleRendering();
747 } 759 }
748 760
749 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO wner* owner, ServiceRegistry* serviceRegistry) 761 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO wner* owner, ServiceRegistry* serviceRegistry)
750 : Frame(client, host, owner) 762 : Frame(client, host, owner)
751 , m_loader(this) 763 , m_loader(this)
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 m_frame->client()->frameBlameContext()->Enter(); 829 m_frame->client()->frameBlameContext()->Enter();
818 } 830 }
819 831
820 ScopedFrameBlamer::~ScopedFrameBlamer() 832 ScopedFrameBlamer::~ScopedFrameBlamer()
821 { 833 {
822 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 834 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
823 m_frame->client()->frameBlameContext()->Leave(); 835 m_frame->client()->frameBlameContext()->Leave();
824 } 836 }
825 837
826 } // namespace blink 838 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.h ('k') | third_party/WebKit/Source/core/layout/LayoutBlockFlow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698