Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(460)

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 1427943002: Wrap SVGImage for container during paint (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1855 matching lines...) Expand 10 before | Expand all | Expand 10 after
1866 if (m_owningLayer.hasBoxDecorationsOrBackground() 1866 if (m_owningLayer.hasBoxDecorationsOrBackground()
1867 || imageLayoutObject->hasClip() 1867 || imageLayoutObject->hasClip()
1868 || imageLayoutObject->hasClipPath() 1868 || imageLayoutObject->hasClipPath()
1869 || imageLayoutObject->hasObjectFit()) 1869 || imageLayoutObject->hasObjectFit())
1870 return false; 1870 return false;
1871 1871
1872 if (ImageResource* cachedImage = imageLayoutObject->cachedImage()) { 1872 if (ImageResource* cachedImage = imageLayoutObject->cachedImage()) {
1873 if (!cachedImage->hasImage()) 1873 if (!cachedImage->hasImage())
1874 return false; 1874 return false;
1875 1875
1876 Image* image = cachedImage->imageForLayoutObject(imageLayoutObject); 1876 Image* image = cachedImage->image();
1877 if (!image->isBitmapImage()) 1877 if (!image->isBitmapImage())
1878 return false; 1878 return false;
1879 1879
1880 return true; 1880 return true;
1881 } 1881 }
1882 1882
1883 return false; 1883 return false;
1884 } 1884 }
1885 1885
1886 void CompositedLayerMapping::contentChanged(ContentChangeType changeType) 1886 void CompositedLayerMapping::contentChanged(ContentChangeType changeType)
(...skipping 11 matching lines...) Expand all
1898 1898
1899 void CompositedLayerMapping::updateImageContents() 1899 void CompositedLayerMapping::updateImageContents()
1900 { 1900 {
1901 ASSERT(layoutObject()->isImage()); 1901 ASSERT(layoutObject()->isImage());
1902 LayoutImage* imageLayoutObject = toLayoutImage(layoutObject()); 1902 LayoutImage* imageLayoutObject = toLayoutImage(layoutObject());
1903 1903
1904 ImageResource* cachedImage = imageLayoutObject->cachedImage(); 1904 ImageResource* cachedImage = imageLayoutObject->cachedImage();
1905 if (!cachedImage) 1905 if (!cachedImage)
1906 return; 1906 return;
1907 1907
1908 Image* image = cachedImage->imageForLayoutObject(imageLayoutObject); 1908 Image* image = cachedImage->image();
1909 if (!image) 1909 if (!image)
1910 return; 1910 return;
1911 1911
1912 // This is a no-op if the layer doesn't have an inner layer for the image. 1912 // This is a no-op if the layer doesn't have an inner layer for the image.
1913 m_graphicsLayer->setContentsToImage(image, imageLayoutObject->shouldRespectI mageOrientation()); 1913 m_graphicsLayer->setContentsToImage(image, imageLayoutObject->shouldRespectI mageOrientation());
1914 1914
1915 m_graphicsLayer->setFilterQuality(layoutObject()->style()->imageRendering() == ImageRenderingPixelated ? kNone_SkFilterQuality : kLow_SkFilterQuality); 1915 m_graphicsLayer->setFilterQuality(layoutObject()->style()->imageRendering() == ImageRenderingPixelated ? kNone_SkFilterQuality : kLow_SkFilterQuality);
1916 1916
1917 // Prevent double-drawing: https://bugs.webkit.org/show_bug.cgi?id=58632 1917 // Prevent double-drawing: https://bugs.webkit.org/show_bug.cgi?id=58632
1918 updateDrawsContent(); 1918 updateDrawsContent();
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
2521 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2521 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2522 name = "Scrolling Block Selection Layer"; 2522 name = "Scrolling Block Selection Layer";
2523 } else { 2523 } else {
2524 ASSERT_NOT_REACHED(); 2524 ASSERT_NOT_REACHED();
2525 } 2525 }
2526 2526
2527 return name; 2527 return name;
2528 } 2528 }
2529 2529
2530 } // namespace blink 2530 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698