| 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) |
| 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 PageWidgetDelegate::paint(m_page.get(), pageOverlays(), canvas, rect, isTran
sparent() ? PageWidgetDelegate::Translucent : PageWidgetDelegate::Opaque); |
| 1822 |
| 1823 view->setPaintBehavior(oldPaintBehavior); |
| 1824 } |
| 1825 #endif |
| 1826 |
| 1809 bool WebViewImpl::compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback
* callback) | 1827 bool WebViewImpl::compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback
* callback) |
| 1810 { | 1828 { |
| 1811 if (!isAcceleratedCompositingActive()) | 1829 if (!isAcceleratedCompositingActive()) |
| 1812 return false; | 1830 return false; |
| 1813 m_layerTreeView->compositeAndReadbackAsync(callback); | 1831 m_layerTreeView->compositeAndReadbackAsync(callback); |
| 1814 return true; | 1832 return true; |
| 1815 } | 1833 } |
| 1816 | 1834 |
| 1817 bool WebViewImpl::isTrackingRepaints() const | 1835 bool WebViewImpl::isTrackingRepaints() const |
| 1818 { | 1836 { |
| (...skipping 2267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4086 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4104 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4087 | 4105 |
| 4088 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4106 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4089 return false; | 4107 return false; |
| 4090 | 4108 |
| 4091 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4109 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4092 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4110 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4093 } | 4111 } |
| 4094 | 4112 |
| 4095 } // namespace blink | 4113 } // namespace blink |
| OLD | NEW |