[chromium] Separate IOSurface layer type from texture layers
authorjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Apr 2012 23:15:53 +0000 (23:15 +0000)
committerjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Apr 2012 23:15:53 +0000 (23:15 +0000)
commite5b8b3bcec200e0f1c7d5b0ab32d32d22fc9ed83
treed9f4b2f62690b75dd2669e77638938632bd4b949
parentc7aa05a7048e1d0e22fd8da868ac4881988fb020
[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
24 files changed:
Source/Platform/ChangeLog
Source/Platform/Platform.gypi
Source/Platform/chromium/public/WebExternalTextureLayer.h
Source/Platform/chromium/public/WebIOSurfaceLayer.h [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/WebCore.gypi
Source/WebCore/platform/graphics/chromium/IOSurfaceLayerChromium.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/chromium/IOSurfaceLayerChromium.h [new file with mode: 0644]
Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h
Source/WebCore/platform/graphics/chromium/TextureLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/TextureLayerChromium.h
Source/WebCore/platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.cpp
Source/WebCore/platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.h
Source/WebCore/platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.h [new file with mode: 0644]
Source/WebCore/platform/graphics/chromium/cc/CCTextureLayerImpl.cpp
Source/WebCore/platform/graphics/chromium/cc/CCTextureLayerImpl.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gyp
Source/WebKit/chromium/src/WebExternalTextureLayer.cpp
Source/WebKit/chromium/src/WebIOSurfaceLayer.cpp [new file with mode: 0644]
Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
Source/WebKit/chromium/src/WebPluginContainerImpl.h