[chromium] Separate IOSurface layer type from texture layers
https://bugs.webkit.org/show_bug.cgi?id=85030
Reviewed by Adrienne Walker.
Source/Platform:
Adds a new layer type for IOSurface backed layers, instead of sharing that functionality in
WebExternalTextureLayer. IOSurface backed layers do not share any other properties with external texture layers.
* Platform.gypi:
* chromium/public/WebExternalTextureLayer.h:
(WebExternalTextureLayer):
* chromium/public/WebIOSurfaceLayer.h:
(WebCore):
(WebKit):
(WebIOSurfaceLayer):
(WebKit::WebIOSurfaceLayer::WebIOSurfaceLayer):
(WebKit::WebIOSurfaceLayer::~WebIOSurfaceLayer):
Source/WebCore:
Adds a new layer type for IOSurface layers and pipes through a separate path through to rendering. IOSurface
layers are very simple - they have an IOSurface id and size, nothing else. All IOSurface layers are "flipped" in
our terminology.
* WebCore.gypi:
* platform/graphics/chromium/IOSurfaceLayerChromium.cpp:
(WebCore):
(WebCore::IOSurfaceLayerChromium::create):
(WebCore::IOSurfaceLayerChromium::IOSurfaceLayerChromium):
(WebCore::IOSurfaceLayerChromium::~IOSurfaceLayerChromium):
(WebCore::IOSurfaceLayerChromium::setIOSurfaceProperties):
(WebCore::IOSurfaceLayerChromium::createCCLayerImpl):
(WebCore::IOSurfaceLayerChromium::drawsContent):
(WebCore::IOSurfaceLayerChromium::pushPropertiesTo):
* platform/graphics/chromium/IOSurfaceLayerChromium.h:
(WebCore):
(IOSurfaceLayerChromium):
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawIOSurfaceQuad):
(WebCore::LayerRendererChromium::cleanupSharedObjects):
* platform/graphics/chromium/LayerRendererChromium.h:
(LayerRendererChromium):
* platform/graphics/chromium/TextureLayerChromium.cpp:
(WebCore::TextureLayerChromium::TextureLayerChromium):
(WebCore::TextureLayerChromium::drawsContent):
(WebCore::TextureLayerChromium::pushPropertiesTo):
* platform/graphics/chromium/TextureLayerChromium.h:
(TextureLayerChromium):
* platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.cpp:
(WebCore::CCIOSurfaceDrawQuad::create):
(WebCore::CCIOSurfaceDrawQuad::CCIOSurfaceDrawQuad):
* platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.h:
(CCIOSurfaceDrawQuad):
* platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
(WebCore):
(WebCore::CCIOSurfaceLayerImpl::CCIOSurfaceLayerImpl):
(WebCore::CCIOSurfaceLayerImpl::~CCIOSurfaceLayerImpl):
(WebCore::CCIOSurfaceLayerImpl::willDraw):
(WebCore::CCIOSurfaceLayerImpl::appendQuads):
(WebCore::CCIOSurfaceLayerImpl::dumpLayerProperties):
(WebCore::CCIOSurfaceLayerImpl::didLoseContext):
(WebCore::CCIOSurfaceLayerImpl::setIOSurfaceProperties):
* platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.h:
(WebCore):
(CCIOSurfaceLayerImpl):
(WebCore::CCIOSurfaceLayerImpl::create):
* platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
(WebCore::CCTextureLayerImpl::CCTextureLayerImpl):
(WebCore::CCTextureLayerImpl::~CCTextureLayerImpl):
(WebCore::CCTextureLayerImpl::appendQuads):
(WebCore::CCTextureLayerImpl::didLoseContext):
* platform/graphics/chromium/cc/CCTextureLayerImpl.h:
(CCTextureLayerImpl):
Source/WebKit/chromium:
Update WebPluginContainerImpl to support having either a texture or IOSurface layer (but never both) depending
on the plugin's contents.
* WebKit.gyp:
* src/WebExternalTextureLayer.cpp:
* src/WebIOSurfaceLayer.cpp:
(WebKit):
(WebKit::WebIOSurfaceLayer::create):
(WebKit::WebIOSurfaceLayer::setIOSurfaceProperties):
(WebKit::WebIOSurfaceLayer::WebIOSurfaceLayer):
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::setBackingTextureId):
(WebKit::WebPluginContainerImpl::setBackingIOSurfaceId):
(WebKit::WebPluginContainerImpl::commitBackingTexture):
(WebKit::WebPluginContainerImpl::setOpaque):
(WebKit::WebPluginContainerImpl::platformLayer):
(WebKit::WebPluginContainerImpl::WebPluginContainerImpl):
* src/WebPluginContainerImpl.h:
(WebPluginContainerImpl):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115509
268f45cc-cd09-0410-ab3c-
d52691b4dbfc