[chromium] Move ubercomp quads back into CC
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Aug 2012 16:25:58 +0000 (16:25 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Aug 2012 16:25:58 +0000 (16:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=93062

Patch by Alexandre Elias <aelias@google.com> on 2012-08-03
Reviewed by James Robinson.

Because GTFO is almost done, we can move back the quad types
to CC and pickle them there.  This patch moves everything back
to where it was before and changes types like WebRect to IntRect.

As a bonus, I also added CCRenderPassDrawQuad and CCYUVVideoDrawQuad
(which had been left in the CC files) to CCDrawQuad::size(), so now
every quad type is ready for serialization.

Source/Platform:

* Platform.gypi:
* chromium/public/WebCompositorCheckerboardQuad.h: Removed.
* chromium/public/WebCompositorDebugBorderQuad.h: Removed.
* chromium/public/WebCompositorIOSurfaceQuad.h: Removed.
* chromium/public/WebCompositorQuad.h: Removed.
* chromium/public/WebCompositorSharedQuadState.h: Removed.
* chromium/public/WebCompositorSolidColorQuad.h: Removed.
* chromium/public/WebCompositorStreamVideoQuad.h: Removed.
* chromium/public/WebCompositorTextureQuad.h: Removed.
* chromium/public/WebCompositorTileQuad.h: Removed.

Source/WebCore:

No new tests (no-op refactoring).

* WebCore.gypi:
* platform/chromium/support/WebCompositorStreamVideoQuad.cpp: Removed.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawQuad):
* platform/graphics/chromium/cc/CCCheckerboardDrawQuad.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCQuadSink.h.
(WebCore):
(WebCore::CCCheckerboardDrawQuad::create):
(WebCore::CCCheckerboardDrawQuad::CCCheckerboardDrawQuad):
(WebCore::CCCheckerboardDrawQuad::materialCast):
* platform/graphics/chromium/cc/CCCheckerboardDrawQuad.h:
(WebCore):
(CCCheckerboardDrawQuad):
* platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorDebugBorderQuad.cpp.
(WebCore):
(WebCore::CCDebugBorderDrawQuad::create):
(WebCore::CCDebugBorderDrawQuad::CCDebugBorderDrawQuad):
(WebCore::CCDebugBorderDrawQuad::materialCast):
* platform/graphics/chromium/cc/CCDebugBorderDrawQuad.h:
(WebCore):
(CCDebugBorderDrawQuad):
(WebCore::CCDebugBorderDrawQuad::color):
(WebCore::CCDebugBorderDrawQuad::width):
* platform/graphics/chromium/cc/CCDrawQuad.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorQuad.cpp.
(WebCore):
(WebCore::CCDrawQuad::CCDrawQuad):
(WebCore::CCDrawQuad::opaqueRect):
(WebCore::CCDrawQuad::setQuadVisibleRect):
(WebCore::CCDrawQuad::size):
(WebCore::CCDrawQuad::setSharedQuadState):
* platform/graphics/chromium/cc/CCDrawQuad.h:
(WebCore):
(CCDrawQuad):
(WebCore::CCDrawQuad::quadRect):
(WebCore::CCDrawQuad::quadTransform):
(WebCore::CCDrawQuad::visibleContentRect):
(WebCore::CCDrawQuad::scissorRect):
(WebCore::CCDrawQuad::opacity):
(WebCore::CCDrawQuad::needsBlending):
(WebCore::CCDrawQuad::isLayerAxisAlignedIntRect):
(WebCore::CCDrawQuad::quadVisibleRect):
(WebCore::CCDrawQuad::isDebugQuad):
(WebCore::CCDrawQuad::material):
(WebCore::CCDrawQuad::sharedQuadState):
(WebCore::CCDrawQuad::sharedQuadStateId):
* platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.cpp:
(WebCore::CCHeadsUpDisplayLayerImpl::appendQuads):
* platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorIOSurfaceQuad.cpp.
(WebCore):
(WebCore::CCIOSurfaceDrawQuad::create):
(WebCore::CCIOSurfaceDrawQuad::CCIOSurfaceDrawQuad):
(WebCore::CCIOSurfaceDrawQuad::materialCast):
* platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.h:
(WebCore):
(CCIOSurfaceDrawQuad):
(WebCore::CCIOSurfaceDrawQuad::ioSurfaceSize):
(WebCore::CCIOSurfaceDrawQuad::ioSurfaceTextureId):
(WebCore::CCIOSurfaceDrawQuad::orientation):
* platform/graphics/chromium/cc/CCQuadCuller.h:
(CCQuadCuller):
* platform/graphics/chromium/cc/CCQuadSink.h:
(WebCore):
(CCQuadSink):
* platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
(WebCore::CCRenderPassDrawQuad::create):
(WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
(WebCore::CCRenderPassDrawQuad::materialCast):
* platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
(CCRenderPassDrawQuad):
* platform/graphics/chromium/cc/CCSharedQuadState.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorSharedQuadState.cpp.
(WebCore):
(WebCore::CCSharedQuadState::CCSharedQuadState):
(WebCore::CCSharedQuadState::create):
(WebCore::CCSharedQuadState::isLayerAxisAlignedIntRect):
* platform/graphics/chromium/cc/CCSharedQuadState.h:
(WebCore):
(CCSharedQuadState):
* platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorSolidColorQuad.cpp.
(WebCore):
(WebCore::CCSolidColorDrawQuad::create):
(WebCore::CCSolidColorDrawQuad::CCSolidColorDrawQuad):
(WebCore::CCSolidColorDrawQuad::materialCast):
* platform/graphics/chromium/cc/CCSolidColorDrawQuad.h:
(WebCore):
(CCSolidColorDrawQuad):
(WebCore::CCSolidColorDrawQuad::color):
* platform/graphics/chromium/cc/CCStreamVideoDrawQuad.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorCheckerboardQuad.cpp.
(WebCore):
(WebCore::CCStreamVideoDrawQuad::create):
(WebCore::CCStreamVideoDrawQuad::CCStreamVideoDrawQuad):
(WebCore::CCStreamVideoDrawQuad::materialCast):
* platform/graphics/chromium/cc/CCStreamVideoDrawQuad.h:
(WebCore):
(CCStreamVideoDrawQuad):
(WebCore::CCStreamVideoDrawQuad::textureId):
(WebCore::CCStreamVideoDrawQuad::matrix):
* platform/graphics/chromium/cc/CCTextureDrawQuad.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorTextureQuad.cpp.
(WebCore):
(WebCore::CCTextureDrawQuad::create):
(WebCore::CCTextureDrawQuad::CCTextureDrawQuad):
(WebCore::CCTextureDrawQuad::setNeedsBlending):
(WebCore::CCTextureDrawQuad::materialCast):
* platform/graphics/chromium/cc/CCTextureDrawQuad.h:
(WebCore):
(CCTextureDrawQuad):
(WebCore::CCTextureDrawQuad::uvRect):
(WebCore::CCTextureDrawQuad::resourceId):
(WebCore::CCTextureDrawQuad::premultipliedAlpha):
(WebCore::CCTextureDrawQuad::flipped):
* platform/graphics/chromium/cc/CCTileDrawQuad.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorTileQuad.cpp.
(WebCore):
(WebCore::CCTileDrawQuad::create):
(WebCore::CCTileDrawQuad::CCTileDrawQuad):
(WebCore::CCTileDrawQuad::materialCast):
* platform/graphics/chromium/cc/CCTileDrawQuad.h:
(WebCore):
(CCTileDrawQuad):
(WebCore::CCTileDrawQuad::resourceId):
(WebCore::CCTileDrawQuad::textureOffset):
(WebCore::CCTileDrawQuad::textureSize):
(WebCore::CCTileDrawQuad::textureFilter):
(WebCore::CCTileDrawQuad::swizzleContents):
(WebCore::CCTileDrawQuad::leftEdgeAA):
(WebCore::CCTileDrawQuad::topEdgeAA):
(WebCore::CCTileDrawQuad::rightEdgeAA):
(WebCore::CCTileDrawQuad::bottomEdgeAA):
(WebCore::CCTileDrawQuad::isAntialiased):
* platform/graphics/chromium/cc/CCYUVVideoDrawQuad.cpp:
(WebCore::CCYUVVideoDrawQuad::create):
(WebCore::CCYUVVideoDrawQuad::CCYUVVideoDrawQuad):
(WebCore::CCYUVVideoDrawQuad::materialCast):
* platform/graphics/chromium/cc/CCYUVVideoDrawQuad.h:
(CCYUVVideoDrawQuad):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@124621 268f45cc-cd09-0410-ab3c-d52691b4dbfc

39 files changed:
Source/Platform/ChangeLog
Source/Platform/Platform.gypi
Source/Platform/chromium/public/WebCompositorDebugBorderQuad.h [deleted file]
Source/Platform/chromium/public/WebCompositorIOSurfaceQuad.h [deleted file]
Source/Platform/chromium/public/WebCompositorQuad.h [deleted file]
Source/Platform/chromium/public/WebCompositorSharedQuadState.h [deleted file]
Source/Platform/chromium/public/WebCompositorSolidColorQuad.h [deleted file]
Source/Platform/chromium/public/WebCompositorStreamVideoQuad.h [deleted file]
Source/Platform/chromium/public/WebCompositorTextureQuad.h [deleted file]
Source/Platform/chromium/public/WebCompositorTileQuad.h [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/WebCore.gypi
Source/WebCore/platform/chromium/support/WebCompositorStreamVideoQuad.cpp [deleted file]
Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
Source/WebCore/platform/graphics/chromium/cc/CCCheckerboardDrawQuad.cpp [moved from Source/Platform/chromium/public/WebCompositorCheckerboardQuad.h with 66% similarity]
Source/WebCore/platform/graphics/chromium/cc/CCCheckerboardDrawQuad.h
Source/WebCore/platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp [moved from Source/WebCore/platform/chromium/support/WebCompositorDebugBorderQuad.cpp with 63% similarity]
Source/WebCore/platform/graphics/chromium/cc/CCDebugBorderDrawQuad.h
Source/WebCore/platform/graphics/chromium/cc/CCDrawQuad.cpp [moved from Source/WebCore/platform/chromium/support/WebCompositorQuad.cpp with 66% similarity]
Source/WebCore/platform/graphics/chromium/cc/CCDrawQuad.h
Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.cpp
Source/WebCore/platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.cpp [moved from Source/WebCore/platform/chromium/support/WebCompositorIOSurfaceQuad.cpp with 60% similarity]
Source/WebCore/platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.h
Source/WebCore/platform/graphics/chromium/cc/CCQuadCuller.h
Source/WebCore/platform/graphics/chromium/cc/CCQuadSink.h
Source/WebCore/platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp
Source/WebCore/platform/graphics/chromium/cc/CCRenderPassDrawQuad.h
Source/WebCore/platform/graphics/chromium/cc/CCSharedQuadState.cpp [moved from Source/WebCore/platform/chromium/support/WebCompositorSharedQuadState.cpp with 65% similarity]
Source/WebCore/platform/graphics/chromium/cc/CCSharedQuadState.h
Source/WebCore/platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp [moved from Source/WebCore/platform/chromium/support/WebCompositorSolidColorQuad.cpp with 64% similarity]
Source/WebCore/platform/graphics/chromium/cc/CCSolidColorDrawQuad.h
Source/WebCore/platform/graphics/chromium/cc/CCStreamVideoDrawQuad.cpp [moved from Source/WebCore/platform/chromium/support/WebCompositorCheckerboardQuad.cpp with 61% similarity]
Source/WebCore/platform/graphics/chromium/cc/CCStreamVideoDrawQuad.h
Source/WebCore/platform/graphics/chromium/cc/CCTextureDrawQuad.cpp [moved from Source/WebCore/platform/chromium/support/WebCompositorTextureQuad.cpp with 59% similarity]
Source/WebCore/platform/graphics/chromium/cc/CCTextureDrawQuad.h
Source/WebCore/platform/graphics/chromium/cc/CCTileDrawQuad.cpp [moved from Source/WebCore/platform/chromium/support/WebCompositorTileQuad.cpp with 57% similarity]
Source/WebCore/platform/graphics/chromium/cc/CCTileDrawQuad.h
Source/WebCore/platform/graphics/chromium/cc/CCYUVVideoDrawQuad.cpp
Source/WebCore/platform/graphics/chromium/cc/CCYUVVideoDrawQuad.h

index 5c3fbf1..484fa4e 100644 (file)
@@ -1,3 +1,29 @@
+2012-08-03  Alexandre Elias  <aelias@google.com>
+
+        [chromium] Move ubercomp quads back into CC
+        https://bugs.webkit.org/show_bug.cgi?id=93062
+
+        Reviewed by James Robinson.
+
+        Because GTFO is almost done, we can move back the quad types
+        to CC and pickle them there.  This patch moves everything back
+        to where it was before and changes types like WebRect to IntRect.
+
+        As a bonus, I also added CCRenderPassDrawQuad and CCYUVVideoDrawQuad
+        (which had been left in the CC files) to CCDrawQuad::size(), so now
+        every quad type is ready for serialization.
+
+        * Platform.gypi:
+        * chromium/public/WebCompositorCheckerboardQuad.h: Removed.
+        * chromium/public/WebCompositorDebugBorderQuad.h: Removed.
+        * chromium/public/WebCompositorIOSurfaceQuad.h: Removed.
+        * chromium/public/WebCompositorQuad.h: Removed.
+        * chromium/public/WebCompositorSharedQuadState.h: Removed.
+        * chromium/public/WebCompositorSolidColorQuad.h: Removed.
+        * chromium/public/WebCompositorStreamVideoQuad.h: Removed.
+        * chromium/public/WebCompositorTextureQuad.h: Removed.
+        * chromium/public/WebCompositorTileQuad.h: Removed.
+
 2012-08-02  Alexandre Elias  <aelias@google.com>
 
         [chromium] deviceViewportSize cleanup
index c3af963..81be110 100644 (file)
             'chromium/public/WebClipboard.h',
             'chromium/public/WebColor.h',
             'chromium/public/WebCommon.h',
-            'chromium/public/WebCompositorCheckerboardQuad.h',
-            'chromium/public/WebCompositorDebugBorderQuad.h',
-            'chromium/public/WebCompositorIOSurfaceQuad.h',
-            'chromium/public/WebCompositorQuad.h',
-            'chromium/public/WebCompositorSharedQuadState.h',
-            'chromium/public/WebCompositorSolidColorQuad.h',
-            'chromium/public/WebCompositorStreamVideoQuad.h',
-            'chromium/public/WebCompositorTextureQuad.h',
-            'chromium/public/WebCompositorTileQuad.h',
             'chromium/public/WebContentLayer.h',
             'chromium/public/WebContentLayerClient.h',
             'chromium/public/WebCookie.h',
diff --git a/Source/Platform/chromium/public/WebCompositorDebugBorderQuad.h b/Source/Platform/chromium/public/WebCompositorDebugBorderQuad.h
deleted file mode 100644 (file)
index 1fcfd4b..0000000
+++ /dev/null
@@ -1,62 +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 WebCompositorDebugBorderQuad_h
-#define WebCompositorDebugBorderQuad_h
-
-#include "SkColor.h"
-#include "WebCompositorQuad.h"
-#if WEBKIT_IMPLEMENTATION
-#include <wtf/PassOwnPtr.h>
-#endif
-
-namespace WebKit {
-
-#pragma pack(push, 4)
-
-class WebCompositorDebugBorderQuad : public WebCompositorQuad {
-public:
-#if WEBKIT_IMPLEMENTATION
-    static PassOwnPtr<WebCompositorDebugBorderQuad> create(const WebCompositorSharedQuadState*, const WebCore::IntRect&, SkColor, int width);
-#endif
-
-    SkColor color() const { return m_color; };
-    int width() const { return m_width; }
-
-    static const WebCompositorDebugBorderQuad* materialCast(const WebCompositorQuad*);
-private:
-#if WEBKIT_IMPLEMENTATION
-    WebCompositorDebugBorderQuad(const WebCompositorSharedQuadState*, const WebCore::IntRect&, SkColor, int width);
-#endif
-
-    SkColor m_color;
-    int m_width;
-};
-
-#pragma pack(pop)
-
-}
-
-#endif
diff --git a/Source/Platform/chromium/public/WebCompositorIOSurfaceQuad.h b/Source/Platform/chromium/public/WebCompositorIOSurfaceQuad.h
deleted file mode 100644 (file)
index e850e06..0000000
+++ /dev/null
@@ -1,67 +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 WebCompositorIOSurfaceQuad_h
-#define WebCompositorIOSurfaceQuad_h
-
-#include "WebCompositorQuad.h"
-#include "WebSize.h"
-#include <wtf/PassOwnPtr.h>
-
-namespace WebKit {
-
-#pragma pack(push, 4)
-
-class WebCompositorIOSurfaceQuad : public WebCompositorQuad {
-public:
-#if WEBKIT_IMPLEMENTATION
-    enum Orientation {
-      Flipped,
-      Unflipped
-    };
-
-    static PassOwnPtr<WebCompositorIOSurfaceQuad> create(const WebCompositorSharedQuadState*, const WebCore::IntRect&, const WebCore::IntSize& ioSurfaceSize, unsigned ioSurfaceTextureId, Orientation);
-
-    WebCore::IntSize ioSurfaceSize() const { return m_ioSurfaceSize; }
-    unsigned ioSurfaceTextureId() const { return m_ioSurfaceTextureId; }
-    Orientation orientation() const { return m_orientation; }
-#endif
-
-    static const WebCompositorIOSurfaceQuad* materialCast(const WebCompositorQuad*);
-private:
-#if WEBKIT_IMPLEMENTATION
-    WebCompositorIOSurfaceQuad(const WebCompositorSharedQuadState*, const WebCore::IntRect&, const WebCore::IntSize& ioSurfaceSize, unsigned ioSurfaceTextureId, Orientation);
-#endif
-
-    WebSize m_ioSurfaceSize;
-    unsigned m_ioSurfaceTextureId;
-    Orientation m_orientation;
-};
-
-#pragma pack(pop)
-
-}
-
-#endif
diff --git a/Source/Platform/chromium/public/WebCompositorQuad.h b/Source/Platform/chromium/public/WebCompositorQuad.h
deleted file mode 100644 (file)
index 68027fc..0000000
+++ /dev/null
@@ -1,121 +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 WebCompositorQuad_h
-#define WebCompositorQuad_h
-
-#include "WebCommon.h"
-#include "WebCompositorSharedQuadState.h"
-
-namespace WebKit {
-
-// WARNING! All WebCompositorXYZQuad classes must remain PODs (plain old data).
-// They are intended to be "serializable" by copying their raw bytes, so they
-// must not contain any non-bit-copyable member variables!
-//
-// Furthermore, the class members need to be packed so they are aligned
-// properly and don't have paddings/gaps, otherwise memory check tools
-// like Valgrind will complain about uninitialized memory usage when
-// transferring these classes over the wire.
-#pragma pack(push, 4)
-
-// WebCompositorQuad 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
-// from WebCompositorQuad store additional data in their derived instance. The Material
-// enum is used to "safely" downcast to the derived class.
-class WebCompositorQuad {
-public:
-    enum Material {
-        Invalid,
-        Checkerboard,
-        DebugBorder,
-        IOSurfaceContent,
-        RenderPass,
-        TextureContent,
-        SolidColor,
-        TiledContent,
-        YUVVideoContent,
-        StreamVideoContent,
-    };
-
-#if WEBKIT_IMPLEMENTATION
-    WebCore::IntRect quadRect() const { return m_quadRect; }
-    const WebTransformationMatrix& quadTransform() const { return m_sharedQuadState->quadTransform; }
-    WebCore::IntRect visibleContentRect() const { return m_sharedQuadState->visibleContentRect; }
-    WebCore::IntRect scissorRect() const { return m_sharedQuadState->scissorRect; }
-    float opacity() const { return m_sharedQuadState->opacity; }
-    // For the purposes of blending, what part of the contents of this quad are opaque?
-    WebCore::IntRect opaqueRect() const;
-    bool needsBlending() const { return m_needsBlending || !opaqueRect().contains(m_quadVisibleRect); }
-    bool isLayerAxisAlignedIntRect() const { return m_sharedQuadState->isLayerAxisAlignedIntRect(); }
-
-    // Allows changing the rect that gets drawn to make it smaller. Parameter passed
-    // in will be clipped to quadRect().
-    void setQuadVisibleRect(const WebCore::IntRect&);
-    WebCore::IntRect quadVisibleRect() const { return m_quadVisibleRect; }
-    bool isDebugQuad() const { return m_material == DebugBorder; }
-#endif
-
-    Material material() const { return m_material; }
-
-    // Returns transfer size of this object based on the derived class (by
-    // looking at the material type).
-    unsigned size() const;
-
-    const WebCompositorSharedQuadState* sharedQuadState() const { return m_sharedQuadState; }
-    int sharedQuadStateId() const { return m_sharedQuadStateId; }
-    void setSharedQuadState(const WebCompositorSharedQuadState*);
-
-protected:
-#if WEBKIT_IMPLEMENTATION
-    WebCompositorQuad(const WebCompositorSharedQuadState*, Material, const WebCore::IntRect&);
-#endif
-
-    // Stores state common to a large bundle of quads; kept separate for memory
-    // efficiency. There is special treatment to reconstruct these pointers
-    // during serialization.
-    const WebCompositorSharedQuadState* m_sharedQuadState;
-    int m_sharedQuadStateId;
-
-    Material m_material;
-    WebRect m_quadRect;
-    WebRect m_quadVisibleRect;
-
-    // By default, the shared quad state determines whether or not this quad is
-    // opaque or needs blending. Derived classes can override with these
-    // variables.
-    bool m_quadOpaque;
-    bool m_needsBlending;
-
-    // Be default, this rect is empty. It is used when the shared quad state and above
-    // variables determine that the quad is not fully opaque but may be partially opaque.
-    WebRect m_opaqueRect;
-};
-
-#pragma pack(pop)
-
-}
-
-#endif
diff --git a/Source/Platform/chromium/public/WebCompositorSharedQuadState.h b/Source/Platform/chromium/public/WebCompositorSharedQuadState.h
deleted file mode 100644 (file)
index 063d407..0000000
+++ /dev/null
@@ -1,64 +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 WebCompositorSharedQuadState_h
-#define WebCompositorSharedQuadState_h
-
-#include "WebCommon.h"
-
-#if WEBKIT_IMPLEMENTATION
-#include "IntRect.h"
-#include <wtf/PassOwnPtr.h>
-#endif
-#include "WebRect.h"
-#include "WebTransformationMatrix.h"
-
-namespace WebKit {
-
-class WebCompositorSharedQuadState {
-public:
-    int id;
-
-    // Transforms from quad's original content space to its target content space.
-    WebTransformationMatrix quadTransform;
-    // This rect lives in the content space for the quad's originating layer.
-    WebRect visibleContentRect;
-    // This rect lives in the quad's target content space.
-    WebRect scissorRect;
-    float opacity;
-    bool opaque;
-
-    WebCompositorSharedQuadState();
-
-#if WEBKIT_IMPLEMENTATION
-    static PassOwnPtr<WebCompositorSharedQuadState> create(int id, const WebTransformationMatrix& quadTransform, const WebCore::IntRect& visibleContentRect, const WebCore::IntRect& scissorRect, float opacity, bool opaque);
-    WebCompositorSharedQuadState(int id, const WebTransformationMatrix& quadTransform, const WebCore::IntRect& visibleContentRect, const WebCore::IntRect& scissorRect, float opacity, bool opaque);
-    bool isLayerAxisAlignedIntRect() const;
-#endif
-};
-
-}
-
-#endif
diff --git a/Source/Platform/chromium/public/WebCompositorSolidColorQuad.h b/Source/Platform/chromium/public/WebCompositorSolidColorQuad.h
deleted file mode 100644 (file)
index f31210e..0000000
+++ /dev/null
@@ -1,60 +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 WebCompositorSolidColorQuad_h
-#define WebCompositorSolidColorQuad_h
-
-#include "SkColor.h"
-#include "WebCompositorQuad.h"
-#if WEBKIT_IMPLEMENTATION
-#include <wtf/PassOwnPtr.h>
-#endif
-
-namespace WebKit {
-
-#pragma pack(push, 4)
-
-class WebCompositorSolidColorQuad : public WebCompositorQuad {
-public:
-#if WEBKIT_IMPLEMENTATION
-    static PassOwnPtr<WebCompositorSolidColorQuad> create(const WebCompositorSharedQuadState*, const WebCore::IntRect&, SkColor);
-#endif
-
-    SkColor color() const { return m_color; };
-
-    static const WebCompositorSolidColorQuad* materialCast(const WebCompositorQuad*);
-private:
-#if WEBKIT_IMPLEMENTATION
-    WebCompositorSolidColorQuad(const WebCompositorSharedQuadState*, const WebCore::IntRect&, SkColor);
-#endif
-
-    SkColor m_color;
-};
-
-#pragma pack(pop)
-
-}
-
-#endif
diff --git a/Source/Platform/chromium/public/WebCompositorStreamVideoQuad.h b/Source/Platform/chromium/public/WebCompositorStreamVideoQuad.h
deleted file mode 100644 (file)
index 36a3cea..0000000
+++ /dev/null
@@ -1,62 +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 WebCompositorStreamVideoQuad_h
-#define WebCompositorStreamVideoQuad_h
-
-#include "WebCompositorQuad.h"
-#include <public/WebTransformationMatrix.h>
-#if WEBKIT_IMPLEMENTATION
-#include <wtf/PassOwnPtr.h>
-#endif
-
-namespace WebKit {
-
-#pragma pack(push, 4)
-
-class WebCompositorStreamVideoQuad : public WebCompositorQuad {
-public:
-#if WEBKIT_IMPLEMENTATION
-    static PassOwnPtr<WebCompositorStreamVideoQuad> create(const WebCompositorSharedQuadState*, const WebCore::IntRect&, unsigned textureId, const WebTransformationMatrix&);
-#endif
-
-    unsigned textureId() const { return m_textureId; }
-    const WebTransformationMatrix& matrix() const { return m_matrix; }
-
-    static const WebCompositorStreamVideoQuad* materialCast(const WebCompositorQuad*);
-private:
-#if WEBKIT_IMPLEMENTATION
-    WebCompositorStreamVideoQuad(const WebCompositorSharedQuadState*, const WebCore::IntRect&, unsigned textureId, const WebTransformationMatrix&);
-#endif
-
-    unsigned m_textureId;
-    WebTransformationMatrix m_matrix;
-};
-
-#pragma pack(pop)
-
-}
-
-#endif
diff --git a/Source/Platform/chromium/public/WebCompositorTextureQuad.h b/Source/Platform/chromium/public/WebCompositorTextureQuad.h
deleted file mode 100644 (file)
index 6b88695..0000000
+++ /dev/null
@@ -1,72 +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 WebCompositorTextureQuad_h
-#define WebCompositorTextureQuad_h
-
-#if WEBKIT_IMPLEMENTATION
-#include "FloatRect.h"
-#endif
-#include "WebCommon.h"
-#include "WebCompositorQuad.h"
-#include "WebFloatRect.h"
-#if WEBKIT_IMPLEMENTATION
-#include <wtf/PassOwnPtr.h>
-#endif
-
-namespace WebKit {
-
-#pragma pack(push, 4)
-
-class WebCompositorTextureQuad : public WebCompositorQuad {
-public:
-#if WEBKIT_IMPLEMENTATION
-    static PassOwnPtr<WebCompositorTextureQuad> create(const WebCompositorSharedQuadState*, const WebCore::IntRect&, unsigned resourceId, bool premultipliedAlpha, const WebCore::FloatRect& uvRect, bool flipped);
-    WebCore::FloatRect uvRect() const { return m_uvRect; }
-#endif
-
-    unsigned resourceId() const { return m_resourceId; }
-    bool premultipliedAlpha() const { return  m_premultipliedAlpha; }
-    bool flipped() const { return m_flipped; }
-
-    void setNeedsBlending();
-
-    static const WebCompositorTextureQuad* materialCast(const WebCompositorQuad*);
-private:
-#if WEBKIT_IMPLEMENTATION
-    WebCompositorTextureQuad(const WebKit::WebCompositorSharedQuadState*, const WebCore::IntRect&, unsigned resourceId, bool premultipliedAlpha, const WebCore::FloatRect& uvRect, bool flipped);
-#endif
-
-    unsigned m_resourceId;
-    bool m_premultipliedAlpha;
-    WebFloatRect m_uvRect;
-    bool m_flipped;
-};
-
-#pragma pack(pop)
-
-}
-
-#endif
diff --git a/Source/Platform/chromium/public/WebCompositorTileQuad.h b/Source/Platform/chromium/public/WebCompositorTileQuad.h
deleted file mode 100644 (file)
index e20de72..0000000
+++ /dev/null
@@ -1,79 +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 WebCompositorTileQuad_h
-#define WebCompositorTileQuad_h
-
-#include "GraphicsTypes3D.h"
-#include "WebCompositorQuad.h"
-#include "WebPoint.h"
-#include "WebSize.h"
-#include <wtf/PassOwnPtr.h>
-
-namespace WebKit {
-
-#pragma pack(push, 4)
-
-class WebCompositorTileQuad : public WebCompositorQuad {
-public:
-#if WEBKIT_IMPLEMENTATION
-    static PassOwnPtr<WebCompositorTileQuad> create(const WebCompositorSharedQuadState*, const WebCore::IntRect& quadRect, const WebCore::IntRect& opaqueRect, unsigned resourceId, const WebCore::IntPoint& textureOffset, const WebCore::IntSize& textureSize, GC3Dint textureFilter, bool swizzleContents, bool leftEdgeAA, bool topEdgeAA, bool rightEdgeAA, bool bottomEdgeAA);
-
-    unsigned resourceId() const { return m_resourceId; }
-    WebCore::IntPoint textureOffset() const { return m_textureOffset; }
-    WebCore::IntSize textureSize() const { return m_textureSize; }
-    GC3Dint textureFilter() const { return m_textureFilter; }
-    bool swizzleContents() const { return m_swizzleContents; }
-
-    bool leftEdgeAA() const { return m_leftEdgeAA; }
-    bool topEdgeAA() const { return m_topEdgeAA; }
-    bool rightEdgeAA() const { return m_rightEdgeAA; }
-    bool bottomEdgeAA() const { return m_bottomEdgeAA; }
-
-    bool isAntialiased() const { return leftEdgeAA() || topEdgeAA() || rightEdgeAA() || bottomEdgeAA(); }
-#endif
-
-    static const WebCompositorTileQuad* materialCast(const WebCompositorQuad*);
-private:
-#if WEBKIT_IMPLEMENTATION
-     WebCompositorTileQuad(const WebCompositorSharedQuadState*, const WebCore::IntRect& quadRect, const WebCore::IntRect& opaqueRect, unsigned resourceId, const WebCore::IntPoint& textureOffset, const WebCore::IntSize& textureSize, GC3Dint textureFilter, bool swizzleContents, bool leftEdgeAA, bool topEdgeAA, bool rightEdgeAA, bool bottomEdgeAA);
-#endif
-
-    unsigned m_resourceId;
-    WebPoint m_textureOffset;
-    WebSize m_textureSize;
-    GC3Dint m_textureFilter;
-    bool m_swizzleContents;
-    bool m_leftEdgeAA;
-    bool m_topEdgeAA;
-    bool m_rightEdgeAA;
-    bool m_bottomEdgeAA;
-};
-
-#pragma pack(pop)
-
-}
-
-#endif
index f516d7a..e815ea6 100644 (file)
@@ -1,3 +1,153 @@
+2012-08-03  Alexandre Elias  <aelias@google.com>
+
+        [chromium] Move ubercomp quads back into CC
+        https://bugs.webkit.org/show_bug.cgi?id=93062
+
+        Reviewed by James Robinson.
+
+        Because GTFO is almost done, we can move back the quad types
+        to CC and pickle them there.  This patch moves everything back
+        to where it was before and changes types like WebRect to IntRect.
+
+        As a bonus, I also added CCRenderPassDrawQuad and CCYUVVideoDrawQuad
+        (which had been left in the CC files) to CCDrawQuad::size(), so now
+        every quad type is ready for serialization.
+
+        No new tests (no-op refactoring).
+
+        * WebCore.gypi:
+        * platform/chromium/support/WebCompositorStreamVideoQuad.cpp: Removed.
+        * platform/graphics/chromium/LayerRendererChromium.cpp:
+        (WebCore::LayerRendererChromium::drawQuad):
+        * platform/graphics/chromium/cc/CCCheckerboardDrawQuad.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCQuadSink.h.
+        (WebCore):
+        (WebCore::CCCheckerboardDrawQuad::create):
+        (WebCore::CCCheckerboardDrawQuad::CCCheckerboardDrawQuad):
+        (WebCore::CCCheckerboardDrawQuad::materialCast):
+        * platform/graphics/chromium/cc/CCCheckerboardDrawQuad.h:
+        (WebCore):
+        (CCCheckerboardDrawQuad):
+        * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorDebugBorderQuad.cpp.
+        (WebCore):
+        (WebCore::CCDebugBorderDrawQuad::create):
+        (WebCore::CCDebugBorderDrawQuad::CCDebugBorderDrawQuad):
+        (WebCore::CCDebugBorderDrawQuad::materialCast):
+        * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.h:
+        (WebCore):
+        (CCDebugBorderDrawQuad):
+        (WebCore::CCDebugBorderDrawQuad::color):
+        (WebCore::CCDebugBorderDrawQuad::width):
+        * platform/graphics/chromium/cc/CCDrawQuad.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorQuad.cpp.
+        (WebCore):
+        (WebCore::CCDrawQuad::CCDrawQuad):
+        (WebCore::CCDrawQuad::opaqueRect):
+        (WebCore::CCDrawQuad::setQuadVisibleRect):
+        (WebCore::CCDrawQuad::size):
+        (WebCore::CCDrawQuad::setSharedQuadState):
+        * platform/graphics/chromium/cc/CCDrawQuad.h:
+        (WebCore):
+        (CCDrawQuad):
+        (WebCore::CCDrawQuad::quadRect):
+        (WebCore::CCDrawQuad::quadTransform):
+        (WebCore::CCDrawQuad::visibleContentRect):
+        (WebCore::CCDrawQuad::scissorRect):
+        (WebCore::CCDrawQuad::opacity):
+        (WebCore::CCDrawQuad::needsBlending):
+        (WebCore::CCDrawQuad::isLayerAxisAlignedIntRect):
+        (WebCore::CCDrawQuad::quadVisibleRect):
+        (WebCore::CCDrawQuad::isDebugQuad):
+        (WebCore::CCDrawQuad::material):
+        (WebCore::CCDrawQuad::sharedQuadState):
+        (WebCore::CCDrawQuad::sharedQuadStateId):
+        * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.cpp:
+        (WebCore::CCHeadsUpDisplayLayerImpl::appendQuads):
+        * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorIOSurfaceQuad.cpp.
+        (WebCore):
+        (WebCore::CCIOSurfaceDrawQuad::create):
+        (WebCore::CCIOSurfaceDrawQuad::CCIOSurfaceDrawQuad):
+        (WebCore::CCIOSurfaceDrawQuad::materialCast):
+        * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.h:
+        (WebCore):
+        (CCIOSurfaceDrawQuad):
+        (WebCore::CCIOSurfaceDrawQuad::ioSurfaceSize):
+        (WebCore::CCIOSurfaceDrawQuad::ioSurfaceTextureId):
+        (WebCore::CCIOSurfaceDrawQuad::orientation):
+        * platform/graphics/chromium/cc/CCQuadCuller.h:
+        (CCQuadCuller):
+        * platform/graphics/chromium/cc/CCQuadSink.h:
+        (WebCore):
+        (CCQuadSink):
+        * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
+        (WebCore::CCRenderPassDrawQuad::create):
+        (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
+        (WebCore::CCRenderPassDrawQuad::materialCast):
+        * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
+        (CCRenderPassDrawQuad):
+        * platform/graphics/chromium/cc/CCSharedQuadState.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorSharedQuadState.cpp.
+        (WebCore):
+        (WebCore::CCSharedQuadState::CCSharedQuadState):
+        (WebCore::CCSharedQuadState::create):
+        (WebCore::CCSharedQuadState::isLayerAxisAlignedIntRect):
+        * platform/graphics/chromium/cc/CCSharedQuadState.h:
+        (WebCore):
+        (CCSharedQuadState):
+        * platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorSolidColorQuad.cpp.
+        (WebCore):
+        (WebCore::CCSolidColorDrawQuad::create):
+        (WebCore::CCSolidColorDrawQuad::CCSolidColorDrawQuad):
+        (WebCore::CCSolidColorDrawQuad::materialCast):
+        * platform/graphics/chromium/cc/CCSolidColorDrawQuad.h:
+        (WebCore):
+        (CCSolidColorDrawQuad):
+        (WebCore::CCSolidColorDrawQuad::color):
+        * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorCheckerboardQuad.cpp.
+        (WebCore):
+        (WebCore::CCStreamVideoDrawQuad::create):
+        (WebCore::CCStreamVideoDrawQuad::CCStreamVideoDrawQuad):
+        (WebCore::CCStreamVideoDrawQuad::materialCast):
+        * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.h:
+        (WebCore):
+        (CCStreamVideoDrawQuad):
+        (WebCore::CCStreamVideoDrawQuad::textureId):
+        (WebCore::CCStreamVideoDrawQuad::matrix):
+        * platform/graphics/chromium/cc/CCTextureDrawQuad.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorTextureQuad.cpp.
+        (WebCore):
+        (WebCore::CCTextureDrawQuad::create):
+        (WebCore::CCTextureDrawQuad::CCTextureDrawQuad):
+        (WebCore::CCTextureDrawQuad::setNeedsBlending):
+        (WebCore::CCTextureDrawQuad::materialCast):
+        * platform/graphics/chromium/cc/CCTextureDrawQuad.h:
+        (WebCore):
+        (CCTextureDrawQuad):
+        (WebCore::CCTextureDrawQuad::uvRect):
+        (WebCore::CCTextureDrawQuad::resourceId):
+        (WebCore::CCTextureDrawQuad::premultipliedAlpha):
+        (WebCore::CCTextureDrawQuad::flipped):
+        * platform/graphics/chromium/cc/CCTileDrawQuad.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorTileQuad.cpp.
+        (WebCore):
+        (WebCore::CCTileDrawQuad::create):
+        (WebCore::CCTileDrawQuad::CCTileDrawQuad):
+        (WebCore::CCTileDrawQuad::materialCast):
+        * platform/graphics/chromium/cc/CCTileDrawQuad.h:
+        (WebCore):
+        (CCTileDrawQuad):
+        (WebCore::CCTileDrawQuad::resourceId):
+        (WebCore::CCTileDrawQuad::textureOffset):
+        (WebCore::CCTileDrawQuad::textureSize):
+        (WebCore::CCTileDrawQuad::textureFilter):
+        (WebCore::CCTileDrawQuad::swizzleContents):
+        (WebCore::CCTileDrawQuad::leftEdgeAA):
+        (WebCore::CCTileDrawQuad::topEdgeAA):
+        (WebCore::CCTileDrawQuad::rightEdgeAA):
+        (WebCore::CCTileDrawQuad::bottomEdgeAA):
+        (WebCore::CCTileDrawQuad::isAntialiased):
+        * platform/graphics/chromium/cc/CCYUVVideoDrawQuad.cpp:
+        (WebCore::CCYUVVideoDrawQuad::create):
+        (WebCore::CCYUVVideoDrawQuad::CCYUVVideoDrawQuad):
+        (WebCore::CCYUVVideoDrawQuad::materialCast):
+        * platform/graphics/chromium/cc/CCYUVVideoDrawQuad.h:
+        (CCYUVVideoDrawQuad):
+
 2012-08-03  Alexander Pavlov  <apavlov@chromium.org>
 
         Unreviewed, restore Web Inspector JS frontend compilability after r124484 (fix JSDoc annotations).
index d0a8e0c..fc4043f 100644 (file)
             'platform/chromium/support/GraphicsContext3DPrivate.cpp',
             'platform/chromium/support/GraphicsContext3DPrivate.h',
             'platform/chromium/support/WebAudioBus.cpp',
-            'platform/chromium/support/WebCompositorCheckerboardQuad.cpp',
-            'platform/chromium/support/WebCompositorDebugBorderQuad.cpp',
-            'platform/chromium/support/WebCompositorIOSurfaceQuad.cpp',
-            'platform/chromium/support/WebCompositorQuad.cpp',
-            'platform/chromium/support/WebCompositorSharedQuadState.cpp',
-            'platform/chromium/support/WebCompositorSolidColorQuad.cpp',
-            'platform/chromium/support/WebCompositorStreamVideoQuad.cpp',
-            'platform/chromium/support/WebCompositorTextureQuad.cpp',
-            'platform/chromium/support/WebCompositorTileQuad.cpp',
             'platform/chromium/support/WebData.cpp',
             'platform/chromium/support/WebHTTPBody.cpp',
             'platform/chromium/support/WebHTTPLoadInfo.cpp',
             'platform/graphics/chromium/cc/CCAnimationCurve.cpp',
             'platform/graphics/chromium/cc/CCAnimationCurve.h',
             'platform/graphics/chromium/cc/CCAnimationEvents.h',
+            'platform/graphics/chromium/cc/CCCheckerboardDrawQuad.cpp',
             'platform/graphics/chromium/cc/CCCheckerboardDrawQuad.h',
             'platform/graphics/chromium/cc/CCDamageTracker.cpp',
             'platform/graphics/chromium/cc/CCDamageTracker.h',
+            'platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp',
             'platform/graphics/chromium/cc/CCDebugBorderDrawQuad.h',
             'platform/graphics/chromium/cc/CCDebugRectHistory.cpp',
             'platform/graphics/chromium/cc/CCDebugRectHistory.h',
             'platform/graphics/chromium/cc/CCDelayBasedTimeSource.cpp',
             'platform/graphics/chromium/cc/CCDelayBasedTimeSource.h',
+            'platform/graphics/chromium/cc/CCDrawQuad.cpp',
             'platform/graphics/chromium/cc/CCDrawQuad.h',
             'platform/graphics/chromium/cc/CCFontAtlas.cpp',
             'platform/graphics/chromium/cc/CCFontAtlas.h',
             'platform/graphics/chromium/cc/CCGestureCurve.h',
             'platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.cpp',
             'platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.h',
+            'platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.cpp',
             'platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.h',
             'platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp',
             'platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.h',
             'platform/graphics/chromium/cc/CCScrollbarLayerImpl.h',
             'platform/graphics/chromium/cc/CCSettings.cpp',
             'platform/graphics/chromium/cc/CCSettings.h',
+            'platform/graphics/chromium/cc/CCSharedQuadState.cpp',
             'platform/graphics/chromium/cc/CCSharedQuadState.h',
             'platform/graphics/chromium/cc/CCSingleThreadProxy.cpp',
             'platform/graphics/chromium/cc/CCSingleThreadProxy.h',
+            'platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp',
             'platform/graphics/chromium/cc/CCSolidColorDrawQuad.h',
             'platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp',
             'platform/graphics/chromium/cc/CCSolidColorLayerImpl.h',
+            'platform/graphics/chromium/cc/CCStreamVideoDrawQuad.cpp',
             'platform/graphics/chromium/cc/CCStreamVideoDrawQuad.h',
             'platform/graphics/chromium/cc/CCTexture.cpp',
             'platform/graphics/chromium/cc/CCTexture.h',
+            'platform/graphics/chromium/cc/CCTextureDrawQuad.cpp',
             'platform/graphics/chromium/cc/CCTextureDrawQuad.h',
             'platform/graphics/chromium/cc/CCTextureLayerImpl.cpp',
             'platform/graphics/chromium/cc/CCTextureLayerImpl.h',
             'platform/graphics/chromium/cc/CCThreadProxy.cpp',
             'platform/graphics/chromium/cc/CCThreadProxy.h',
             'platform/graphics/chromium/cc/CCThreadTask.h',
+            'platform/graphics/chromium/cc/CCTileDrawQuad.cpp',
             'platform/graphics/chromium/cc/CCTileDrawQuad.h',
             'platform/graphics/chromium/cc/CCTiledLayerImpl.cpp',
             'platform/graphics/chromium/cc/CCTiledLayerImpl.h',
diff --git a/Source/WebCore/platform/chromium/support/WebCompositorStreamVideoQuad.cpp b/Source/WebCore/platform/chromium/support/WebCompositorStreamVideoQuad.cpp
deleted file mode 100644 (file)
index ae257aa..0000000
+++ /dev/null
@@ -1,52 +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 <public/WebCompositorStreamVideoQuad.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-PassOwnPtr<WebCompositorStreamVideoQuad> WebCompositorStreamVideoQuad::create(const WebCompositorSharedQuadState* sharedQuadState, const IntRect& quadRect, unsigned textureId, const WebTransformationMatrix& matrix)
-{
-    return adoptPtr(new WebCompositorStreamVideoQuad(sharedQuadState, quadRect, textureId, matrix));
-}
-
-WebCompositorStreamVideoQuad::WebCompositorStreamVideoQuad(const WebCompositorSharedQuadState* sharedQuadState, const IntRect& quadRect, unsigned textureId, const WebTransformationMatrix& matrix)
-    : WebCompositorQuad(sharedQuadState, WebCompositorQuad::StreamVideoContent, quadRect)
-    , m_textureId(textureId)
-    , m_matrix(matrix)
-{
-}
-
-const WebCompositorStreamVideoQuad* WebCompositorStreamVideoQuad::materialCast(const WebCompositorQuad* quad)
-{
-    ASSERT(quad->material() == WebCompositorQuad::StreamVideoContent);
-    return static_cast<const WebCompositorStreamVideoQuad*>(quad);
-}
-
-}
index 88610a0..1eccf3e 100644 (file)
@@ -429,7 +429,7 @@ void LayerRendererChromium::drawRenderPass(DrawingFrame& frame, const CCRenderPa
         drawQuad(frame, it->get());
 }
 
-void LayerRendererChromium::drawQuad(DrawingFrame& frame, const WebKit::WebCompositorQuad* quad)
+void LayerRendererChromium::drawQuad(DrawingFrame& frame, const CCDrawQuad* quad)
 {
     IntRect scissorRect = quad->scissorRect();
 
@@ -445,34 +445,34 @@ void LayerRendererChromium::drawQuad(DrawingFrame& frame, const WebKit::WebCompo
         GLC(m_context, m_context->disable(GraphicsContext3D::BLEND));
 
     switch (quad->material()) {
-    case WebKit::WebCompositorQuad::Invalid:
+    case CCDrawQuad::Invalid:
         ASSERT_NOT_REACHED();
         break;
-    case WebKit::WebCompositorQuad::Checkerboard:
+    case CCDrawQuad::Checkerboard:
         drawCheckerboardQuad(frame, CCCheckerboardDrawQuad::materialCast(quad));
         break;
-    case WebKit::WebCompositorQuad::DebugBorder:
+    case CCDrawQuad::DebugBorder:
         drawDebugBorderQuad(frame, CCDebugBorderDrawQuad::materialCast(quad));
         break;
-    case WebKit::WebCompositorQuad::IOSurfaceContent:
+    case CCDrawQuad::IOSurfaceContent:
         drawIOSurfaceQuad(frame, CCIOSurfaceDrawQuad::materialCast(quad));
         break;
-    case WebKit::WebCompositorQuad::RenderPass:
+    case CCDrawQuad::RenderPass:
         drawRenderPassQuad(frame, CCRenderPassDrawQuad::materialCast(quad));
         break;
-    case WebKit::WebCompositorQuad::SolidColor:
-        drawSolidColorQuad(frame, WebKit::WebCompositorSolidColorQuad::materialCast(quad));
+    case CCDrawQuad::SolidColor:
+        drawSolidColorQuad(frame, CCSolidColorDrawQuad::materialCast(quad));
         break;
-    case WebKit::WebCompositorQuad::StreamVideoContent:
+    case CCDrawQuad::StreamVideoContent:
         drawStreamVideoQuad(frame, CCStreamVideoDrawQuad::materialCast(quad));
         break;
-    case WebKit::WebCompositorQuad::TextureContent:
-        drawTextureQuad(frame, WebKit::WebCompositorTextureQuad::materialCast(quad));
+    case CCDrawQuad::TextureContent:
+        drawTextureQuad(frame, CCTextureDrawQuad::materialCast(quad));
         break;
-    case WebKit::WebCompositorQuad::TiledContent:
+    case CCDrawQuad::TiledContent:
         drawTileQuad(frame, CCTileDrawQuad::materialCast(quad));
         break;
-    case WebKit::WebCompositorQuad::YUVVideoContent:
+    case CCDrawQuad::YUVVideoContent:
         drawYUVVideoQuad(frame, CCYUVVideoDrawQuad::materialCast(quad));
         break;
     }
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef WebCompositorCheckerboardQuad_h
-#define WebCompositorCheckerboardQuad_h
+#include "config.h"
 
-#include "WebCompositorQuad.h"
-#if WEBKIT_IMPLEMENTATION
-#include <wtf/PassOwnPtr.h>
-#endif
+#include "cc/CCCheckerboardDrawQuad.h"
 
-namespace WebKit {
+namespace WebCore {
 
-#pragma pack(push, 4)
+PassOwnPtr<CCCheckerboardDrawQuad> CCCheckerboardDrawQuad::create(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect)
+{
+    return adoptPtr(new CCCheckerboardDrawQuad(sharedQuadState, quadRect));
+}
 
-class WebCompositorCheckerboardQuad : public WebCompositorQuad {
-public:
-#if WEBKIT_IMPLEMENTATION
-    static PassOwnPtr<WebCompositorCheckerboardQuad> create(const WebCompositorSharedQuadState*, const WebCore::IntRect&);
-#endif
+CCCheckerboardDrawQuad::CCCheckerboardDrawQuad(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect)
+    : CCDrawQuad(sharedQuadState, CCDrawQuad::Checkerboard, quadRect)
+{
+}
 
-    static const WebCompositorCheckerboardQuad* materialCast(const WebCompositorQuad*);
-private:
-#if WEBKIT_IMPLEMENTATION
-    WebCompositorCheckerboardQuad(const WebCompositorSharedQuadState*, const WebCore::IntRect&);
-#endif
-};
+const CCCheckerboardDrawQuad* CCCheckerboardDrawQuad::materialCast(const CCDrawQuad* quad)
+{
+    ASSERT(quad->material() == CCDrawQuad::Checkerboard);
+    return static_cast<const CCCheckerboardDrawQuad*>(quad);
+}
 
-#pragma pack(pop)
 
 }
-
-#endif
index 35104dc..c6c8701 100644 (file)
 #ifndef CCCheckerboardDrawQuad_h
 #define CCCheckerboardDrawQuad_h
 
-#include <public/WebCompositorCheckerboardQuad.h>
+#include "cc/CCDrawQuad.h"
+#include <wtf/PassOwnPtr.h>
 
 namespace WebCore {
-typedef WebKit::WebCompositorCheckerboardQuad CCCheckerboardDrawQuad;
+
+#pragma pack(push, 4)
+
+class CCCheckerboardDrawQuad : public CCDrawQuad {
+public:
+    static PassOwnPtr<CCCheckerboardDrawQuad> create(const CCSharedQuadState*, const IntRect&);
+
+    static const CCCheckerboardDrawQuad* materialCast(const CCDrawQuad*);
+private:
+    CCCheckerboardDrawQuad(const CCSharedQuadState*, const IntRect&);
+};
+
+#pragma pack(pop)
+
 }
 
 #endif
 
 #include "config.h"
 
-#include <public/WebCompositorDebugBorderQuad.h>
+#include "cc/CCDebugBorderDrawQuad.h"
 
-using namespace WebCore;
+namespace WebCore {
 
-namespace WebKit {
-
-PassOwnPtr<WebCompositorDebugBorderQuad> WebCompositorDebugBorderQuad::create(const WebCompositorSharedQuadState* sharedQuadState, const IntRect& quadRect, SkColor color, int width)
+PassOwnPtr<CCDebugBorderDrawQuad> CCDebugBorderDrawQuad::create(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect, SkColor color, int width)
 {
-    return adoptPtr(new WebCompositorDebugBorderQuad(sharedQuadState, quadRect, color, width));
+    return adoptPtr(new CCDebugBorderDrawQuad(sharedQuadState, quadRect, color, width));
 }
 
-WebCompositorDebugBorderQuad::WebCompositorDebugBorderQuad(const WebCompositorSharedQuadState* sharedQuadState, const IntRect& quadRect, SkColor color, int width)
-    : WebCompositorQuad(sharedQuadState, WebCompositorQuad::DebugBorder, quadRect)
+CCDebugBorderDrawQuad::CCDebugBorderDrawQuad(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect, SkColor color, int width)
+    : CCDrawQuad(sharedQuadState, CCDrawQuad::DebugBorder, quadRect)
     , m_color(color)
     , m_width(width)
 {
@@ -46,10 +44,10 @@ WebCompositorDebugBorderQuad::WebCompositorDebugBorderQuad(const WebCompositorSh
         m_needsBlending = true;
 }
 
-const WebCompositorDebugBorderQuad* WebCompositorDebugBorderQuad::materialCast(const WebCompositorQuad* quad)
+const CCDebugBorderDrawQuad* CCDebugBorderDrawQuad::materialCast(const CCDrawQuad* quad)
 {
-    ASSERT(quad->material() == WebCompositorQuad::DebugBorder);
-    return static_cast<const WebCompositorDebugBorderQuad*>(quad);
+    ASSERT(quad->material() == CCDrawQuad::DebugBorder);
+    return static_cast<const CCDebugBorderDrawQuad*>(quad);
 }
 
 }
index a72c274..3a53900 100644 (file)
 #ifndef CCDebugBorderDrawQuad_h
 #define CCDebugBorderDrawQuad_h
 
-#include <public/WebCompositorDebugBorderQuad.h>
+#include "SkColor.h"
+#include "cc/CCDrawQuad.h"
+#include <wtf/PassOwnPtr.h>
 
 namespace WebCore {
-typedef WebKit::WebCompositorDebugBorderQuad CCDebugBorderDrawQuad;
+
+#pragma pack(push, 4)
+
+class CCDebugBorderDrawQuad : public CCDrawQuad {
+public:
+    static PassOwnPtr<CCDebugBorderDrawQuad> create(const CCSharedQuadState*, const IntRect&, SkColor, int width);
+
+    SkColor color() const { return m_color; };
+    int width() const { return m_width; }
+
+    static const CCDebugBorderDrawQuad* materialCast(const CCDrawQuad*);
+private:
+    CCDebugBorderDrawQuad(const CCSharedQuadState*, const IntRect&, SkColor, int width);
+
+    SkColor m_color;
+    int m_width;
+};
+
+#pragma pack(pop)
+
 }
 
 #endif
  */
 
 #include "config.h"
-#include <public/WebCompositorQuad.h>
+#include "cc/CCDrawQuad.h"
 
 #include "IntRect.h"
-#include <public/WebCompositorCheckerboardQuad.h>
-#include <public/WebCompositorDebugBorderQuad.h>
-#include <public/WebCompositorIOSurfaceQuad.h>
-#include <public/WebCompositorSolidColorQuad.h>
-#include <public/WebCompositorStreamVideoQuad.h>
-#include <public/WebCompositorTextureQuad.h>
-#include <public/WebCompositorTileQuad.h>
+#include "cc/CCCheckerboardDrawQuad.h"
+#include "cc/CCDebugBorderDrawQuad.h"
+#include "cc/CCIOSurfaceDrawQuad.h"
+#include "cc/CCRenderPassDrawQuad.h"
+#include "cc/CCSolidColorDrawQuad.h"
+#include "cc/CCStreamVideoDrawQuad.h"
+#include "cc/CCTextureDrawQuad.h"
+#include "cc/CCTileDrawQuad.h"
+#include "cc/CCYUVVideoDrawQuad.h"
 
-using namespace WebCore;
+namespace WebCore {
 
-namespace WebKit {
-
-WebCompositorQuad::WebCompositorQuad(const WebCompositorSharedQuadState* sharedQuadState, Material material, const IntRect& quadRect)
+CCDrawQuad::CCDrawQuad(const CCSharedQuadState* sharedQuadState, Material material, const IntRect& quadRect)
     : m_sharedQuadState(sharedQuadState)
     , m_sharedQuadStateId(sharedQuadState->id)
     , m_material(material)
@@ -52,7 +52,7 @@ WebCompositorQuad::WebCompositorQuad(const WebCompositorSharedQuadState* sharedQ
     ASSERT(m_material != Invalid);
 }
 
-IntRect WebCompositorQuad::opaqueRect() const
+IntRect CCDrawQuad::opaqueRect() const
 {
     if (opacity() != 1)
         return IntRect();
@@ -61,41 +61,43 @@ IntRect WebCompositorQuad::opaqueRect() const
     return m_opaqueRect;
 }
 
-void WebCompositorQuad::setQuadVisibleRect(const IntRect& quadVisibleRect)
+void CCDrawQuad::setQuadVisibleRect(const IntRect& quadVisibleRect)
 {
     IntRect intersection = quadVisibleRect;
     intersection.intersect(m_quadRect);
     m_quadVisibleRect = intersection;
 }
 
-unsigned WebCompositorQuad::size() const
+unsigned CCDrawQuad::size() const
 {
     switch (material()) {
     case Checkerboard:
-        return sizeof(WebCompositorCheckerboardQuad);
+        return sizeof(CCCheckerboardDrawQuad);
     case DebugBorder:
-        return sizeof(WebCompositorDebugBorderQuad);
+        return sizeof(CCDebugBorderDrawQuad);
     case IOSurfaceContent:
-        return sizeof(WebCompositorIOSurfaceQuad);
+        return sizeof(CCIOSurfaceDrawQuad);
     case TextureContent:
-        return sizeof(WebCompositorTextureQuad);
+        return sizeof(CCTextureDrawQuad);
     case SolidColor:
-        return sizeof(WebCompositorSolidColorQuad);
+        return sizeof(CCSolidColorDrawQuad);
     case TiledContent:
-        return sizeof(WebCompositorTileQuad);
+        return sizeof(CCTileDrawQuad);
     case StreamVideoContent:
-        return sizeof(WebCompositorStreamVideoQuad);
-    case Invalid:
+        return sizeof(CCStreamVideoDrawQuad);
     case RenderPass:
+        return sizeof(CCRenderPassDrawQuad);
     case YUVVideoContent:
+        return sizeof(CCYUVVideoDrawQuad);
+    case Invalid:
         break;
     }
 
     CRASH();
-    return sizeof(WebCompositorQuad);
+    return sizeof(CCDrawQuad);
 }
 
-void WebCompositorQuad::setSharedQuadState(const WebCompositorSharedQuadState* sharedQuadState)
+void CCDrawQuad::setSharedQuadState(const CCSharedQuadState* sharedQuadState)
 {
     m_sharedQuadState = sharedQuadState;
     m_sharedQuadStateId = sharedQuadState->id;
index 5f536a8..faf6b4f 100644 (file)
 #ifndef CCDrawQuad_h
 #define CCDrawQuad_h
 
-#include <public/WebCompositorQuad.h>
+#include "cc/CCSharedQuadState.h"
 
 namespace WebCore {
-typedef WebKit::WebCompositorQuad CCDrawQuad;
+
+// WARNING! All CCXYZDrawQuad classes must remain PODs (plain old data).
+// They are intended to be "serializable" by copying their raw bytes, so they
+// must not contain any non-bit-copyable member variables!
+//
+// Furthermore, the class members need to be packed so they are aligned
+// properly and don't have paddings/gaps, otherwise memory check tools
+// like Valgrind will complain about uninitialized memory usage when
+// transferring these classes over the wire.
+#pragma pack(push, 4)
+
+// 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
+// from CCDrawQuad store additional data in their derived instance. The Material
+// enum is used to "safely" downcast to the derived class.
+class CCDrawQuad {
+public:
+    enum Material {
+        Invalid,
+        Checkerboard,
+        DebugBorder,
+        IOSurfaceContent,
+        RenderPass,
+        TextureContent,
+        SolidColor,
+        TiledContent,
+        YUVVideoContent,
+        StreamVideoContent,
+    };
+
+    IntRect quadRect() const { return m_quadRect; }
+    const WebKit::WebTransformationMatrix& quadTransform() const { return m_sharedQuadState->quadTransform; }
+    IntRect visibleContentRect() const { return m_sharedQuadState->visibleContentRect; }
+    IntRect scissorRect() const { return m_sharedQuadState->scissorRect; }
+    float opacity() const { return m_sharedQuadState->opacity; }
+    // For the purposes of blending, what part of the contents of this quad are opaque?
+    IntRect opaqueRect() const;
+    bool needsBlending() const { return m_needsBlending || !opaqueRect().contains(m_quadVisibleRect); }
+    bool isLayerAxisAlignedIntRect() const { return m_sharedQuadState->isLayerAxisAlignedIntRect(); }
+
+    // Allows changing the rect that gets drawn to make it smaller. Parameter passed
+    // in will be clipped to quadRect().
+    void setQuadVisibleRect(const IntRect&);
+    IntRect quadVisibleRect() const { return m_quadVisibleRect; }
+    bool isDebugQuad() const { return m_material == DebugBorder; }
+
+    Material material() const { return m_material; }
+
+    // Returns transfer size of this object based on the derived class (by
+    // looking at the material type).
+    unsigned size() const;
+
+    const CCSharedQuadState* sharedQuadState() const { return m_sharedQuadState; }
+    int sharedQuadStateId() const { return m_sharedQuadStateId; }
+    void setSharedQuadState(const CCSharedQuadState*);
+
+protected:
+    CCDrawQuad(const CCSharedQuadState*, Material, const IntRect&);
+
+    // Stores state common to a large bundle of quads; kept separate for memory
+    // efficiency. There is special treatment to reconstruct these pointers
+    // during serialization.
+    const CCSharedQuadState* m_sharedQuadState;
+    int m_sharedQuadStateId;
+
+    Material m_material;
+    IntRect m_quadRect;
+    IntRect m_quadVisibleRect;
+
+    // By default, the shared quad state determines whether or not this quad is
+    // opaque or needs blending. Derived classes can override with these
+    // variables.
+    bool m_quadOpaque;
+    bool m_needsBlending;
+
+    // Be default, this rect is empty. It is used when the shared quad state and above
+    // variables determine that the quad is not fully opaque but may be partially opaque.
+    IntRect m_opaqueRect;
+};
+
+#pragma pack(pop)
+
 }
 
 #endif
index f9fd99f..cfe8910 100644 (file)
 #include "cc/CCFrameRateCounter.h"
 #include "cc/CCLayerTreeHostImpl.h"
 #include "cc/CCQuadSink.h"
+#include "cc/CCTextureDrawQuad.h"
 #include "skia/ext/platform_canvas.h"
-#include <public/WebCompositorTextureQuad.h>
 #include <wtf/text/WTFString.h>
 
-using WebKit::WebCompositorTextureQuad;
-
 namespace WebCore {
 
 CCHeadsUpDisplayLayerImpl::CCHeadsUpDisplayLayerImpl(int id)
@@ -95,7 +93,7 @@ void CCHeadsUpDisplayLayerImpl::appendQuads(CCQuadSink& quadList, const CCShared
     bool premultipliedAlpha = true;
     FloatRect uvRect(0, 0, 1, 1);
     bool flipped = false;
-    quadList.append(WebCompositorTextureQuad::create(sharedQuadState, quadRect, m_hudTexture->id(), premultipliedAlpha, uvRect, flipped));
+    quadList.append(CCTextureDrawQuad::create(sharedQuadState, quadRect, m_hudTexture->id(), premultipliedAlpha, uvRect, flipped));
 }
 
 void CCHeadsUpDisplayLayerImpl::didDraw(CCResourceProvider* resourceProvider)
 
 #include "config.h"
 
-#include <public/WebCompositorIOSurfaceQuad.h>
+#include "cc/CCIOSurfaceDrawQuad.h"
 
-using namespace WebCore;
+namespace WebCore {
 
-namespace WebKit {
-
-PassOwnPtr<WebCompositorIOSurfaceQuad> WebCompositorIOSurfaceQuad::create(const WebCompositorSharedQuadState* sharedQuadState, const IntRect& quadRect, const IntSize& ioSurfaceSize, unsigned ioSurfaceTextureId, Orientation orientation)
+PassOwnPtr<CCIOSurfaceDrawQuad> CCIOSurfaceDrawQuad::create(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect, const IntSize& ioSurfaceSize, unsigned ioSurfaceTextureId, Orientation orientation)
 {
-    return adoptPtr(new WebCompositorIOSurfaceQuad(sharedQuadState, quadRect, ioSurfaceSize, ioSurfaceTextureId, orientation));
+    return adoptPtr(new CCIOSurfaceDrawQuad(sharedQuadState, quadRect, ioSurfaceSize, ioSurfaceTextureId, orientation));
 }
 
-WebCompositorIOSurfaceQuad::WebCompositorIOSurfaceQuad(const WebCompositorSharedQuadState* sharedQuadState, const IntRect& quadRect, const IntSize& ioSurfaceSize, unsigned ioSurfaceTextureId, Orientation orientation)
-    : WebCompositorQuad(sharedQuadState, WebCompositorQuad::IOSurfaceContent, quadRect)
+CCIOSurfaceDrawQuad::CCIOSurfaceDrawQuad(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect, const IntSize& ioSurfaceSize, unsigned ioSurfaceTextureId, Orientation orientation)
+    : CCDrawQuad(sharedQuadState, CCDrawQuad::IOSurfaceContent, quadRect)
     , m_ioSurfaceSize(ioSurfaceSize)
     , m_ioSurfaceTextureId(ioSurfaceTextureId)
     , m_orientation(orientation)
 {
 }
 
-const WebCompositorIOSurfaceQuad* WebCompositorIOSurfaceQuad::materialCast(const WebCompositorQuad* quad)
+const CCIOSurfaceDrawQuad* CCIOSurfaceDrawQuad::materialCast(const CCDrawQuad* quad)
 {
-    ASSERT(quad->material() == WebCompositorQuad::IOSurfaceContent);
-    return static_cast<const WebCompositorIOSurfaceQuad*>(quad);
+    ASSERT(quad->material() == CCDrawQuad::IOSurfaceContent);
+    return static_cast<const CCIOSurfaceDrawQuad*>(quad);
 }
 
 }
index 77d326c..7ce7c06 100644 (file)
 #ifndef CCIOSurfaceDrawQuad_h
 #define CCIOSurfaceDrawQuad_h
 
-#include <public/WebCompositorIOSurfaceQuad.h>
+#include "IntSize.h"
+#include "cc/CCDrawQuad.h"
+#include <wtf/PassOwnPtr.h>
 
 namespace WebCore {
-typedef WebKit::WebCompositorIOSurfaceQuad CCIOSurfaceDrawQuad;
+
+#pragma pack(push, 4)
+
+class CCIOSurfaceDrawQuad : public CCDrawQuad {
+public:
+    enum Orientation {
+      Flipped,
+      Unflipped
+    };
+
+    static PassOwnPtr<CCIOSurfaceDrawQuad> create(const CCSharedQuadState*, const IntRect&, const IntSize& ioSurfaceSize, unsigned ioSurfaceTextureId, Orientation);
+
+    IntSize ioSurfaceSize() const { return m_ioSurfaceSize; }
+    unsigned ioSurfaceTextureId() const { return m_ioSurfaceTextureId; }
+    Orientation orientation() const { return m_orientation; }
+
+    static const CCIOSurfaceDrawQuad* materialCast(const CCDrawQuad*);
+private:
+    CCIOSurfaceDrawQuad(const CCSharedQuadState*, const IntRect&, const IntSize& ioSurfaceSize, unsigned ioSurfaceTextureId, Orientation);
+
+    IntSize m_ioSurfaceSize;
+    unsigned m_ioSurfaceTextureId;
+    Orientation m_orientation;
+};
+
+#pragma pack(pop)
+
 }
 
 #endif
index 7f08027..e67b446 100644 (file)
@@ -42,7 +42,7 @@ public:
     virtual ~CCQuadCuller() { }
 
     // Returns true if the quad is added to the list, and false if the quad is entirely culled.
-    virtual bool append(PassOwnPtr<WebKit::WebCompositorQuad> passDrawQuad) OVERRIDE;
+    virtual bool append(PassOwnPtr<CCDrawQuad> passDrawQuad) OVERRIDE;
 
     bool hasOcclusionFromOutsideTargetSurface() { return m_hasOcclusionFromOutsideTargetSurface; }
 
index f2a9c62..4ae6f23 100644 (file)
 
 #include <wtf/PassOwnPtr.h>
 
-namespace WebKit {
-class WebCompositorQuad;
-}
-
 namespace WebCore {
 
+class CCDrawQuad;
+
 class CCQuadSink {
 public:
     virtual ~CCQuadSink() { }
 
     // Returns true if the quad is added to the list, and false if the quad is entirely culled.
-    virtual bool append(PassOwnPtr<WebKit::WebCompositorQuad> passDrawQuad) = 0;
+    virtual bool append(PassOwnPtr<CCDrawQuad> passDrawQuad) = 0;
 };
 
 }
index 60e3539..ca08111 100644 (file)
 
 #include "cc/CCRenderPassDrawQuad.h"
 
-using WebKit::WebCompositorQuad;
-
 namespace WebCore {
 
-PassOwnPtr<CCRenderPassDrawQuad> CCRenderPassDrawQuad::create(const WebKit::WebCompositorSharedQuadState* sharedQuadState, const IntRect& quadRect, int renderPassId, bool isReplica, const CCResourceProvider::ResourceId maskResourceId, const IntRect& contentsChangedSinceLastFrame)
+PassOwnPtr<CCRenderPassDrawQuad> CCRenderPassDrawQuad::create(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect, int renderPassId, bool isReplica, const CCResourceProvider::ResourceId maskResourceId, const IntRect& contentsChangedSinceLastFrame)
 {
     return adoptPtr(new CCRenderPassDrawQuad(sharedQuadState, quadRect, renderPassId, isReplica, maskResourceId, contentsChangedSinceLastFrame));
 }
 
-CCRenderPassDrawQuad::CCRenderPassDrawQuad(const WebKit::WebCompositorSharedQuadState* sharedQuadState, const IntRect& quadRect, int renderPassId, bool isReplica, CCResourceProvider::ResourceId maskResourceId, const IntRect& contentsChangedSinceLastFrame)
-    : WebCompositorQuad(sharedQuadState, WebCompositorQuad::RenderPass, quadRect)
+CCRenderPassDrawQuad::CCRenderPassDrawQuad(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect, int renderPassId, bool isReplica, CCResourceProvider::ResourceId maskResourceId, const IntRect& contentsChangedSinceLastFrame)
+    : CCDrawQuad(sharedQuadState, CCDrawQuad::RenderPass, quadRect)
     , m_renderPassId(renderPassId)
     , m_isReplica(isReplica)
     , m_maskResourceId(maskResourceId)
@@ -46,9 +44,9 @@ CCRenderPassDrawQuad::CCRenderPassDrawQuad(const WebKit::WebCompositorSharedQuad
     ASSERT(m_renderPassId > 0);
 }
 
-const CCRenderPassDrawQuad* CCRenderPassDrawQuad::materialCast(const WebKit::WebCompositorQuad* quad)
+const CCRenderPassDrawQuad* CCRenderPassDrawQuad::materialCast(const CCDrawQuad* quad)
 {
-    ASSERT(quad->material() == WebCompositorQuad::RenderPass);
+    ASSERT(quad->material() == CCDrawQuad::RenderPass);
     return static_cast<const CCRenderPassDrawQuad*>(quad);
 }
 
index 94d414f..29b33a1 100644 (file)
 #define CCRenderPassDrawQuad_h
 
 #include "IntRect.h"
+#include "cc/CCDrawQuad.h"
 #include "cc/CCResourceProvider.h"
-#include <public/WebCompositorQuad.h>
 #include <wtf/PassOwnPtr.h>
 
 namespace WebCore {
 
 class CCRenderPass;
 
-class CCRenderPassDrawQuad : public WebKit::WebCompositorQuad {
+class CCRenderPassDrawQuad : public CCDrawQuad {
     WTF_MAKE_NONCOPYABLE(CCRenderPassDrawQuad);
 public:
-    static PassOwnPtr<CCRenderPassDrawQuad> create(const WebKit::WebCompositorSharedQuadState*, const IntRect&, int renderPassId, bool isReplica, CCResourceProvider::ResourceId maskResourceId, const IntRect& contentsChangedSinceLastFrame);
+    static PassOwnPtr<CCRenderPassDrawQuad> create(const CCSharedQuadState*, const IntRect&, int renderPassId, bool isReplica, CCResourceProvider::ResourceId maskResourceId, const IntRect& contentsChangedSinceLastFrame);
 
     int renderPassId() const { return m_renderPassId; }
     bool isReplica() const { return m_isReplica; }
     CCResourceProvider::ResourceId maskResourceId() const { return m_maskResourceId; }
     const IntRect& contentsChangedSinceLastFrame() const { return m_contentsChangedSinceLastFrame; }
 
-    static const CCRenderPassDrawQuad* materialCast(const WebKit::WebCompositorQuad*);
+    static const CCRenderPassDrawQuad* materialCast(const CCDrawQuad*);
 private:
-    CCRenderPassDrawQuad(const WebKit::WebCompositorSharedQuadState*, const IntRect&, int renderPassId, bool isReplica, CCResourceProvider::ResourceId maskResourceId, const IntRect& contentsChangedSinceLastFrame);
+    CCRenderPassDrawQuad(const CCSharedQuadState*, const IntRect&, int renderPassId, bool isReplica, CCResourceProvider::ResourceId maskResourceId, const IntRect& contentsChangedSinceLastFrame);
 
     int m_renderPassId;
     bool m_isReplica;
 
 #include "config.h"
 
-#include <public/WebCompositorSharedQuadState.h>
+#include "cc/CCSharedQuadState.h"
 
 #include "FloatQuad.h"
 #include "cc/CCMathUtil.h"
 
-using WebCore::FloatQuad;
-using WebCore::IntRect;
+namespace WebCore {
 
-namespace WebKit {
-
-WebCompositorSharedQuadState::WebCompositorSharedQuadState()
-    : id(0)
-    , opacity(0)
-    , opaque(false)
-{
-}
-
-PassOwnPtr<WebCompositorSharedQuadState> WebCompositorSharedQuadState::create(int id, const WebTransformationMatrix& quadTransform, const IntRect& visibleContentRect, const IntRect& scissorRect, float opacity, bool opaque)
+PassOwnPtr<CCSharedQuadState> CCSharedQuadState::create(int id, const WebKit::WebTransformationMatrix& quadTransform, const IntRect& visibleContentRect, const IntRect& scissorRect, float opacity, bool opaque)
 {
-    return adoptPtr(new WebCompositorSharedQuadState(id, quadTransform, visibleContentRect, scissorRect, opacity, opaque));
+    return adoptPtr(new CCSharedQuadState(id, quadTransform, visibleContentRect, scissorRect, opacity, opaque));
 }
 
-WebCompositorSharedQuadState::WebCompositorSharedQuadState(int id, const WebTransformationMatrix& quadTransform, const IntRect& visibleContentRect, const IntRect& scissorRect, float opacity, bool opaque)
+CCSharedQuadState::CCSharedQuadState(int id, const WebKit::WebTransformationMatrix& quadTransform, const IntRect& visibleContentRect, const IntRect& scissorRect, float opacity, bool opaque)
     : id(id)
     , quadTransform(quadTransform)
     , visibleContentRect(visibleContentRect)
@@ -57,12 +47,12 @@ WebCompositorSharedQuadState::WebCompositorSharedQuadState(int id, const WebTran
 {
 }
 
-bool WebCompositorSharedQuadState::isLayerAxisAlignedIntRect() const
+bool CCSharedQuadState::isLayerAxisAlignedIntRect() const
 {
     // Note: this doesn't consider window or projection matrices.
     // Assume that they're orthonormal and have integer scales and translations.
     bool clipped = false;
-    FloatQuad quad = WebCore::CCMathUtil::mapQuad(quadTransform, FloatQuad(IntRect(visibleContentRect)), clipped);
+    FloatQuad quad = CCMathUtil::mapQuad(quadTransform, FloatQuad(IntRect(visibleContentRect)), clipped);
     return !clipped && quad.isRectilinear() && quad.boundingBox().isExpressibleAsIntRect();
 }
 
index 79036dd..6dd4aa5 100644 (file)
 #ifndef CCSharedQuadState_h
 #define CCSharedQuadState_h
 
-#include <public/WebCompositorSharedQuadState.h>
+#include "IntRect.h"
+#include <public/WebTransformationMatrix.h>
+#include <wtf/PassOwnPtr.h>
 
 namespace WebCore {
-typedef WebKit::WebCompositorSharedQuadState CCSharedQuadState;
+
+struct CCSharedQuadState {
+    int id;
+
+    // Transforms from quad's original content space to its target content space.
+    WebKit::WebTransformationMatrix quadTransform;
+    // This rect lives in the content space for the quad's originating layer.
+    IntRect visibleContentRect;
+    // This rect lives in the quad's target content space.
+    IntRect scissorRect;
+    float opacity;
+    bool opaque;
+
+    static PassOwnPtr<CCSharedQuadState> create(int id, const WebKit::WebTransformationMatrix& quadTransform, const IntRect& visibleContentRect, const IntRect& scissorRect, float opacity, bool opaque);
+    CCSharedQuadState(int id, const WebKit::WebTransformationMatrix& quadTransform, const IntRect& visibleContentRect, const IntRect& scissorRect, float opacity, bool opaque);
+    bool isLayerAxisAlignedIntRect() const;
+};
+
 }
 
 #endif
 
 #include "config.h"
 
-#include <public/WebCompositorSolidColorQuad.h>
+#include "cc/CCSolidColorDrawQuad.h"
 
-using namespace WebCore;
+namespace WebCore {
 
-namespace WebKit {
-
-PassOwnPtr<WebCompositorSolidColorQuad> WebCompositorSolidColorQuad::create(const WebKit::WebCompositorSharedQuadState* sharedQuadState, const IntRect& quadRect, SkColor color)
+PassOwnPtr<CCSolidColorDrawQuad> CCSolidColorDrawQuad::create(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect, SkColor color)
 {
-    return adoptPtr(new WebCompositorSolidColorQuad(sharedQuadState, quadRect, color));
+    return adoptPtr(new CCSolidColorDrawQuad(sharedQuadState, quadRect, color));
 }
 
-WebCompositorSolidColorQuad::WebCompositorSolidColorQuad(const WebKit::WebCompositorSharedQuadState* sharedQuadState, const IntRect& quadRect, SkColor color)
-    : WebCompositorQuad(sharedQuadState, WebCompositorQuad::SolidColor, quadRect)
+CCSolidColorDrawQuad::CCSolidColorDrawQuad(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect, SkColor color)
+    : CCDrawQuad(sharedQuadState, CCDrawQuad::SolidColor, quadRect)
     , m_color(color)
 {
     if (SkColorGetA(m_color) < 255)
@@ -46,10 +44,10 @@ WebCompositorSolidColorQuad::WebCompositorSolidColorQuad(const WebKit::WebCompos
         m_opaqueRect = quadRect;
 }
 
-const WebCompositorSolidColorQuad* WebCompositorSolidColorQuad::materialCast(const WebCompositorQuad* quad)
+const CCSolidColorDrawQuad* CCSolidColorDrawQuad::materialCast(const CCDrawQuad* quad)
 {
-    ASSERT(quad->material() == WebCompositorQuad::SolidColor);
-    return static_cast<const WebCompositorSolidColorQuad*>(quad);
+    ASSERT(quad->material() == CCDrawQuad::SolidColor);
+    return static_cast<const CCSolidColorDrawQuad*>(quad);
 }
 
 }
index b6c0ee0..59bc8fe 100644 (file)
 #ifndef CCSolidColorDrawQuad_h
 #define CCSolidColorDrawQuad_h
 
-#include <public/WebCompositorSolidColorQuad.h>
+#include "SkColor.h"
+#include "cc/CCDrawQuad.h"
+
+#include <wtf/PassOwnPtr.h>
 
 namespace WebCore {
-typedef WebKit::WebCompositorSolidColorQuad CCSolidColorDrawQuad;
+
+#pragma pack(push, 4)
+
+class CCSolidColorDrawQuad : public CCDrawQuad {
+public:
+    static PassOwnPtr<CCSolidColorDrawQuad> create(const CCSharedQuadState*, const IntRect&, SkColor);
+
+    SkColor color() const { return m_color; };
+
+    static const CCSolidColorDrawQuad* materialCast(const CCDrawQuad*);
+private:
+    CCSolidColorDrawQuad(const CCSharedQuadState*, const IntRect&, SkColor);
+
+    SkColor m_color;
+};
+
+#pragma pack(pop)
+
 }
 
 #endif
 
 #include "config.h"
 
-#include <public/WebCompositorCheckerboardQuad.h>
+#include "cc/CCStreamVideoDrawQuad.h"
 
-using namespace WebCore;
+namespace WebCore {
 
-namespace WebKit {
-
-PassOwnPtr<WebCompositorCheckerboardQuad> WebCompositorCheckerboardQuad::create(const WebCompositorSharedQuadState* sharedQuadState, const IntRect& quadRect)
+PassOwnPtr<CCStreamVideoDrawQuad> CCStreamVideoDrawQuad::create(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect, unsigned textureId, const WebKit::WebTransformationMatrix& matrix)
 {
-    return adoptPtr(new WebCompositorCheckerboardQuad(sharedQuadState, quadRect));
+    return adoptPtr(new CCStreamVideoDrawQuad(sharedQuadState, quadRect, textureId, matrix));
 }
 
-WebCompositorCheckerboardQuad::WebCompositorCheckerboardQuad(const WebCompositorSharedQuadState* sharedQuadState, const IntRect& quadRect)
-    : WebCompositorQuad(sharedQuadState, WebCompositorQuad::Checkerboard, quadRect)
+CCStreamVideoDrawQuad::CCStreamVideoDrawQuad(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect, unsigned textureId, const WebKit::WebTransformationMatrix& matrix)
+    : CCDrawQuad(sharedQuadState, CCDrawQuad::StreamVideoContent, quadRect)
+    , m_textureId(textureId)
+    , m_matrix(matrix)
 {
 }
 
-const WebCompositorCheckerboardQuad* WebCompositorCheckerboardQuad::materialCast(const WebCompositorQuad* quad)
+const CCStreamVideoDrawQuad* CCStreamVideoDrawQuad::materialCast(const CCDrawQuad* quad)
 {
-    ASSERT(quad->material() == WebCompositorQuad::Checkerboard);
-    return static_cast<const WebCompositorCheckerboardQuad*>(quad);
+    ASSERT(quad->material() == CCDrawQuad::StreamVideoContent);
+    return static_cast<const CCStreamVideoDrawQuad*>(quad);
 }
 
-
 }
index a189061..c935db7 100644 (file)
 #ifndef CCStreamVideoDrawQuad_h
 #define CCStreamVideoDrawQuad_h
 
-#include <public/WebCompositorStreamVideoQuad.h>
+#include "cc/CCDrawQuad.h"
+#include <public/WebTransformationMatrix.h>
+
+#include <wtf/PassOwnPtr.h>
 
 namespace WebCore {
-typedef WebKit::WebCompositorStreamVideoQuad CCStreamVideoDrawQuad;
+
+#pragma pack(push, 4)
+
+class CCStreamVideoDrawQuad : public CCDrawQuad {
+public:
+    static PassOwnPtr<CCStreamVideoDrawQuad> create(const CCSharedQuadState*, const IntRect&, unsigned textureId, const WebKit::WebTransformationMatrix&);
+
+    unsigned textureId() const { return m_textureId; }
+    const WebKit::WebTransformationMatrix& matrix() const { return m_matrix; }
+
+    static const CCStreamVideoDrawQuad* materialCast(const CCDrawQuad*);
+private:
+    CCStreamVideoDrawQuad(const CCSharedQuadState*, const IntRect&, unsigned textureId, const WebKit::WebTransformationMatrix&);
+
+    unsigned m_textureId;
+    WebKit::WebTransformationMatrix m_matrix;
+};
+
+#pragma pack(pop)
+
 }
 
 #endif
 
 #include "config.h"
 
-#include <public/WebCompositorTextureQuad.h>
+#include "cc/CCTextureDrawQuad.h"
 
-using namespace WebCore;
+namespace WebCore {
 
-namespace WebKit {
-
-PassOwnPtr<WebCompositorTextureQuad> WebCompositorTextureQuad::create(const WebKit::WebCompositorSharedQuadState* sharedQuadState, const IntRect& quadRect, unsigned resourceId, bool premultipliedAlpha, const FloatRect& uvRect, bool flipped)
+PassOwnPtr<CCTextureDrawQuad> CCTextureDrawQuad::create(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect, unsigned resourceId, bool premultipliedAlpha, const FloatRect& uvRect, bool flipped)
 {
-    return adoptPtr(new WebCompositorTextureQuad(sharedQuadState, quadRect, resourceId, premultipliedAlpha, uvRect, flipped));
+    return adoptPtr(new CCTextureDrawQuad(sharedQuadState, quadRect, resourceId, premultipliedAlpha, uvRect, flipped));
 }
 
-WebCompositorTextureQuad::WebCompositorTextureQuad(const WebKit::WebCompositorSharedQuadState* sharedQuadState, const IntRect& quadRect, unsigned resourceId, bool premultipliedAlpha, const FloatRect& uvRect, bool flipped)
-    : WebCompositorQuad(sharedQuadState, WebCompositorQuad::TextureContent, quadRect)
+CCTextureDrawQuad::CCTextureDrawQuad(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect, unsigned resourceId, bool premultipliedAlpha, const FloatRect& uvRect, bool flipped)
+    : CCDrawQuad(sharedQuadState, CCDrawQuad::TextureContent, quadRect)
     , m_resourceId(resourceId)
     , m_premultipliedAlpha(premultipliedAlpha)
     , m_uvRect(uvRect)
@@ -45,15 +43,15 @@ WebCompositorTextureQuad::WebCompositorTextureQuad(const WebKit::WebCompositorSh
 {
 }
 
-void WebCompositorTextureQuad::setNeedsBlending()
+void CCTextureDrawQuad::setNeedsBlending()
 {
     m_needsBlending = true;
 }
 
-const WebCompositorTextureQuad* WebCompositorTextureQuad::materialCast(const WebKit::WebCompositorQuad* quad)
+const CCTextureDrawQuad* CCTextureDrawQuad::materialCast(const CCDrawQuad* quad)
 {
-    ASSERT(quad->material() == WebCompositorQuad::TextureContent);
-    return static_cast<const WebCompositorTextureQuad*>(quad);
+    ASSERT(quad->material() == CCDrawQuad::TextureContent);
+    return static_cast<const CCTextureDrawQuad*>(quad);
 }
 
 }
index 28c3d91..20d5c9d 100644 (file)
 #ifndef CCTextureDrawQuad_h
 #define CCTextureDrawQuad_h
 
-#include <public/WebCompositorTextureQuad.h>
+#include "FloatRect.h"
+#include "cc/CCDrawQuad.h"
+#include <wtf/PassOwnPtr.h>
 
 namespace WebCore {
-typedef WebKit::WebCompositorTextureQuad CCTextureDrawQuad;
+
+#pragma pack(push, 4)
+
+class CCTextureDrawQuad : public CCDrawQuad {
+public:
+    static PassOwnPtr<CCTextureDrawQuad> create(const CCSharedQuadState*, const IntRect&, unsigned resourceId, bool premultipliedAlpha, const FloatRect& uvRect, bool flipped);
+    FloatRect uvRect() const { return m_uvRect; }
+
+    unsigned resourceId() const { return m_resourceId; }
+    bool premultipliedAlpha() const { return  m_premultipliedAlpha; }
+    bool flipped() const { return m_flipped; }
+
+    void setNeedsBlending();
+
+    static const CCTextureDrawQuad* materialCast(const CCDrawQuad*);
+private:
+    CCTextureDrawQuad(const CCSharedQuadState*, const IntRect&, unsigned resourceId, bool premultipliedAlpha, const FloatRect& uvRect, bool flipped);
+
+    unsigned m_resourceId;
+    bool m_premultipliedAlpha;
+    FloatRect m_uvRect;
+    bool m_flipped;
+};
+
+#pragma pack(pop)
+
 }
 
 #endif
 
 #include "config.h"
 
-#include <public/WebCompositorTileQuad.h>
+#include "cc/CCTileDrawQuad.h"
 
-using namespace WebCore;
+namespace WebCore {
 
-namespace WebKit {
-
-PassOwnPtr<WebCompositorTileQuad> WebCompositorTileQuad::create(const WebCompositorSharedQuadState* sharedQuadState, const IntRect& quadRect, const IntRect& opaqueRect, unsigned resourceId, const IntPoint& textureOffset, const IntSize& textureSize, GC3Dint textureFilter, bool swizzleContents, bool leftEdgeAA, bool topEdgeAA, bool rightEdgeAA, bool bottomEdgeAA)
+PassOwnPtr<CCTileDrawQuad> CCTileDrawQuad::create(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect, const IntRect& opaqueRect, unsigned resourceId, const IntPoint& textureOffset, const IntSize& textureSize, GC3Dint textureFilter, bool swizzleContents, bool leftEdgeAA, bool topEdgeAA, bool rightEdgeAA, bool bottomEdgeAA)
 {
-    return adoptPtr(new WebCompositorTileQuad(sharedQuadState, quadRect, opaqueRect, resourceId, textureOffset, textureSize, textureFilter, swizzleContents, leftEdgeAA, topEdgeAA, rightEdgeAA, bottomEdgeAA));
+    return adoptPtr(new CCTileDrawQuad(sharedQuadState, quadRect, opaqueRect, resourceId, textureOffset, textureSize, textureFilter, swizzleContents, leftEdgeAA, topEdgeAA, rightEdgeAA, bottomEdgeAA));
 }
 
-WebCompositorTileQuad::WebCompositorTileQuad(const WebCompositorSharedQuadState* sharedQuadState, const IntRect& quadRect, const IntRect& opaqueRect, unsigned resourceId, const IntPoint& textureOffset, const IntSize& textureSize, GC3Dint textureFilter, bool swizzleContents, bool leftEdgeAA, bool topEdgeAA, bool rightEdgeAA, bool bottomEdgeAA)
-    : WebCompositorQuad(sharedQuadState, WebCompositorQuad::TiledContent, quadRect)
+CCTileDrawQuad::CCTileDrawQuad(const CCSharedQuadState* sharedQuadState, const IntRect& quadRect, const IntRect& opaqueRect, unsigned resourceId, const IntPoint& textureOffset, const IntSize& textureSize, GC3Dint textureFilter, bool swizzleContents, bool leftEdgeAA, bool topEdgeAA, bool rightEdgeAA, bool bottomEdgeAA)
+    : CCDrawQuad(sharedQuadState, CCDrawQuad::TiledContent, quadRect)
     , m_resourceId(resourceId)
     , m_textureOffset(textureOffset)
     , m_textureSize(textureSize)
@@ -53,10 +51,10 @@ WebCompositorTileQuad::WebCompositorTileQuad(const WebCompositorSharedQuadState*
     m_opaqueRect = opaqueRect;
 }
 
-const WebCompositorTileQuad* WebCompositorTileQuad::materialCast(const WebCompositorQuad* quad)
+const CCTileDrawQuad* CCTileDrawQuad::materialCast(const CCDrawQuad* quad)
 {
-    ASSERT(quad->material() == WebCompositorQuad::TiledContent);
-    return static_cast<const WebCompositorTileQuad*>(quad);
+    ASSERT(quad->material() == CCDrawQuad::TiledContent);
+    return static_cast<const CCTileDrawQuad*>(quad);
 }
 
 }
index d530f4a..7943bc9 100644 (file)
 #ifndef CCTileDrawQuad_h
 #define CCTileDrawQuad_h
 
-#include <public/WebCompositorTileQuad.h>
+#include "GraphicsTypes3D.h"
+#include "IntPoint.h"
+#include "IntSize.h"
+#include "cc/CCDrawQuad.h"
+#include <wtf/PassOwnPtr.h>
 
 namespace WebCore {
-typedef WebKit::WebCompositorTileQuad CCTileDrawQuad;
+
+#pragma pack(push, 4)
+
+class CCTileDrawQuad : public CCDrawQuad {
+public:
+    static PassOwnPtr<CCTileDrawQuad> create(const CCSharedQuadState*, const IntRect& quadRect, const IntRect& opaqueRect, unsigned resourceId, const IntPoint& textureOffset, const IntSize& textureSize, GC3Dint textureFilter, bool swizzleContents, bool leftEdgeAA, bool topEdgeAA, bool rightEdgeAA, bool bottomEdgeAA);
+
+    unsigned resourceId() const { return m_resourceId; }
+    IntPoint textureOffset() const { return m_textureOffset; }
+    IntSize textureSize() const { return m_textureSize; }
+    GC3Dint textureFilter() const { return m_textureFilter; }
+    bool swizzleContents() const { return m_swizzleContents; }
+
+    bool leftEdgeAA() const { return m_leftEdgeAA; }
+    bool topEdgeAA() const { return m_topEdgeAA; }
+    bool rightEdgeAA() const { return m_rightEdgeAA; }
+    bool bottomEdgeAA() const { return m_bottomEdgeAA; }
+
+    bool isAntialiased() const { return leftEdgeAA() || topEdgeAA() || rightEdgeAA() || bottomEdgeAA(); }
+
+    static const CCTileDrawQuad* materialCast(const CCDrawQuad*);
+private:
+     CCTileDrawQuad(const CCSharedQuadState*, const IntRect& quadRect, const IntRect& opaqueRect, unsigned resourceId, const IntPoint& textureOffset, const IntSize& textureSize, GC3Dint textureFilter, bool swizzleContents, bool leftEdgeAA, bool topEdgeAA, bool rightEdgeAA, bool bottomEdgeAA);
+
+    unsigned m_resourceId;
+    IntPoint m_textureOffset;
+    IntSize m_textureSize;
+    GC3Dint m_textureFilter;
+    bool m_swizzleContents;
+    bool m_leftEdgeAA;
+    bool m_topEdgeAA;
+    bool m_rightEdgeAA;
+    bool m_bottomEdgeAA;
+};
+
+#pragma pack(pop)
+
 }
 
 #endif
index 43f2e2f..27a66f3 100644 (file)
 
 #include "cc/CCYUVVideoDrawQuad.h"
 
-using WebKit::WebCompositorQuad;
-
 namespace WebCore {
 
-PassOwnPtr<CCYUVVideoDrawQuad> CCYUVVideoDrawQuad::create(const WebKit::WebCompositorSharedQuadState* sharedQuadState, const IntRect& quadRect, const CCVideoLayerImpl::FramePlane& yPlane, const CCVideoLayerImpl::FramePlane& uPlane, const CCVideoLayerImpl::FramePlane& vPlane)
+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 WebKit::WebCompositorSharedQuadState* sharedQuadState, const IntRect& quadRect, const CCVideoLayerImpl::FramePlane& yPlane, const CCVideoLayerImpl::FramePlane& uPlane, const CCVideoLayerImpl::FramePlane& vPlane)
-    : WebCompositorQuad(sharedQuadState, WebCompositorQuad::YUVVideoContent, quadRect)
+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)
 {
 }
 
-const CCYUVVideoDrawQuad* CCYUVVideoDrawQuad::materialCast(const WebKit::WebCompositorQuad* quad)
+const CCYUVVideoDrawQuad* CCYUVVideoDrawQuad::materialCast(const CCDrawQuad* quad)
 {
-    ASSERT(quad->material() == WebCompositorQuad::YUVVideoContent);
+    ASSERT(quad->material() == CCDrawQuad::YUVVideoContent);
     return static_cast<const CCYUVVideoDrawQuad*>(quad);
 }
 
index 6684ad8..456a96f 100644 (file)
 #ifndef CCYUVVideoDrawQuad_h
 #define CCYUVVideoDrawQuad_h
 
+#include "cc/CCDrawQuad.h"
 #include "cc/CCVideoLayerImpl.h"
-#include <public/WebCompositorQuad.h>
 #include <wtf/PassOwnPtr.h>
 
 namespace WebCore {
 
-class CCYUVVideoDrawQuad : public WebKit::WebCompositorQuad {
+class CCYUVVideoDrawQuad : public CCDrawQuad {
     WTF_MAKE_NONCOPYABLE(CCYUVVideoDrawQuad);
 public:
-    static PassOwnPtr<CCYUVVideoDrawQuad> create(const WebKit::WebCompositorSharedQuadState*, const IntRect&, const CCVideoLayerImpl::FramePlane& yPlane, const CCVideoLayerImpl::FramePlane& uPlane, const CCVideoLayerImpl::FramePlane& vPlane);
+    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; }
 
-    static const CCYUVVideoDrawQuad* materialCast(const WebKit::WebCompositorQuad*);
+    static const CCYUVVideoDrawQuad* materialCast(const CCDrawQuad*);
 private:
-    CCYUVVideoDrawQuad(const WebKit::WebCompositorSharedQuadState*, const IntRect&, const CCVideoLayerImpl::FramePlane& yPlane, const CCVideoLayerImpl::FramePlane& uPlane, const CCVideoLayerImpl::FramePlane& vPlane);
+    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;