Title: [120457] trunk/Source/WebCore
Revision
120457
Author
[email protected]
Date
2012-06-15 07:34:29 -0700 (Fri, 15 Jun 2012)

Log Message

[chromium] Create a CCYUVVideoDrawQuad and remove the now-unused generic CCVideoDrawQuad
https://bugs.webkit.org/show_bug.cgi?id=88828

Reviewed by Adrienne Walker.

The CCVideoDrawQuad is now only used for YUV video, so we remove the
class and replace it with CCYUVVideoDrawQuad. This class holds what is
needed to draw a YUV video frame.

No new tests, no change in behaviour.

* WebCore.gypi:
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawQuad):
(WebCore::LayerRendererChromium::drawYUVVideoQuad):
* platform/graphics/chromium/LayerRendererChromium.h:
(WebCore):
(LayerRendererChromium):
* platform/graphics/chromium/cc/CCDrawQuad.cpp:
(WebCore::CCDrawQuad::toYUVVideoDrawQuad):
* platform/graphics/chromium/cc/CCDrawQuad.h:
(WebCore):
(CCDrawQuad):
* platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
(WebCore::CCVideoLayerImpl::appendQuads):
* platform/graphics/chromium/cc/CCYUVVideoDrawQuad.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCVideoDrawQuad.cpp.
(WebCore):
(WebCore::CCYUVVideoDrawQuad::create):
(WebCore::CCYUVVideoDrawQuad::CCYUVVideoDrawQuad):
* platform/graphics/chromium/cc/CCYUVVideoDrawQuad.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCVideoDrawQuad.h.
(WebCore):
(CCYUVVideoDrawQuad):
(WebCore::CCYUVVideoDrawQuad::yPlane):
(WebCore::CCYUVVideoDrawQuad::uPlane):
(WebCore::CCYUVVideoDrawQuad::vPlane):

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (120456 => 120457)


--- trunk/Source/WebCore/ChangeLog	2012-06-15 14:28:20 UTC (rev 120456)
+++ trunk/Source/WebCore/ChangeLog	2012-06-15 14:34:29 UTC (rev 120457)
@@ -1,3 +1,41 @@
+2012-06-11  Dana Jansens  <[email protected]>
+
+        [chromium] Create a CCYUVVideoDrawQuad and remove the now-unused generic CCVideoDrawQuad
+        https://bugs.webkit.org/show_bug.cgi?id=88828
+
+        Reviewed by Adrienne Walker.
+
+        The CCVideoDrawQuad is now only used for YUV video, so we remove the
+        class and replace it with CCYUVVideoDrawQuad. This class holds what is
+        needed to draw a YUV video frame.
+
+        No new tests, no change in behaviour.
+
+        * WebCore.gypi:
+        * platform/graphics/chromium/LayerRendererChromium.cpp:
+        (WebCore::LayerRendererChromium::drawQuad):
+        (WebCore::LayerRendererChromium::drawYUVVideoQuad):
+        * platform/graphics/chromium/LayerRendererChromium.h:
+        (WebCore):
+        (LayerRendererChromium):
+        * platform/graphics/chromium/cc/CCDrawQuad.cpp:
+        (WebCore::CCDrawQuad::toYUVVideoDrawQuad):
+        * platform/graphics/chromium/cc/CCDrawQuad.h:
+        (WebCore):
+        (CCDrawQuad):
+        * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
+        (WebCore::CCVideoLayerImpl::appendQuads):
+        * platform/graphics/chromium/cc/CCYUVVideoDrawQuad.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCVideoDrawQuad.cpp.
+        (WebCore):
+        (WebCore::CCYUVVideoDrawQuad::create):
+        (WebCore::CCYUVVideoDrawQuad::CCYUVVideoDrawQuad):
+        * platform/graphics/chromium/cc/CCYUVVideoDrawQuad.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCVideoDrawQuad.h.
+        (WebCore):
+        (CCYUVVideoDrawQuad):
+        (WebCore::CCYUVVideoDrawQuad::yPlane):
+        (WebCore::CCYUVVideoDrawQuad::uPlane):
+        (WebCore::CCYUVVideoDrawQuad::vPlane):
+
 2012-06-15  Ilya Tikhonovsky  <[email protected]>
 
         Web Inspector: CRASH: getProfile is crashing for unknown profiles.

Modified: trunk/Source/WebCore/WebCore.gypi (120456 => 120457)


--- trunk/Source/WebCore/WebCore.gypi	2012-06-15 14:28:20 UTC (rev 120456)
+++ trunk/Source/WebCore/WebCore.gypi	2012-06-15 14:34:29 UTC (rev 120457)
@@ -3784,10 +3784,10 @@
             'platform/graphics/chromium/cc/CCTimer.cpp',
             'platform/graphics/chromium/cc/CCTimer.h',
             'platform/graphics/chromium/cc/CCTimeSource.h',
-            'platform/graphics/chromium/cc/CCVideoDrawQuad.cpp',
-            'platform/graphics/chromium/cc/CCVideoDrawQuad.h',
             'platform/graphics/chromium/cc/CCVideoLayerImpl.cpp',
             'platform/graphics/chromium/cc/CCVideoLayerImpl.h',
+            'platform/graphics/chromium/cc/CCYUVVideoDrawQuad.cpp',
+            'platform/graphics/chromium/cc/CCYUVVideoDrawQuad.h',
             'platform/graphics/cocoa/FontPlatformDataCocoa.mm',
             'platform/graphics/efl/FontEfl.cpp',
             'platform/graphics/efl/IconEfl.cpp',

Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp (120456 => 120457)


--- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp	2012-06-15 14:28:20 UTC (rev 120456)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp	2012-06-15 14:34:29 UTC (rev 120457)
@@ -70,7 +70,7 @@
 #include "cc/CCStreamVideoDrawQuad.h"
 #include "cc/CCTextureDrawQuad.h"
 #include "cc/CCTileDrawQuad.h"
-#include "cc/CCVideoDrawQuad.h"
+#include "cc/CCYUVVideoDrawQuad.h"
 #include <public/WebVideoFrame.h>
 #include <wtf/CurrentTime.h>
 #include <wtf/MainThread.h>
@@ -526,8 +526,8 @@
     case CCDrawQuad::TiledContent:
         drawTileQuad(quad->toTileDrawQuad());
         break;
-    case CCDrawQuad::VideoContent:
-        drawVideoQuad(quad->toVideoDrawQuad());
+    case CCDrawQuad::YUVVideoContent:
+        drawYUVVideoQuad(quad->toYUVVideoDrawQuad());
         break;
     }
 }
@@ -983,14 +983,14 @@
     drawTexturedQuad(quad->quadTransform(), tileRect.width(), tileRect.height(), quad->opacity(), localQuad, uniforms.matrixLocation, uniforms.alphaLocation, uniforms.pointLocation);
 }
 
-void LayerRendererChromium::drawYUV(const CCVideoDrawQuad* quad)
+void LayerRendererChromium::drawYUVVideoQuad(const CCYUVVideoDrawQuad* quad)
 {
     const VideoYUVProgram* program = videoYUVProgram();
     ASSERT(program && program->initialized());
 
-    const CCVideoLayerImpl::FramePlane& yPlane = quad->planes()[WebKit::WebVideoFrame::yPlane];
-    const CCVideoLayerImpl::FramePlane& uPlane = quad->planes()[WebKit::WebVideoFrame::uPlane];
-    const CCVideoLayerImpl::FramePlane& vPlane = quad->planes()[WebKit::WebVideoFrame::vPlane];
+    const CCVideoLayerImpl::FramePlane& yPlane = quad->yPlane();
+    const CCVideoLayerImpl::FramePlane& uPlane = quad->uPlane();
+    const CCVideoLayerImpl::FramePlane& vPlane = quad->vPlane();
 
     GLC(context(), context()->activeTexture(GraphicsContext3D::TEXTURE1));
     GLC(context(), context()->bindTexture(GraphicsContext3D::TEXTURE_2D, yPlane.textureId));
@@ -1067,19 +1067,6 @@
                      -1);
 }
 
-void LayerRendererChromium::drawVideoQuad(const CCVideoDrawQuad* quad)
-{
-    ASSERT(CCProxy::isImplThread());
-
-    switch (quad->format()) {
-    case GraphicsContext3D::LUMINANCE:
-        drawYUV(quad);
-        break;
-    default:
-        CRASH(); // Someone updated convertVFCFormatToGC3DFormat above but update this!
-    }
-}
-
 struct TextureProgramBinding {
     template<class Program> void set(Program* program)
     {

Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h (120456 => 120457)


--- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h	2012-06-15 14:28:20 UTC (rev 120456)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h	2012-06-15 14:34:29 UTC (rev 120457)
@@ -51,7 +51,7 @@
 class CCStreamVideoDrawQuad;
 class CCTextureDrawQuad;
 class CCTileDrawQuad;
-class CCVideoDrawQuad;
+class CCYUVVideoDrawQuad;
 class GeometryBinding;
 class GraphicsContext3D;
 class LayerRendererGpuMemoryAllocationChangedCallbackAdapter;
@@ -135,13 +135,8 @@
     void drawTextureQuad(const CCTextureDrawQuad*);
     void drawIOSurfaceQuad(const CCIOSurfaceDrawQuad*);
     void drawTileQuad(const CCTileDrawQuad*);
-    void drawVideoQuad(const CCVideoDrawQuad*);
+    void drawYUVVideoQuad(const CCYUVVideoDrawQuad*);
 
-    void copyPlaneToTexture(const CCVideoDrawQuad*, const void* plane, int index);
-    bool copyFrameToTextures(const CCVideoDrawQuad*);
-    void drawStreamTexture(const CCVideoDrawQuad*);
-    void drawYUV(const CCVideoDrawQuad*);
-
     void setDrawFramebufferRect(const IntRect&, bool flipY);
 
     // The current drawing target is either a RenderPass or ManagedTexture. Use these functions to switch to a new drawing target.

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCDrawQuad.cpp (120456 => 120457)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCDrawQuad.cpp	2012-06-15 14:28:20 UTC (rev 120456)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCDrawQuad.cpp	2012-06-15 14:34:29 UTC (rev 120457)
@@ -36,7 +36,7 @@
 #include "cc/CCStreamVideoDrawQuad.h"
 #include "cc/CCTextureDrawQuad.h"
 #include "cc/CCTileDrawQuad.h"
-#include "cc/CCVideoDrawQuad.h"
+#include "cc/CCYUVVideoDrawQuad.h"
 
 namespace WebCore {
 
@@ -114,10 +114,10 @@
     return static_cast<const CCTileDrawQuad*>(this);
 }
 
-const CCVideoDrawQuad* CCDrawQuad::toVideoDrawQuad() const
+const CCYUVVideoDrawQuad* CCDrawQuad::toYUVVideoDrawQuad() const
 {
     ASSERT(m_material == VideoContent);
-    return static_cast<const CCVideoDrawQuad*>(this);
+    return static_cast<const CCYUVVideoDrawQuad*>(this);
 }
 
 

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCDrawQuad.h (120456 => 120457)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCDrawQuad.h	2012-06-15 14:28:20 UTC (rev 120456)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCDrawQuad.h	2012-06-15 14:34:29 UTC (rev 120457)
@@ -38,7 +38,7 @@
 class CCStreamVideoDrawQuad;
 class CCTextureDrawQuad;
 class CCTileDrawQuad;
-class CCVideoDrawQuad;
+class CCYUVVideoDrawQuad;
 
 // CCDrawQuad is a bag of data used for drawing a quad. Because different
 // materials need different bits of per-quad data to render, classes that derive
@@ -72,7 +72,7 @@
         TextureContent,
         SolidColor,
         TiledContent,
-        VideoContent,
+        YUVVideoContent,
         StreamVideoContent,
     };
 
@@ -87,7 +87,7 @@
     const CCStreamVideoDrawQuad* toStreamVideoDrawQuad() const;
     const CCTextureDrawQuad* toTextureDrawQuad() const;
     const CCTileDrawQuad* toTileDrawQuad() const;
-    const CCVideoDrawQuad* toVideoDrawQuad() const;
+    const CCYUVVideoDrawQuad* toYUVVideoDrawQuad() const;
 
     const CCSharedQuadState* sharedQuadState() const { return m_sharedQuadState; }
 

Deleted: trunk/Source/WebCore/platform/graphics/chromium/cc/CCVideoDrawQuad.cpp (120456 => 120457)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCVideoDrawQuad.cpp	2012-06-15 14:28:20 UTC (rev 120456)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCVideoDrawQuad.cpp	2012-06-15 14:34:29 UTC (rev 120457)
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "cc/CCVideoDrawQuad.h"
-
-namespace WebCore {
-
-PassOwnPtr<CCVideoDrawQuad> CCVideoDrawQuad::create(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect, CCVideoLayerImpl::FramePlane planes[WebKit::WebVideoFrame::maxPlanes], unsigned frameProviderTextureId, GC3Denum format, const WebKit::WebTransformationMatrix& matrix)
-{
-    return adoptPtr(new CCVideoDrawQuad(sharedQuadState, quadRect, planes, frameProviderTextureId, format, matrix));
-}
-
-CCVideoDrawQuad::CCVideoDrawQuad(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect, CCVideoLayerImpl::FramePlane planes[WebKit::WebVideoFrame::maxPlanes], unsigned frameProviderTextureId, GC3Denum format, const WebKit::WebTransformationMatrix& matrix)
-    : CCDrawQuad(sharedQuadState, CCDrawQuad::VideoContent, quadRect)
-    , m_frameProviderTextureId(frameProviderTextureId)
-    , m_format(format)
-    , m_matrix(matrix)
-{
-    for (size_t i = 0; i < WebKit::WebVideoFrame::maxPlanes; ++i)
-      m_planes[i] = planes[i];
-
-}
-
-}

Deleted: trunk/Source/WebCore/platform/graphics/chromium/cc/CCVideoDrawQuad.h (120456 => 120457)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCVideoDrawQuad.h	2012-06-15 14:28:20 UTC (rev 120456)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCVideoDrawQuad.h	2012-06-15 14:34:29 UTC (rev 120457)
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CCVideoDrawQuad_h
-#define CCVideoDrawQuad_h
-
-#include "GraphicsTypes3D.h"
-#include "cc/CCDrawQuad.h"
-#include "cc/CCVideoLayerImpl.h"
-#include <public/WebTransformationMatrix.h>
-#include <wtf/PassOwnPtr.h>
-
-namespace WebCore {
-
-class CCVideoDrawQuad : public CCDrawQuad {
-    WTF_MAKE_NONCOPYABLE(CCVideoDrawQuad);
-public:
-    static PassOwnPtr<CCVideoDrawQuad> create(const CCSharedQuadState*, const IntRect&, CCVideoLayerImpl::FramePlane planes[WebKit::WebVideoFrame::maxPlanes], unsigned frameProviderTextureId, GC3Denum format, const WebKit::WebTransformationMatrix&);
-
-    // Each index in this array corresponds to a plane in WebKit::WebVideoFrame.
-    const CCVideoLayerImpl::FramePlane* planes() const { return m_planes; }
-    unsigned frameProviderTextureId() const { return m_frameProviderTextureId; }
-    GC3Denum format() const { return m_format; }
-    const WebKit::WebTransformationMatrix& matrix() const { return m_matrix; }
-
-private:
-    CCVideoDrawQuad(const CCSharedQuadState*, const IntRect&, CCVideoLayerImpl::FramePlane planes[WebKit::WebVideoFrame::maxPlanes], unsigned frameProviderTextureId, GC3Denum format, const WebKit::WebTransformationMatrix&);
-
-    CCVideoLayerImpl::FramePlane m_planes[WebKit::WebVideoFrame::maxPlanes];
-    unsigned m_frameProviderTextureId;
-    GC3Denum m_format;
-    WebKit::WebTransformationMatrix m_matrix;
-};
-
-}
-
-#endif

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.cpp (120456 => 120457)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.cpp	2012-06-15 14:28:20 UTC (rev 120456)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.cpp	2012-06-15 14:34:29 UTC (rev 120457)
@@ -41,7 +41,7 @@
 #include "cc/CCQuadCuller.h"
 #include "cc/CCStreamVideoDrawQuad.h"
 #include "cc/CCTextureDrawQuad.h"
-#include "cc/CCVideoDrawQuad.h"
+#include "cc/CCYUVVideoDrawQuad.h"
 #include <public/WebVideoFrame.h>
 #include <wtf/text/WTFString.h>
 
@@ -187,8 +187,11 @@
     switch (m_format) {
     case GraphicsContext3D::LUMINANCE: {
         // YUV software decoder.
-        OwnPtr<CCVideoDrawQuad> videoQuad = CCVideoDrawQuad::create(sharedQuadState, quadRect, m_framePlanes, 0, m_format, WebKit::WebTransformationMatrix());
-        quadList.append(videoQuad.release());
+        const FramePlane& yPlane = m_framePlanes[WebKit::WebVideoFrame::yPlane];
+        const FramePlane& uPlane = m_framePlanes[WebKit::WebVideoFrame::uPlane];
+        const FramePlane& vPlane = m_framePlanes[WebKit::WebVideoFrame::vPlane];
+        OwnPtr<CCYUVVideoDrawQuad> yuvVideoQuad = CCYUVVideoDrawQuad::create(sharedQuadState, quadRect, yPlane, uPlane, vPlane);
+        quadList.append(yuvVideoQuad.release());
         break;
     }
     case GraphicsContext3D::RGBA: {

Copied: trunk/Source/WebCore/platform/graphics/chromium/cc/CCYUVVideoDrawQuad.cpp (from rev 120456, trunk/Source/WebCore/platform/graphics/chromium/cc/CCVideoDrawQuad.cpp) (0 => 120457)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCYUVVideoDrawQuad.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCYUVVideoDrawQuad.cpp	2012-06-15 14:34:29 UTC (rev 120457)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include "cc/CCYUVVideoDrawQuad.h"
+
+namespace WebCore {
+
+PassOwnPtr<CCYUVVideoDrawQuad> CCYUVVideoDrawQuad::create(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect, const CCVideoLayerImpl::FramePlane& yPlane, const CCVideoLayerImpl::FramePlane& uPlane, const CCVideoLayerImpl::FramePlane& vPlane)
+{
+    return adoptPtr(new CCYUVVideoDrawQuad(sharedQuadState, quadRect, yPlane, uPlane, vPlane));
+}
+
+CCYUVVideoDrawQuad::CCYUVVideoDrawQuad(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect, const CCVideoLayerImpl::FramePlane& yPlane, const CCVideoLayerImpl::FramePlane& uPlane, const CCVideoLayerImpl::FramePlane& vPlane)
+    : CCDrawQuad(sharedQuadState, CCDrawQuad::YUVVideoContent, quadRect)
+    , m_yPlane(yPlane)
+    , m_uPlane(uPlane)
+    , m_vPlane(vPlane)
+{
+}
+
+}

Property changes: trunk/Source/WebCore/platform/graphics/chromium/cc/CCYUVVideoDrawQuad.cpp


Added: svn:eol-style

Copied: trunk/Source/WebCore/platform/graphics/chromium/cc/CCYUVVideoDrawQuad.h (from rev 120456, trunk/Source/WebCore/platform/graphics/chromium/cc/CCVideoDrawQuad.h) (0 => 120457)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCYUVVideoDrawQuad.h	                        (rev 0)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCYUVVideoDrawQuad.h	2012-06-15 14:34:29 UTC (rev 120457)
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef CCYUVVideoDrawQuad_h
+#define CCYUVVideoDrawQuad_h
+
+#include "cc/CCDrawQuad.h"
+#include "cc/CCVideoLayerImpl.h"
+#include <wtf/PassOwnPtr.h>
+
+namespace WebCore {
+
+class CCYUVVideoDrawQuad : public CCDrawQuad {
+    WTF_MAKE_NONCOPYABLE(CCYUVVideoDrawQuad);
+public:
+    static PassOwnPtr<CCYUVVideoDrawQuad> create(const CCSharedQuadState*, const IntRect&, const CCVideoLayerImpl::FramePlane& yPlane, const CCVideoLayerImpl::FramePlane& uPlane, const CCVideoLayerImpl::FramePlane& vPlane);
+
+    const CCVideoLayerImpl::FramePlane& yPlane() const { return m_yPlane; }
+    const CCVideoLayerImpl::FramePlane& uPlane() const { return m_uPlane; }
+    const CCVideoLayerImpl::FramePlane& vPlane() const { return m_vPlane; }
+
+private:
+    CCYUVVideoDrawQuad(const CCSharedQuadState*, const IntRect&, const CCVideoLayerImpl::FramePlane& yPlane, const CCVideoLayerImpl::FramePlane& uPlane, const CCVideoLayerImpl::FramePlane& vPlane);
+
+    CCVideoLayerImpl::FramePlane m_yPlane;
+    CCVideoLayerImpl::FramePlane m_uPlane;
+    CCVideoLayerImpl::FramePlane m_vPlane;
+};
+
+}
+
+#endif

Property changes: trunk/Source/WebCore/platform/graphics/chromium/cc/CCYUVVideoDrawQuad.h


Added: svn:eol-style

_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to