[chromium] Convert GraphicsLayerChromium to use WebLayer types
authorjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2012 18:41:27 +0000 (18:41 +0000)
committerjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2012 18:41:27 +0000 (18:41 +0000)
commit9de1e27f5421e8ff9003b075e59bc36cecd56d6c
tree97aea699698d8abcb498821d8353d72b3c56ae39
parent9f1d157ae8a334f99689684ffe8f594d3e7518d9
[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
16 files changed:
Source/Platform/ChangeLog
Source/Platform/chromium/public/WebContentLayer.h
Source/Platform/chromium/public/WebLayer.h
Source/Platform/chromium/public/WebTransformationMatrix.h
Source/WebCore/ChangeLog
Source/WebCore/platform/chromium/support/WebTransformationMatrix.cpp
Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.h
Source/WebCore/platform/graphics/chromium/LayerChromium.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gyp
Source/WebKit/chromium/src/WebContentLayer.cpp
Source/WebKit/chromium/src/WebContentLayerImpl.cpp
Source/WebKit/chromium/src/WebContentLayerImpl.h
Source/WebKit/chromium/src/WebLayer.cpp
Source/WebKit/chromium/tests/ImageLayerChromiumTest.cpp