| 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 1856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1867 if (m_owningLayer.hasBoxDecorationsOrBackground() | 1867 if (m_owningLayer.hasBoxDecorationsOrBackground() |
| 1868 || imageLayoutObject->hasClip() | 1868 || imageLayoutObject->hasClip() |
| 1869 || imageLayoutObject->hasClipPath() | 1869 || imageLayoutObject->hasClipPath() |
| 1870 || imageLayoutObject->hasObjectFit()) | 1870 || imageLayoutObject->hasObjectFit()) |
| 1871 return false; | 1871 return false; |
| 1872 | 1872 |
| 1873 if (ImageResource* cachedImage = imageLayoutObject->cachedImage()) { | 1873 if (ImageResource* cachedImage = imageLayoutObject->cachedImage()) { |
| 1874 if (!cachedImage->hasImage()) | 1874 if (!cachedImage->hasImage()) |
| 1875 return false; | 1875 return false; |
| 1876 | 1876 |
| 1877 Image* image = cachedImage->imageForLayoutObject(imageLayoutObject); | 1877 Image* image = cachedImage->image(); |
| 1878 if (!image->isBitmapImage()) | 1878 if (!image->isBitmapImage()) |
| 1879 return false; | 1879 return false; |
| 1880 | 1880 |
| 1881 return true; | 1881 return true; |
| 1882 } | 1882 } |
| 1883 | 1883 |
| 1884 return false; | 1884 return false; |
| 1885 } | 1885 } |
| 1886 | 1886 |
| 1887 void CompositedLayerMapping::contentChanged(ContentChangeType changeType) | 1887 void CompositedLayerMapping::contentChanged(ContentChangeType changeType) |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1899 | 1899 |
| 1900 void CompositedLayerMapping::updateImageContents() | 1900 void CompositedLayerMapping::updateImageContents() |
| 1901 { | 1901 { |
| 1902 ASSERT(layoutObject()->isImage()); | 1902 ASSERT(layoutObject()->isImage()); |
| 1903 LayoutImage* imageLayoutObject = toLayoutImage(layoutObject()); | 1903 LayoutImage* imageLayoutObject = toLayoutImage(layoutObject()); |
| 1904 | 1904 |
| 1905 ImageResource* cachedImage = imageLayoutObject->cachedImage(); | 1905 ImageResource* cachedImage = imageLayoutObject->cachedImage(); |
| 1906 if (!cachedImage) | 1906 if (!cachedImage) |
| 1907 return; | 1907 return; |
| 1908 | 1908 |
| 1909 Image* image = cachedImage->imageForLayoutObject(imageLayoutObject); | 1909 Image* image = cachedImage->image(); |
| 1910 if (!image) | 1910 if (!image) |
| 1911 return; | 1911 return; |
| 1912 | 1912 |
| 1913 // This is a no-op if the layer doesn't have an inner layer for the image. | 1913 // This is a no-op if the layer doesn't have an inner layer for the image. |
| 1914 m_graphicsLayer->setContentsToImage(image, imageLayoutObject->shouldRespectI
mageOrientation()); | 1914 m_graphicsLayer->setContentsToImage(image, imageLayoutObject->shouldRespectI
mageOrientation()); |
| 1915 | 1915 |
| 1916 m_graphicsLayer->setFilterQuality(layoutObject()->style()->imageRendering()
== ImageRenderingPixelated ? kNone_SkFilterQuality : kLow_SkFilterQuality); | 1916 m_graphicsLayer->setFilterQuality(layoutObject()->style()->imageRendering()
== ImageRenderingPixelated ? kNone_SkFilterQuality : kLow_SkFilterQuality); |
| 1917 | 1917 |
| 1918 // Prevent double-drawing: https://bugs.webkit.org/show_bug.cgi?id=58632 | 1918 // Prevent double-drawing: https://bugs.webkit.org/show_bug.cgi?id=58632 |
| 1919 updateDrawsContent(); | 1919 updateDrawsContent(); |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2514 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2514 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
| 2515 name = "Scrolling Block Selection Layer"; | 2515 name = "Scrolling Block Selection Layer"; |
| 2516 } else { | 2516 } else { |
| 2517 ASSERT_NOT_REACHED(); | 2517 ASSERT_NOT_REACHED(); |
| 2518 } | 2518 } |
| 2519 | 2519 |
| 2520 return name; | 2520 return name; |
| 2521 } | 2521 } |
| 2522 | 2522 |
| 2523 } // namespace blink | 2523 } // namespace blink |
| OLD | NEW |