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

Unified Diff: Source/platform/graphics/GraphicsLayer.cpp

Issue 1251953007: remove unused methods createNinePatchLayer() and setContentsToNinePatch() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: . Created 5 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/graphics/GraphicsLayer.h ('k') | public/platform/WebCompositorSupport.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsLayer.cpp
diff --git a/Source/platform/graphics/GraphicsLayer.cpp b/Source/platform/graphics/GraphicsLayer.cpp
index 4a23d1162426e4df41d773dd2853d9f9f27bde96..e6dbfcfa5d3ef0c9990da1cbdc53db548afa5da4 100644
--- a/Source/platform/graphics/GraphicsLayer.cpp
+++ b/Source/platform/graphics/GraphicsLayer.cpp
@@ -1028,29 +1028,6 @@ void GraphicsLayer::setContentsToImage(Image* image)
setContentsTo(m_imageLayer ? m_imageLayer->layer() : 0);
}
-void GraphicsLayer::setContentsToNinePatch(Image* image, const IntRect& aperture)
-{
- if (m_ninePatchLayer) {
- unregisterContentsLayer(m_ninePatchLayer->layer());
- m_ninePatchLayer.clear();
- }
- SkBitmap bitmap;
- if (image && image->deprecatedBitmapForCurrentFrame(&bitmap)) {
- m_ninePatchLayer = adoptPtr(Platform::current()->compositorSupport()->createNinePatchLayer());
- int borderWidth = bitmap.width() - aperture.width();
- int borderHeight = bitmap.height() - aperture.height();
- WebRect border(aperture.x(), aperture.y(), borderWidth, borderHeight);
-
- m_ninePatchLayer->setBitmap(bitmap);
- m_ninePatchLayer->setAperture(aperture);
- m_ninePatchLayer->setBorder(border);
-
- m_ninePatchLayer->layer()->setOpaque(image->currentFrameKnownToBeOpaque());
- registerContentsLayer(m_ninePatchLayer->layer());
- }
- setContentsTo(m_ninePatchLayer ? m_ninePatchLayer->layer() : 0);
-}
-
bool GraphicsLayer::addAnimation(PassOwnPtr<WebCompositorAnimation> popAnimation)
{
OwnPtr<WebCompositorAnimation> animation(popAnimation);
« no previous file with comments | « Source/platform/graphics/GraphicsLayer.h ('k') | public/platform/WebCompositorSupport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698