[chromium] Convert WebPluginContainerImpl over to use WebExternalTextureLayer
authorjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Apr 2012 02:48:16 +0000 (02:48 +0000)
committerjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Apr 2012 02:48:16 +0000 (02:48 +0000)
commit302afde20684ad0c6ac0eb68a6253bed5cd32ca2
tree50064e50488907d0c46636101af8ee65b84e879e
parentb233548f9e7055bfca98cc5325345d3d4f0c41ca
[chromium] Convert WebPluginContainerImpl over to use WebExternalTextureLayer
https://bugs.webkit.org/show_bug.cgi?id=84120

Reviewed by Adrienne Walker.

Source/Platform:

This adds support for IO surface backed WebExternalTextureLayer, used by CoreAnimation plugins on OS X and moves
some functionality used by multiple WebLayer subclasses up to the base class.

* chromium/public/WebContentLayer.h:
(WebContentLayer):
* chromium/public/WebExternalTextureLayer.h:
(WebCore):
(WebExternalTextureLayer):
* chromium/public/WebLayer.h:
(WebKit):
(WebLayer):
(WebKit::WebLayer::unwrap):

Source/WebCore:

This renames PluginLayerChromium -> TextureLayerChromium since it is now used only as the implementation of
WebExternalTextureLayer and cleans it up slightly.

* WebCore.gypi:
* platform/graphics/chromium/TextureLayerChromium.cpp: Renamed from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.cpp.
(WebCore):
(WebCore::TextureLayerChromium::create):
(WebCore::TextureLayerChromium::TextureLayerChromium):
(WebCore::TextureLayerChromium::createCCLayerImpl):
(WebCore::TextureLayerChromium::drawsContent):
(WebCore::TextureLayerChromium::setTextureId):
(WebCore::TextureLayerChromium::setFlipped):
(WebCore::TextureLayerChromium::setUVRect):
(WebCore::TextureLayerChromium::setIOSurfaceProperties):
(WebCore::TextureLayerChromium::pushPropertiesTo):
* platform/graphics/chromium/TextureLayerChromium.h: Renamed from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h.
(WebCore):
(TextureLayerChromium):
(WebCore::TextureLayerChromium::flipped):
(WebCore::TextureLayerChromium::uvRect):

Source/WebKit/chromium:

This ports WebPluginContainerImpl over to use WebExternalTextureLayer instead of directly using a *LayerChromium
type for better layering and code sharing. The changes to WebPluginContainerImpl are fairly straightforward.  In
addition to renames I also moved some state tracking into WPCI instead of having it exposed on the interface. I
also removed the WebExternalTextureLayerImpl intermediate class since it wasn't doing anything useful.

* WebKit.gyp:
* WebKit.gypi:
* src/WebContentLayer.cpp:
* src/WebExternalTextureLayer.cpp:
(WebKit::WebExternalTextureLayer::create):
(WebKit::WebExternalTextureLayer::setTextureId):
(WebKit::WebExternalTextureLayer::setIOSurfaceProperties):
(WebKit::WebExternalTextureLayer::setFlipped):
(WebKit::WebExternalTextureLayer::flipped):
(WebKit::WebExternalTextureLayer::setUVRect):
(WebKit::WebExternalTextureLayer::uvRect):
(WebKit::WebExternalTextureLayer::WebExternalTextureLayer):
* src/WebExternalTextureLayerImpl.cpp: Removed.
* src/WebExternalTextureLayerImpl.h: Removed.
* src/WebLayer.cpp:
(WebKit::WebLayer::invalidateRect):
(WebKit):
(WebKit::WebLayer::invalidate):
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::setBackingTextureId):
(WebKit::WebPluginContainerImpl::setBackingIOSurfaceId):
(WebKit::WebPluginContainerImpl::commitBackingTexture):
(WebKit::WebPluginContainerImpl::setOpaque):
(WebKit::WebPluginContainerImpl::platformLayer):
(WebKit::WebPluginContainerImpl::WebPluginContainerImpl):
* src/WebPluginContainerImpl.h:
(WebCore):
(WebPluginContainerImpl):
* tests/WebExternalTextureLayerImplTest.cpp: Removed.
* tests/WebLayerTest.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@114604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
Source/Platform/ChangeLog
Source/Platform/chromium/public/WebContentLayer.h
Source/Platform/chromium/public/WebExternalTextureLayer.h
Source/Platform/chromium/public/WebLayer.h
Source/WebCore/ChangeLog
Source/WebCore/WebCore.gypi
Source/WebCore/platform/graphics/chromium/TextureLayerChromium.cpp [moved from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.cpp with 76% similarity]
Source/WebCore/platform/graphics/chromium/TextureLayerChromium.h [moved from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h with 87% similarity]
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gyp
Source/WebKit/chromium/WebKit.gypi
Source/WebKit/chromium/src/WebContentLayer.cpp
Source/WebKit/chromium/src/WebExternalTextureLayer.cpp
Source/WebKit/chromium/src/WebExternalTextureLayerImpl.cpp [deleted file]
Source/WebKit/chromium/src/WebExternalTextureLayerImpl.h [deleted file]
Source/WebKit/chromium/src/WebLayer.cpp
Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
Source/WebKit/chromium/src/WebPluginContainerImpl.h
Source/WebKit/chromium/tests/WebExternalTextureLayerImplTest.cpp [deleted file]
Source/WebKit/chromium/tests/WebLayerTest.cpp