Changeset 135881 in webkit
- Timestamp:
- Nov 27, 2012, 10:52:30 AM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/Platform/ChangeLog
r135860 r135881 1 2012-11-27 Eberhard Graether <egraether@google.com> 2 3 Plumbing showPaintRects out of InspectorPageAgent to use a different drawing implementation if available. 4 https://bugs.webkit.org/show_bug.cgi?id=102452 5 6 Reviewed by Pavel Feldman. 7 8 This change makes the showPaintRects setting in the Web Inspector's settings notify InspectorClient 9 when changed. And the default paint rects drawing is not used if an alternative is available. 10 This allows Chromium to draw the paint rects in the compositor's HUDLayer. 11 12 * chromium/public/WebLayerTreeView.h: 13 (WebLayerTreeView): 14 (WebKit::WebLayerTreeView::setShowPaintRects): 15 1 16 2012-11-27 Keishi Hattori <keishi@webkit.org> 2 17 -
trunk/Source/Platform/chromium/public/WebLayerTreeView.h
r134669 r135881 183 183 virtual void setShowFPSCounter(bool) { } 184 184 185 // Toggles the paint rects in the HUD layer 186 virtual void setShowPaintRects(bool) { } 187 185 188 // Provides a font atlas to use for debug visualizations. The atlas must be a bitmap containing glyph data, a table of 186 189 // ASCII character values to a subrectangle of the atlas representing the corresponding glyph, and the glyph height. -
trunk/Source/WebCore/ChangeLog
r135876 r135881 1 2012-11-27 Eberhard Graether <egraether@google.com> 2 3 Plumbing showPaintRects out of InspectorPageAgent to use a different drawing implementation if available. 4 https://bugs.webkit.org/show_bug.cgi?id=102452 5 6 Reviewed by Pavel Feldman. 7 8 This change makes the showPaintRects setting in the Web Inspector's settings notify InspectorClient 9 when changed. And the default paint rects drawing is not used if an alternative is available. 10 This allows Chromium to draw the paint rects in the compositor's HUDLayer. 11 12 No new tests. 13 14 * inspector/InspectorClient.h: 15 (WebCore::InspectorClient::overridesShowPaintRects): 16 (WebCore::InspectorClient::setShowPaintRects): 17 (InspectorClient): 18 * inspector/InspectorPageAgent.cpp: 19 (PageAgentState): 20 (WebCore::InspectorPageAgent::restore): 21 (WebCore::InspectorPageAgent::disable): 22 (WebCore::InspectorPageAgent::setShowPaintRects): 23 (WebCore::InspectorPageAgent::didPaint): 24 1 25 2012-11-27 Allan Sandfeld Jensen <allan.jensen@digia.com> 2 26 -
trunk/Source/WebCore/inspector/InspectorClient.h
r134542 r135881 73 73 } 74 74 75 virtual bool overridesShowPaintRects() { return false; } 76 virtual void setShowPaintRects(bool) { } 77 75 78 virtual bool canShowFPSCounter() { return false; } 76 79 virtual void setShowFPSCounter(bool) { } -
trunk/Source/WebCore/inspector/InspectorPageAgent.cpp
r135571 r135881 94 94 static const char pageAgentFitWindow[] = "pageAgentFitWindow"; 95 95 static const char pageAgentShowFPSCounter[] = "pageAgentShowFPSCounter"; 96 static const char showPaintRects[] = "showPaintRects";96 static const char pageAgentShowPaintRects[] = "pageAgentShowPaintRects"; 97 97 #if ENABLE(TOUCH_EVENTS) 98 98 static const char touchEventEmulationEnabled[] = "touchEventEmulationEnabled"; … … 360 360 bool scriptExecutionDisabled = m_state->getBoolean(PageAgentState::pageAgentScriptExecutionDisabled); 361 361 setScriptExecutionDisabled(0, scriptExecutionDisabled); 362 bool showPaintRects = m_state->getBoolean(PageAgentState::pageAgentShowPaintRects); 363 setShowPaintRects(0, showPaintRects); 362 364 bool showFPSCounter = m_state->getBoolean(PageAgentState::pageAgentShowFPSCounter); 363 365 setShowFPSCounter(0, showFPSCounter); … … 394 396 395 397 setScriptExecutionDisabled(0, false); 398 setShowPaintRects(0, false); 396 399 setShowFPSCounter(0, false); 397 400 … … 726 729 void InspectorPageAgent::setShowPaintRects(ErrorString*, bool show) 727 730 { 728 m_state->setBoolean(PageAgentState::showPaintRects, show); 729 if (!show) 730 m_page->mainFrame()->view()->invalidate(); 731 m_state->setBoolean(PageAgentState::pageAgentShowPaintRects, show); 732 m_client->setShowPaintRects(show); 733 734 if (!show && mainFrame() && mainFrame()->view()) 735 mainFrame()->view()->invalidate(); 731 736 } 732 737 … … 910 915 void InspectorPageAgent::didPaint(GraphicsContext* context, const LayoutRect& rect) 911 916 { 912 if (!m_enabled || !m_state->getBoolean(PageAgentState::showPaintRects))917 if (!m_enabled || m_client->overridesShowPaintRects() || !m_state->getBoolean(PageAgentState::pageAgentShowPaintRects)) 913 918 return; 914 919 -
trunk/Source/WebKit/chromium/ChangeLog
r135877 r135881 1 2012-11-27 Eberhard Graether <egraether@google.com> 2 3 Plumbing showPaintRects out of InspectorPageAgent to use a different drawing implementation if available. 4 https://bugs.webkit.org/show_bug.cgi?id=102452 5 6 Reviewed by Pavel Feldman. 7 8 This change makes the showPaintRects setting in the Web Inspector's settings notify InspectorClient 9 when changed. And the default paint rects drawing is not used if an alternative is available. 10 This allows Chromium to draw the paint rects in the compositor's HUDLayer. 11 12 * public/WebView.h: 13 (WebView): 14 * src/InspectorClientImpl.cpp: 15 (WebKit::InspectorClientImpl::overridesShowPaintRects): 16 (WebKit): 17 (WebKit::InspectorClientImpl::setShowPaintRects): 18 * src/InspectorClientImpl.h: 19 (InspectorClientImpl): 20 * src/WebViewImpl.cpp: 21 (WebKit::WebViewImpl::setShowPaintRects): 22 (WebKit): 23 * src/WebViewImpl.h: 24 (WebViewImpl): 25 1 26 2012-11-27 Tony Chang <tony@chromium.org> 2 27 -
trunk/Source/WebKit/chromium/public/WebView.h
r134542 r135881 472 472 virtual bool isSelectionEditable() const = 0; 473 473 474 virtual void setShowPaintRects(bool) = 0; 474 475 virtual void setShowFPSCounter(bool) = 0; 475 476 -
trunk/Source/WebKit/chromium/src/InspectorClientImpl.cpp
r134542 r135881 164 164 } 165 165 166 bool InspectorClientImpl::overridesShowPaintRects() 167 { 168 return m_inspectedWebView->isAcceleratedCompositingActive(); 169 } 170 171 void InspectorClientImpl::setShowPaintRects(bool show) 172 { 173 m_inspectedWebView->setShowPaintRects(show); 174 } 175 166 176 bool InspectorClientImpl::canShowFPSCounter() 167 177 { -
trunk/Source/WebKit/chromium/src/InspectorClientImpl.h
r134542 r135881 78 78 virtual void autoZoomPageToFitWidth(); 79 79 80 virtual bool overridesShowPaintRects(); 81 virtual void setShowPaintRects(bool); 82 80 83 virtual bool canShowFPSCounter(); 81 84 virtual void setShowFPSCounter(bool); -
trunk/Source/WebKit/chromium/src/WebViewImpl.cpp
r135801 r135881 849 849 } 850 850 851 void WebViewImpl::setShowPaintRects(bool show) 852 { 853 if (isAcceleratedCompositingActive()) { 854 TRACE_EVENT0("webkit", "WebViewImpl::setShowPaintRects"); 855 m_layerTreeView->setShowPaintRects(show); 856 } 857 settingsImpl()->setShowPaintRects(show); 858 } 859 851 860 bool WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event) 852 861 { -
trunk/Source/WebKit/chromium/src/WebViewImpl.h
r135801 r135881 310 310 virtual void transferActiveWheelFlingAnimation(const WebActiveWheelFlingParameters&); 311 311 virtual WebViewBenchmarkSupport* benchmarkSupport(); 312 virtual void setShowPaintRects(bool); 312 313 virtual void setShowFPSCounter(bool); 313 314
Note:
See TracChangeset
for help on using the changeset viewer.