| 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 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1817 FrameView* view = page()->mainFrame()->view(); | 1817 FrameView* view = page()->mainFrame()->view(); |
| 1818 PaintBehavior oldPaintBehavior = view->paintBehavior(); | 1818 PaintBehavior oldPaintBehavior = view->paintBehavior(); |
| 1819 view->setPaintBehavior(oldPaintBehavior | PaintBehaviorFlattenCompositingLay
ers); | 1819 view->setPaintBehavior(oldPaintBehavior | PaintBehaviorFlattenCompositingLay
ers); |
| 1820 | 1820 |
| 1821 PageWidgetDelegate::paint(m_page.get(), pageOverlays(), canvas, rect, isTran
sparent() ? PageWidgetDelegate::Translucent : PageWidgetDelegate::Opaque); | 1821 PageWidgetDelegate::paint(m_page.get(), pageOverlays(), canvas, rect, isTran
sparent() ? PageWidgetDelegate::Translucent : PageWidgetDelegate::Opaque); |
| 1822 | 1822 |
| 1823 view->setPaintBehavior(oldPaintBehavior); | 1823 view->setPaintBehavior(oldPaintBehavior); |
| 1824 } | 1824 } |
| 1825 #endif | 1825 #endif |
| 1826 | 1826 |
| 1827 bool WebViewImpl::compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback
* callback) | 1827 void WebViewImpl::compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback
* callback) |
| 1828 { | 1828 { |
| 1829 if (!isAcceleratedCompositingActive()) | 1829 ASSERT(isAcceleratedCompositingActive()); |
| 1830 return false; | |
| 1831 m_layerTreeView->compositeAndReadbackAsync(callback); | 1830 m_layerTreeView->compositeAndReadbackAsync(callback); |
| 1832 return true; | |
| 1833 } | 1831 } |
| 1834 | 1832 |
| 1835 bool WebViewImpl::isTrackingRepaints() const | 1833 bool WebViewImpl::isTrackingRepaints() const |
| 1836 { | 1834 { |
| 1837 if (!page()) | 1835 if (!page()) |
| 1838 return false; | 1836 return false; |
| 1839 FrameView* view = page()->mainFrame()->view(); | 1837 FrameView* view = page()->mainFrame()->view(); |
| 1840 return view->isTrackingRepaints(); | 1838 return view->isTrackingRepaints(); |
| 1841 } | 1839 } |
| 1842 | 1840 |
| (...skipping 2264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4107 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4105 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4108 | 4106 |
| 4109 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4107 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4110 return false; | 4108 return false; |
| 4111 | 4109 |
| 4112 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4110 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4113 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4111 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4114 } | 4112 } |
| 4115 | 4113 |
| 4116 } // namespace blink | 4114 } // namespace blink |
| OLD | NEW |