diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-17 06:10:06 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-17 06:10:06 +0000 |
commit | 35d7e967e7182a63a43eaa6d0e3d43e1b727879c (patch) | |
tree | 91d434fbb6e7055da188cf7caba462be08725833 /cc/draw_quad.cc | |
parent | a8883e454b594fbcc00b9d36a1958b6f85c0632d (diff) | |
download | chromium_src-35d7e967e7182a63a43eaa6d0e3d43e1b727879c.zip chromium_src-35d7e967e7182a63a43eaa6d0e3d43e1b727879c.tar.gz chromium_src-35d7e967e7182a63a43eaa6d0e3d43e1b727879c.tar.bz2 |
cc: Remove opaque flags from SharedQuadState and DrawQuad
Now we will use the opaqueRect (already present on DrawQuad) to tell when things
are opaque or not.
Each Quad constructor that can be opaque take an opaqueRect. Generally,
callers set it equal to the quadRect when contentsOpaque(). TiledLayerImpl can
set it to a smaller rect sometimes since it has more knowledge.
This made the scrollbar code a bit nicer for the thumb so that it doesn't need
to set needs_blending anymore, as the thumb can be marked non-opaque.
DebugBorderQuad sets an empty opaqueRect now, so it doesn't need to set
needs_blending.
Covered by existing tests.
BUG=152337
R=enne
Review URL: https://chromiumcodereview.appspot.com/11412044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168387 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/draw_quad.cc')
-rw-r--r-- | cc/draw_quad.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cc/draw_quad.cc b/cc/draw_quad.cc index aba2412..805561b 100644 --- a/cc/draw_quad.cc +++ b/cc/draw_quad.cc @@ -25,14 +25,14 @@ template<typename T> T* TypedCopy(const cc::DrawQuad* other) { namespace cc { -DrawQuad::DrawQuad(const SharedQuadState* sharedQuadState, Material material, const gfx::Rect& quadRect) +DrawQuad::DrawQuad(const SharedQuadState* sharedQuadState, Material material, const gfx::Rect& quadRect, const gfx::Rect& opaqueRect) : m_sharedQuadState(sharedQuadState) , m_sharedQuadStateId(sharedQuadState->id) , m_material(material) , m_quadRect(quadRect) , m_quadVisibleRect(quadRect) - , m_quadOpaque(true) , m_needsBlending(false) + , m_opaqueRect(opaqueRect) { DCHECK(m_sharedQuadState); DCHECK(m_material != INVALID); @@ -42,8 +42,6 @@ gfx::Rect DrawQuad::opaqueRect() const { if (opacity() != 1) return gfx::Rect(); - if (m_sharedQuadState->opaque && m_quadOpaque) - return m_quadRect; return m_opaqueRect; } |