[chromium] Move WebVideoFrame into Platform and remove WebCore::VideoFrameChromium...
authorjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Apr 2012 02:52:59 +0000 (02:52 +0000)
committerjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Apr 2012 02:52:59 +0000 (02:52 +0000)
commitd134542bdf1b32121a21a3cf6724f041ed827326
treeae78f74cf8b17f805553e931dce8c6c290d10a48
parent4ba9b69b9dcbfff4e1686be9705faefc2af28b64
[chromium] Move WebVideoFrame into Platform and remove WebCore::VideoFrameChromium wrapper API
https://bugs.webkit.org/show_bug.cgi?id=83851

Reviewed by Adam Barth.

Source/Platform:

Move WebVideoFrame API into Platform.

* Platform.gypi:
* chromium/public/WebVideoFrame.h: Renamed from Source/WebCore/platform/graphics/chromium/VideoFrameChromium.h.
(WebKit):
(WebVideoFrame):
(WebKit::WebVideoFrame::~WebVideoFrame):
(WebKit::WebVideoFrame::format):
(WebKit::WebVideoFrame::width):
(WebKit::WebVideoFrame::height):
(WebKit::WebVideoFrame::planes):
(WebKit::WebVideoFrame::stride):
(WebKit::WebVideoFrame::data):
(WebKit::WebVideoFrame::textureId):
(WebKit::WebVideoFrame::textureTarget):
* chromium/src/WebVideoFrame.cpp: Renamed from Source/WebCore/platform/graphics/chromium/VideoFrameChromium.cpp.
(WebKit):

Source/WebCore:

Remove VideoFrameChromium wrapper and converts WebCore code to using the Platform WebVideoFrame API directly.
Some utility code that previously existed on VideoFrameChromium and only had one caller, such as doing
width/height adjustements for YV12 frames, is moved into the calling code (CCVideoLayerImpl).

Covered by existing media/ and compositing/ layout tests.

* WebCore.gypi:
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawYUV):
(WebCore::LayerRendererChromium::drawRGBA):
(WebCore::LayerRendererChromium::copyFrameToTextures):
* platform/graphics/chromium/LayerRendererChromium.h:
* platform/graphics/chromium/VideoFrameProvider.h:
(VideoFrameProvider):
* platform/graphics/chromium/cc/CCVideoDrawQuad.cpp:
(WebCore::CCVideoDrawQuad::create):
(WebCore::CCVideoDrawQuad::CCVideoDrawQuad):
* platform/graphics/chromium/cc/CCVideoDrawQuad.h:
(WebKit):
(CCVideoDrawQuad):
(WebCore::CCVideoDrawQuad::frame):
* platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
(WebCore):
(WebCore::convertVFCFormatToGC3DFormat):
(WebCore::CCVideoLayerImpl::willDraw):
(WebCore::videoFrameDimension):
(WebCore::hasPaddingBytes):
(WebCore::CCVideoLayerImpl::computeVisibleSize):
(WebCore::CCVideoLayerImpl::reserveTextures):
* platform/graphics/chromium/cc/CCVideoLayerImpl.h:
(WebKit):

Source/WebKit/chromium:

Moves the WebVideoFrame interface into Platform and removes the now unnecessary VideoFrameChromiumImpl adapter
implementation.

* WebKit.gyp:
* public/WebVideoFrame.h:
* src/AssertMatchingEnums.cpp:
* src/VideoFrameChromiumImpl.cpp: Removed.
* src/VideoFrameChromiumImpl.h: Removed.
* src/WebMediaPlayerClientImpl.cpp:
(WebKit::WebMediaPlayerClientImpl::getCurrentFrame):
(WebKit::WebMediaPlayerClientImpl::putCurrentFrame):
(WebKit::WebMediaPlayerClientImpl::supportsType):
* src/WebMediaPlayerClientImpl.h:
(WebMediaPlayerClientImpl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
Source/Platform/ChangeLog
Source/Platform/Platform.gypi
Source/Platform/chromium/public/WebVideoFrame.h [moved from Source/WebCore/platform/graphics/chromium/VideoFrameChromium.h with 64% similarity]
Source/Platform/chromium/src/WebVideoFrame.cpp [moved from Source/WebCore/platform/graphics/chromium/VideoFrameChromium.cpp with 77% similarity]
Source/WebCore/ChangeLog
Source/WebCore/WebCore.gypi
Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h
Source/WebCore/platform/graphics/chromium/VideoFrameProvider.h
Source/WebCore/platform/graphics/chromium/cc/CCVideoDrawQuad.cpp
Source/WebCore/platform/graphics/chromium/cc/CCVideoDrawQuad.h
Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.cpp
Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gyp
Source/WebKit/chromium/public/WebVideoFrame.h
Source/WebKit/chromium/src/AssertMatchingEnums.cpp
Source/WebKit/chromium/src/VideoFrameChromiumImpl.cpp [deleted file]
Source/WebKit/chromium/src/VideoFrameChromiumImpl.h [deleted file]
Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h