[chromium] Convert GraphicsLayerChromium to use WebLayer types
https://bugs.webkit.org/show_bug.cgi?id=86269
Reviewed by Adrienne Walker.
Source/Platform:
Adds some new WebLayer / WebContentLayer APIs that WebCore::GraphicsLayerChromium needs.
* chromium/public/WebContentLayer.h:
(WebCore):
(WebKit):
(WebContentLayer):
* chromium/public/WebLayer.h:
(WebKit):
(WebKit::WebLayer::isNull):
(WebLayer):
* chromium/public/WebTransformationMatrix.h:
(WebKit::WebTransformationMatrix::~WebTransformationMatrix):
Fix a memory leak - WebPrivateOwnPtr<>s have to be explicitly cleared.
(WebTransformationMatrix):
Source/WebCore:
This converts GraphicsLayerChromium over to use WebLayer and WebContentLayer. The conversion is not completely
as the Web*Layer APIs are not yet quite complete enough to use everywhere, and the PlatformLayer typedef is not
changed in this patch. The places where we have to punch out through API layer are marked by
unwrap<*LayerChromium>() calls and FIXME's in the Web*Layer.h files. There aren't many.
Refactor only, existing tests apply.
* platform/chromium/support/WebTransformationMatrix.cpp:
(WebKit):
(WebKit::WebTransformationMatrix::reset):
(WebKit::WebTransformationMatrix::projectPoint):
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::GraphicsLayerChromium):
(WebCore::GraphicsLayerChromium::willBeDestroyed):
(WebCore::GraphicsLayerChromium::setName):
(WebCore::GraphicsLayerChromium::updateNames):
(WebCore::GraphicsLayerChromium::removeFromParent):
(WebCore::GraphicsLayerChromium::setSize):
(WebCore::GraphicsLayerChromium::setTransform):
(WebCore::GraphicsLayerChromium::setBackgroundColor):
(WebCore::GraphicsLayerChromium::clearBackgroundColor):
(WebCore::GraphicsLayerChromium::setContentsOpaque):
(WebCore::GraphicsLayerChromium::setFilters):
(WebCore::GraphicsLayerChromium::setMaskLayer):
(WebCore::GraphicsLayerChromium::setBackfaceVisibility):
(WebCore::GraphicsLayerChromium::setOpacity):
(WebCore::GraphicsLayerChromium::setReplicatedByLayer):
(WebCore::GraphicsLayerChromium::setContentsNeedsDisplay):
(WebCore::GraphicsLayerChromium::setNeedsDisplay):
(WebCore::GraphicsLayerChromium::setNeedsDisplayInRect):
(WebCore::GraphicsLayerChromium::setContentsToImage):
(WebCore::GraphicsLayerChromium::setContentsToCanvas):
(WebCore::GraphicsLayerChromium::addAnimation):
(WebCore::GraphicsLayerChromium::pauseAnimation):
(WebCore::GraphicsLayerChromium::removeAnimation):
(WebCore::GraphicsLayerChromium::suspendAnimations):
(WebCore::GraphicsLayerChromium::resumeAnimations):
(WebCore::GraphicsLayerChromium::setContentsToMedia):
(WebCore::GraphicsLayerChromium::hostLayerForChildren):
(WebCore::GraphicsLayerChromium::layerForParent):
(WebCore::GraphicsLayerChromium::platformLayer):
(WebCore::GraphicsLayerChromium::setDebugBackgroundColor):
(WebCore::GraphicsLayerChromium::setDebugBorder):
(WebCore::GraphicsLayerChromium::updateChildList):
(WebCore::GraphicsLayerChromium::updateLayerPosition):
(WebCore::GraphicsLayerChromium::updateLayerSize):
(WebCore::GraphicsLayerChromium::updateAnchorPoint):
(WebCore::GraphicsLayerChromium::updateTransform):
(WebCore::GraphicsLayerChromium::updateChildrenTransform):
(WebCore::GraphicsLayerChromium::updateMasksToBounds):
(WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
(WebCore::GraphicsLayerChromium::updateLayerIsDrawable):
(WebCore::GraphicsLayerChromium::updateLayerBackgroundColor):
(WebCore::GraphicsLayerChromium::updateContentsRect):
(WebCore::GraphicsLayerChromium::updateContentsScale):
(WebCore::GraphicsLayerChromium::setupContentsLayer):
* platform/graphics/chromium/GraphicsLayerChromium.h:
(WebCore::GraphicsLayerChromium::hasContentsLayer):
(WebCore::GraphicsLayerChromium::contentsLayer):
(WebCore::GraphicsLayerChromium::primaryLayer):
(GraphicsLayerChromium):
* platform/graphics/chromium/LayerChromium.h:
(LayerChromium):
Source/WebKit/chromium:
* WebKit.gyp:
* src/WebContentLayer.cpp:
(WebKit::WebContentLayer::clearClient):
(WebKit):
(WebKit::WebContentLayer::setDrawsContent):
(WebKit::WebContentLayer::drawsContent):
(WebKit::WebContentLayer::WebContentLayer):
(WebKit::WebContentLayer::operator=):
(WebKit::WebContentLayer::operator PassRefPtr<ContentLayerChromium>):
* src/WebContentLayerImpl.cpp:
* src/WebContentLayerImpl.h:
(WebContentLayerImpl):
* src/WebLayer.cpp:
(WebKit::WebLayer::setSublayerTransform):
(WebKit):
(WebKit::WebLayer::setTransform):
(WebKit::WebLayer::setIsDrawable):
(WebKit::WebLayer::setPreserves3D):
(WebKit::WebLayer::setDoubleSided):
(WebKit::WebLayer::setBackgroundColor):
(WebKit::WebLayer::setContentsScale):
* tests/ImageLayerChromiumTest.cpp:
(WebCore::TEST):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117469
268f45cc-cd09-0410-ab3c-
d52691b4dbfc