[chromium] Move WebVideoFrame into Platform and remove WebCore::VideoFrameChromium...
authorjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Apr 2012 20:43:24 +0000 (20:43 +0000)
committerjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Apr 2012 20:43:24 +0000 (20:43 +0000)
commit3997d9d7f9ce3754a4cc3aa1f5c3e211fa2dad2a
tree83dd54c8c9349f8866615b41d9bf4cf4f4cd8cd0
parent5d3fa078faa651180c9e8f6b259bb1f1b5200cb4
[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@114164 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 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/WebKitUnitTests.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