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

Side by Side Diff: third_party/WebKit/Source/web/PageOverlay.cpp

Issue 2015433004: Add main thread scrolling reasons to GraphicsLayer::layerTreeAsJSON. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: main thread scrlling reasons added to GraphicsLayerDebugInfo. Created 4 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 10 *
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 if (!m_layer) { 82 if (!m_layer) {
83 m_layer = GraphicsLayer::create(this); 83 m_layer = GraphicsLayer::create(this);
84 m_layer->setDrawsContent(true); 84 m_layer->setDrawsContent(true);
85 85
86 if (WebDevToolsAgentImpl* devTools = m_viewImpl->mainFrameDevToolsAgentI mpl()) 86 if (WebDevToolsAgentImpl* devTools = m_viewImpl->mainFrameDevToolsAgentI mpl())
87 devTools->willAddPageOverlay(m_layer.get()); 87 devTools->willAddPageOverlay(m_layer.get());
88 88
89 // This is required for contents of overlay to stay in sync with the pag e while scrolling. 89 // This is required for contents of overlay to stay in sync with the pag e while scrolling.
90 WebLayer* platformLayer = m_layer->platformLayer(); 90 WebLayer* platformLayer = m_layer->platformLayer();
91 platformLayer->addMainThreadScrollingReasons(MainThreadScrollingReason:: kPageOverlay); 91 platformLayer->addMainThreadScrollingReasons(MainThreadScrollingReason:: kPageOverlay);
92 m_layer->debugInfo().setMainThreadScrollingReasons(platformLayer->mainTh readScrollingReasons());
92 page->frameHost().visualViewport().containerLayer()->addChild(m_layer.ge t()); 93 page->frameHost().visualViewport().containerLayer()->addChild(m_layer.ge t());
93 } 94 }
94 95
95 FloatSize size(page->frameHost().visualViewport().size()); 96 FloatSize size(page->frameHost().visualViewport().size());
96 if (size != m_layer->size()) 97 if (size != m_layer->size())
97 m_layer->setSize(size); 98 m_layer->setSize(size);
98 99
99 m_layer->setNeedsDisplay(); 100 m_layer->setNeedsDisplay();
100 } 101 }
101 102
(...skipping 13 matching lines...) Expand all
115 DCHECK(m_layer); 116 DCHECK(m_layer);
116 m_delegate->paintPageOverlay(*this, gc, interestRect.size()); 117 m_delegate->paintPageOverlay(*this, gc, interestRect.size());
117 } 118 }
118 119
119 String PageOverlay::debugName(const GraphicsLayer*) const 120 String PageOverlay::debugName(const GraphicsLayer*) const
120 { 121 {
121 return "WebViewImpl Page Overlay Content Layer"; 122 return "WebViewImpl Page Overlay Content Layer";
122 } 123 }
123 124
124 } // namespace blink 125 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698