OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 1840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1851 if (m_owningLayer.hasBoxDecorationsOrBackground() | 1851 if (m_owningLayer.hasBoxDecorationsOrBackground() |
1852 || imageLayoutObject->hasClip() | 1852 || imageLayoutObject->hasClip() |
1853 || imageLayoutObject->hasClipPath() | 1853 || imageLayoutObject->hasClipPath() |
1854 || imageLayoutObject->hasObjectFit()) | 1854 || imageLayoutObject->hasObjectFit()) |
1855 return false; | 1855 return false; |
1856 | 1856 |
1857 if (ImageResource* cachedImage = imageLayoutObject->cachedImage()) { | 1857 if (ImageResource* cachedImage = imageLayoutObject->cachedImage()) { |
1858 if (!cachedImage->hasImage()) | 1858 if (!cachedImage->hasImage()) |
1859 return false; | 1859 return false; |
1860 | 1860 |
1861 Image* image = cachedImage->imageForLayoutObject(imageLayoutObject); | 1861 Image* image = cachedImage->image(); |
1862 if (!image->isBitmapImage()) | 1862 if (!image->isBitmapImage()) |
1863 return false; | 1863 return false; |
1864 | 1864 |
1865 return true; | 1865 return true; |
1866 } | 1866 } |
1867 | 1867 |
1868 return false; | 1868 return false; |
1869 } | 1869 } |
1870 | 1870 |
1871 void CompositedLayerMapping::contentChanged(ContentChangeType changeType) | 1871 void CompositedLayerMapping::contentChanged(ContentChangeType changeType) |
(...skipping 11 matching lines...) Expand all Loading... |
1883 | 1883 |
1884 void CompositedLayerMapping::updateImageContents() | 1884 void CompositedLayerMapping::updateImageContents() |
1885 { | 1885 { |
1886 ASSERT(layoutObject()->isImage()); | 1886 ASSERT(layoutObject()->isImage()); |
1887 LayoutImage* imageLayoutObject = toLayoutImage(layoutObject()); | 1887 LayoutImage* imageLayoutObject = toLayoutImage(layoutObject()); |
1888 | 1888 |
1889 ImageResource* cachedImage = imageLayoutObject->cachedImage(); | 1889 ImageResource* cachedImage = imageLayoutObject->cachedImage(); |
1890 if (!cachedImage) | 1890 if (!cachedImage) |
1891 return; | 1891 return; |
1892 | 1892 |
1893 Image* image = cachedImage->imageForLayoutObject(imageLayoutObject); | 1893 Image* image = cachedImage->image(); |
1894 if (!image) | 1894 if (!image) |
1895 return; | 1895 return; |
1896 | 1896 |
1897 // This is a no-op if the layer doesn't have an inner layer for the image. | 1897 // This is a no-op if the layer doesn't have an inner layer for the image. |
1898 m_graphicsLayer->setContentsToImage(image, imageLayoutObject->shouldRespectI
mageOrientation()); | 1898 m_graphicsLayer->setContentsToImage(image, imageLayoutObject->shouldRespectI
mageOrientation()); |
1899 | 1899 |
1900 m_graphicsLayer->setFilterQuality(layoutObject()->style()->imageRendering()
== ImageRenderingPixelated ? kNone_SkFilterQuality : kLow_SkFilterQuality); | 1900 m_graphicsLayer->setFilterQuality(layoutObject()->style()->imageRendering()
== ImageRenderingPixelated ? kNone_SkFilterQuality : kLow_SkFilterQuality); |
1901 | 1901 |
1902 // Prevent double-drawing: https://bugs.webkit.org/show_bug.cgi?id=58632 | 1902 // Prevent double-drawing: https://bugs.webkit.org/show_bug.cgi?id=58632 |
1903 updateDrawsContent(); | 1903 updateDrawsContent(); |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2461 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2461 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
2462 name = "Scrolling Block Selection Layer"; | 2462 name = "Scrolling Block Selection Layer"; |
2463 } else { | 2463 } else { |
2464 ASSERT_NOT_REACHED(); | 2464 ASSERT_NOT_REACHED(); |
2465 } | 2465 } |
2466 | 2466 |
2467 return name; | 2467 return name; |
2468 } | 2468 } |
2469 | 2469 |
2470 } // namespace blink | 2470 } // namespace blink |
OLD | NEW |