diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-20 04:12:41 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-20 04:12:41 +0000 |
commit | 1fea814130ff23de709fe242819d67b9d4344e07 (patch) | |
tree | 6b9f06266db7ea814bc597ffb7fea731fb77904e /cc/draw_quad.h | |
parent | efd25e631eba64162229c4aee56413a4a0fd7549 (diff) | |
download | chromium_src-1fea814130ff23de709fe242819d67b9d4344e07.zip chromium_src-1fea814130ff23de709fe242819d67b9d4344e07.tar.gz chromium_src-1fea814130ff23de709fe242819d67b9d4344e07.tar.bz2 |
cc: Use ui/gfx geometry types for the CCRenderPass and CCDrawQuad classes.
We use these geometry types for CCDrawQuad types and in CCRenderPass, and so
we also make use of them in the CCRenderer classes.
A minor number of copies back to cc:: (WebCore) geometry types do occur in
the renderer implementations for now until we migrate the rest of the compositor.
Covered by existing tests.
BUG=152473
R=enne,jamesr
Review URL: https://chromiumcodereview.appspot.com/10984053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163142 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/draw_quad.h')
-rw-r--r-- | cc/draw_quad.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/cc/draw_quad.h b/cc/draw_quad.h index 89fc674..7476d45 100644 --- a/cc/draw_quad.h +++ b/cc/draw_quad.h @@ -38,19 +38,19 @@ public: StreamVideoContent, }; - IntRect quadRect() const { return m_quadRect; } + gfx::Rect quadRect() const { return m_quadRect; } const WebKit::WebTransformationMatrix& quadTransform() const { return m_sharedQuadState->quadTransform; } - IntRect visibleContentRect() const { return m_sharedQuadState->visibleContentRect; } - IntRect clippedRectInTarget() const { return m_sharedQuadState->clippedRectInTarget; } + gfx::Rect visibleContentRect() const { return m_sharedQuadState->visibleContentRect; } + gfx::Rect clippedRectInTarget() const { return m_sharedQuadState->clippedRectInTarget; } 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); } + gfx::Rect opaqueRect() const; + bool needsBlending() const { return m_needsBlending || !opaqueRect().Contains(m_quadVisibleRect); } // 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; } + void setQuadVisibleRect(gfx::Rect); + gfx::Rect quadVisibleRect() const { return m_quadVisibleRect; } bool isDebugQuad() const { return m_material == DebugBorder; } Material material() const { return m_material; } @@ -66,7 +66,7 @@ public: void setSharedQuadState(const CCSharedQuadState*); protected: - CCDrawQuad(const CCSharedQuadState*, Material, const IntRect&); + CCDrawQuad(const CCSharedQuadState*, Material, const gfx::Rect&); // Stores state common to a large bundle of quads; kept separate for memory // efficiency. There is special treatment to reconstruct these pointers @@ -75,8 +75,8 @@ protected: int m_sharedQuadStateId; Material m_material; - IntRect m_quadRect; - IntRect m_quadVisibleRect; + gfx::Rect m_quadRect; + gfx::Rect 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 @@ -86,7 +86,7 @@ protected: // 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; + gfx::Rect m_opaqueRect; }; #pragma pack(pop) |