Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1799 blink::Platform::current()->histogramCustomCounts("Renderer4.SoftwarePai ntDurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30); | 1799 blink::Platform::current()->histogramCustomCounts("Renderer4.SoftwarePai ntDurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30); |
| 1800 blink::Platform::current()->histogramCustomCounts("Renderer4.SoftwarePai ntMegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30); | 1800 blink::Platform::current()->histogramCustomCounts("Renderer4.SoftwarePai ntMegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30); |
| 1801 | 1801 |
| 1802 if (isAcceleratedCompositingActive()) { | 1802 if (isAcceleratedCompositingActive()) { |
| 1803 ASSERT(option == ForceSoftwareRenderingAndIgnoreGPUResidentContent); | 1803 ASSERT(option == ForceSoftwareRenderingAndIgnoreGPUResidentContent); |
| 1804 view->setPaintBehavior(oldPaintBehavior); | 1804 view->setPaintBehavior(oldPaintBehavior); |
| 1805 } | 1805 } |
| 1806 } | 1806 } |
| 1807 } | 1807 } |
| 1808 | 1808 |
| 1809 #if OS(ANDROID) | |
| 1810 void WebViewImpl::paintCompositedDeprecated(WebCanvas* canvas, const WebRect& re ct, PaintOptions option) | |
|
enne (OOO)
2014/05/02 23:34:45
Does this even compile? Looks like your definition
danakj
2014/05/02 23:36:07
Oops, probly not, was going to let bots tell me :)
| |
| 1811 { | |
| 1812 // Note: This method exists on OS(ANDROID) and will hopefully be | |
| 1813 // removed once the link disambiguation feature renders using | |
| 1814 // the compositor. | |
| 1815 ASSERT(isAcceleratedCompositingActive()); | |
| 1816 | |
| 1817 FrameView* view = page()->mainFrame()->view(); | |
| 1818 PaintBehavior oldPaintBehavior = view->paintBehavior(); | |
| 1819 view->setPaintBehavior(oldPaintBehavior | PaintBehaviorFlattenCompositingLay ers); | |
| 1820 | |
| 1821 double paintStart = currentTime(); | |
|
enne (OOO)
2014/05/02 23:34:45
This duplicated timing code makes me a little sad,
danakj
2014/05/02 23:36:07
I was going to make this call paint() but I want p
| |
| 1822 PageWidgetDelegate::paint(m_page.get(), pageOverlays(), canvas, rect, isTran sparent() ? PageWidgetDelegate::Translucent : PageWidgetDelegate::Opaque); | |
| 1823 double paintEnd = currentTime(); | |
| 1824 double pixelsPerSec = (rect.width * rect.height) / (paintEnd - paintStart); | |
| 1825 blink::Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintDu rationMS", (paintEnd - paintStart) * 1000, 0, 120, 30); | |
| 1826 blink::Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintMe gapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30); | |
| 1827 | |
| 1828 view->setPaintBehavior(oldPaintBehavior); | |
| 1829 } | |
| 1830 #endif | |
| 1831 | |
| 1809 bool WebViewImpl::compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback * callback) | 1832 bool WebViewImpl::compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback * callback) |
| 1810 { | 1833 { |
| 1811 if (!isAcceleratedCompositingActive()) | 1834 if (!isAcceleratedCompositingActive()) |
| 1812 return false; | 1835 return false; |
| 1813 m_layerTreeView->compositeAndReadbackAsync(callback); | 1836 m_layerTreeView->compositeAndReadbackAsync(callback); |
| 1814 return true; | 1837 return true; |
| 1815 } | 1838 } |
| 1816 | 1839 |
| 1817 bool WebViewImpl::isTrackingRepaints() const | 1840 bool WebViewImpl::isTrackingRepaints() const |
| 1818 { | 1841 { |
| (...skipping 2267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4086 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); | 4109 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); |
| 4087 | 4110 |
| 4088 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4111 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4089 return false; | 4112 return false; |
| 4090 | 4113 |
| 4091 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4114 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4092 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); | 4115 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); |
| 4093 } | 4116 } |
| 4094 | 4117 |
| 4095 } // namespace blink | 4118 } // namespace blink |
| OLD | NEW |