summaryrefslogtreecommitdiffstats
path: root/cc/texture_layer_impl.cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-17 06:10:06 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-17 06:10:06 +0000
commit35d7e967e7182a63a43eaa6d0e3d43e1b727879c (patch)
tree91d434fbb6e7055da188cf7caba462be08725833 /cc/texture_layer_impl.cc
parenta8883e454b594fbcc00b9d36a1958b6f85c0632d (diff)
downloadchromium_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/texture_layer_impl.cc')
-rw-r--r--cc/texture_layer_impl.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/cc/texture_layer_impl.cc b/cc/texture_layer_impl.cc
index 291ea46..81c58cc 100644
--- a/cc/texture_layer_impl.cc
+++ b/cc/texture_layer_impl.cc
@@ -42,7 +42,8 @@ void TextureLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& appendQu
appendDebugBorderQuad(quadSink, sharedQuadState, appendQuadsData);
gfx::Rect quadRect(gfx::Point(), contentBounds());
- quadSink.append(TextureDrawQuad::create(sharedQuadState, quadRect, m_externalTextureResource, m_premultipliedAlpha, m_uvRect, m_flipped).PassAs<DrawQuad>(), appendQuadsData);
+ gfx::Rect opaqueRect(contentsOpaque() ? quadRect : gfx::Rect());
+ quadSink.append(TextureDrawQuad::create(sharedQuadState, quadRect, opaqueRect, m_externalTextureResource, m_premultipliedAlpha, m_uvRect, m_flipped).PassAs<DrawQuad>(), appendQuadsData);
}
void TextureLayerImpl::didDraw(ResourceProvider* resourceProvider)