• jamesr@google.com's avatar
    [chromium] Move WebVideoFrame into Platform and remove WebCore::VideoFrameChromium wrapper API · 3997d9d7
    jamesr@google.com authored
    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
    3997d9d7
WebVideoFrame.h 1.38 KB