Title: [91584] trunk/Source
Revision
91584
Author
scher...@chromium.org
Date
2011-07-22 12:07:41 -0700 (Fri, 22 Jul 2011)

Log Message

Remove surfaceType() and texture() methods from Chromium video frame classes.
https://bugs.webkit.org/show_bug.cgi?id=64818

Reviewed by Kenneth Russell.

Source/WebCore:

No tests as code was never being executed.

* platform/graphics/chromium/VideoFrameChromium.h:
* platform/graphics/chromium/VideoLayerChromium.cpp:
(WebCore::VideoLayerChromium::updateCompositorResources):
* platform/graphics/chromium/VideoLayerChromium.h:

Source/WebKit/chromium:

* public/WebVideoFrame.h:
* src/AssertMatchingEnums.cpp:
* src/VideoFrameChromiumImpl.cpp:
* src/VideoFrameChromiumImpl.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (91583 => 91584)


--- trunk/Source/WebCore/ChangeLog	2011-07-22 19:01:56 UTC (rev 91583)
+++ trunk/Source/WebCore/ChangeLog	2011-07-22 19:07:41 UTC (rev 91584)
@@ -1,3 +1,17 @@
+2011-07-22  Andrew Scherkus  <scher...@chromium.org>
+
+        Remove surfaceType() and texture() methods from Chromium video frame classes.
+        https://bugs.webkit.org/show_bug.cgi?id=64818
+
+        Reviewed by Kenneth Russell.
+
+        No tests as code was never being executed.
+
+        * platform/graphics/chromium/VideoFrameChromium.h:
+        * platform/graphics/chromium/VideoLayerChromium.cpp:
+        (WebCore::VideoLayerChromium::updateCompositorResources):
+        * platform/graphics/chromium/VideoLayerChromium.h:
+
 2011-07-22  Nate Chapin  <jap...@chromium.org>
 
         Don't treat child frame loads as back-forward navigations

Modified: trunk/Source/WebCore/platform/graphics/chromium/VideoFrameChromium.h (91583 => 91584)


--- trunk/Source/WebCore/platform/graphics/chromium/VideoFrameChromium.h	2011-07-22 19:01:56 UTC (rev 91583)
+++ trunk/Source/WebCore/platform/graphics/chromium/VideoFrameChromium.h	2011-07-22 19:07:41 UTC (rev 91584)
@@ -61,13 +61,7 @@
         ASCII,
     };
 
-    enum SurfaceType {
-        TypeSystemMemory,
-        TypeTexture,
-    };
-
     virtual ~VideoFrameChromium();
-    virtual SurfaceType surfaceType() const = 0;
     virtual Format format() const = 0;
     virtual unsigned width() const = 0;
     virtual unsigned width(unsigned plane) const = 0;
@@ -76,7 +70,6 @@
     virtual unsigned planes() const = 0;
     virtual int stride(unsigned plane) const = 0;
     virtual const void* data(unsigned plane) const = 0;
-    virtual unsigned texture(unsigned plane) const = 0;
     virtual const IntSize requiredTextureSize(unsigned plane) const = 0;
     virtual bool hasPaddingBytes(unsigned plane) const = 0;
 };

Modified: trunk/Source/WebCore/platform/graphics/chromium/VideoLayerChromium.cpp (91583 => 91584)


--- trunk/Source/WebCore/platform/graphics/chromium/VideoLayerChromium.cpp	2011-07-22 19:01:56 UTC (rev 91583)
+++ trunk/Source/WebCore/platform/graphics/chromium/VideoLayerChromium.cpp	2011-07-22 19:07:41 UTC (rev 91584)
@@ -123,17 +123,6 @@
         return;
     }
 
-    // If the incoming frame is backed by a texture (i.e. decoded in hardware),
-    // then we do not need to allocate a texture via the layer renderer. Instead
-    // we save the texture data then exit.
-    if (frame->surfaceType() == VideoFrameChromium::TypeTexture) {
-        releaseCurrentFrame();
-        saveCurrentFrame(frame);
-        m_dirtyRect.setSize(FloatSize());
-        m_contentsDirty = false;
-        return;
-    }
-
     // Allocate textures for planes if they are not allocated already, or
     // reallocate textures that are the wrong size for the frame.
     GraphicsContext3D* context = layerRendererContext();
@@ -282,20 +271,6 @@
     }
 }
 
-void VideoLayerChromium::saveCurrentFrame(VideoFrameChromium* frame)
-{
-    ASSERT(!m_currentFrame);
-    deleteTexturesInUse();
-    m_currentFrame = frame;
-    for (unsigned plane = 0; plane < frame->planes(); plane++) {
-        m_textures[plane].id = frame->texture(plane);
-        m_textures[plane].size = frame->requiredTextureSize(plane);
-        m_textures[plane].visibleSize = computeVisibleSize(frame, plane);
-        m_textures[plane].ownedByLayerRenderer = false;
-        m_textures[plane].isEmpty = false;
-    }
-}
-
 } // namespace WebCore
 
 #endif // USE(ACCELERATED_COMPOSITING)

Modified: trunk/Source/WebCore/platform/graphics/chromium/VideoLayerChromium.h (91583 => 91584)


--- trunk/Source/WebCore/platform/graphics/chromium/VideoLayerChromium.h	2011-07-22 19:01:56 UTC (rev 91583)
+++ trunk/Source/WebCore/platform/graphics/chromium/VideoLayerChromium.h	2011-07-22 19:07:41 UTC (rev 91584)
@@ -82,7 +82,6 @@
     void updateTexture(GraphicsContext3D*, unsigned textureId, const IntSize& dimensions, unsigned textureFormat, const void* data) const;
 
     void resetFrameParameters();
-    void saveCurrentFrame(VideoFrameChromium*);
 
     bool m_skipsDraw;
     VideoFrameChromium::Format m_frameFormat;

Modified: trunk/Source/WebKit/chromium/ChangeLog (91583 => 91584)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-07-22 19:01:56 UTC (rev 91583)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-07-22 19:07:41 UTC (rev 91584)
@@ -1,3 +1,15 @@
+2011-07-22  Andrew Scherkus  <scher...@chromium.org>
+
+        Remove surfaceType() and texture() methods from Chromium video frame classes.
+        https://bugs.webkit.org/show_bug.cgi?id=64818
+
+        Reviewed by Kenneth Russell.
+
+        * public/WebVideoFrame.h:
+        * src/AssertMatchingEnums.cpp:
+        * src/VideoFrameChromiumImpl.cpp:
+        * src/VideoFrameChromiumImpl.h:
+
 2011-07-22  Ryosuke Niwa  <rn...@webkit.org>
 
         Unreviewed.  Rolled DEPS.

Modified: trunk/Source/WebKit/chromium/public/WebVideoFrame.h (91583 => 91584)


--- trunk/Source/WebKit/chromium/public/WebVideoFrame.h	2011-07-22 19:01:56 UTC (rev 91583)
+++ trunk/Source/WebKit/chromium/public/WebVideoFrame.h	2011-07-22 19:07:41 UTC (rev 91584)
@@ -51,20 +51,19 @@
         FormatASCII,
     };
 
+    // FIXME: delete once Chromium has updated to remove references.
     enum SurfaceType {
         SurfaceTypeSystemMemory,
         SurfaceTypeTexture,
     };
 
     virtual ~WebVideoFrame() { }
-    virtual SurfaceType surfaceType() const = 0;
     virtual Format format() const = 0;
     virtual unsigned width() const = 0;
     virtual unsigned height() const = 0;
     virtual unsigned planes() const = 0;
     virtual int stride(unsigned plane) const = 0;
     virtual const void* data(unsigned plane) const = 0;
-    virtual unsigned texture(unsigned plane) const = 0;
 };
 
 } // namespace WebKit

Modified: trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp (91583 => 91584)


--- trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp	2011-07-22 19:01:56 UTC (rev 91583)
+++ trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp	2011-07-22 19:07:41 UTC (rev 91584)
@@ -356,9 +356,6 @@
 COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatNV12, VideoFrameChromium::NV12);
 COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatEmpty, VideoFrameChromium::Empty);
 COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatASCII, VideoFrameChromium::ASCII);
-
-COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::SurfaceTypeSystemMemory, VideoFrameChromium::TypeSystemMemory);
-COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::SurfaceTypeTexture, VideoFrameChromium::TypeTexture);
 #endif
 
 #if ENABLE(NOTIFICATIONS)

Modified: trunk/Source/WebKit/chromium/src/VideoFrameChromiumImpl.cpp (91583 => 91584)


--- trunk/Source/WebKit/chromium/src/VideoFrameChromiumImpl.cpp	2011-07-22 19:01:56 UTC (rev 91583)
+++ trunk/Source/WebKit/chromium/src/VideoFrameChromiumImpl.cpp	2011-07-22 19:07:41 UTC (rev 91584)
@@ -51,13 +51,6 @@
 {
 }
 
-VideoFrameChromium::SurfaceType VideoFrameChromiumImpl::surfaceType() const
-{
-    if (m_webVideoFrame)
-        return static_cast<VideoFrameChromium::SurfaceType>(m_webVideoFrame->surfaceType());
-    return TypeSystemMemory;
-}
-
 VideoFrameChromium::Format VideoFrameChromiumImpl::format() const
 {
     if (m_webVideoFrame)
@@ -116,13 +109,6 @@
     return 0;
 }
 
-unsigned VideoFrameChromiumImpl::texture(unsigned plane) const
-{
-    if (m_webVideoFrame)
-        return m_webVideoFrame->texture(plane);
-    return 0;
-}
-
 const IntSize VideoFrameChromiumImpl::requiredTextureSize(unsigned plane) const
 {
     return IntSize(stride(plane), height(plane));

Modified: trunk/Source/WebKit/chromium/src/VideoFrameChromiumImpl.h (91583 => 91584)


--- trunk/Source/WebKit/chromium/src/VideoFrameChromiumImpl.h	2011-07-22 19:01:56 UTC (rev 91583)
+++ trunk/Source/WebKit/chromium/src/VideoFrameChromiumImpl.h	2011-07-22 19:07:41 UTC (rev 91584)
@@ -47,7 +47,6 @@
     // The VideoFrameChromiumImpl does not take ownership of the WebVideoFrame
     // and should not free the frame's memory.
     VideoFrameChromiumImpl(WebVideoFrame*);
-    virtual SurfaceType surfaceType() const;
     virtual Format format() const;
     virtual unsigned width() const;
     virtual unsigned width(unsigned plane) const;
@@ -56,7 +55,6 @@
     virtual unsigned planes() const;
     virtual int stride(unsigned plane) const;
     virtual const void* data(unsigned plane) const;
-    virtual unsigned texture(unsigned plane) const;
     virtual const WebCore::IntSize requiredTextureSize(unsigned plane) const;
     virtual bool hasPaddingBytes(unsigned plane) const;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to