Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(417)

Unified Diff: cc/texture_layer_impl.cc

Issue 11418297: Clipping textured quads explicitly without scissoring (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: using static cast Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« cc/texture_draw_quad.cc ('K') | « cc/texture_draw_quad.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/texture_layer_impl.cc
diff --git a/cc/texture_layer_impl.cc b/cc/texture_layer_impl.cc
index e8a68741855891ef8d8e1317942c96484d7994bc..dd764a0572fd45044b0b8bb4c0074c387463e2fa 100644
--- a/cc/texture_layer_impl.cc
+++ b/cc/texture_layer_impl.cc
@@ -45,7 +45,12 @@ void TextureLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& appendQu
gfx::Rect opaqueRect(contentsOpaque() ? quadRect : gfx::Rect());
scoped_ptr<TextureDrawQuad> quad = TextureDrawQuad::Create();
quad->SetNew(sharedQuadState, quadRect, opaqueRect, m_externalTextureResource, m_premultipliedAlpha, m_uvRect, m_flipped);
- quadSink.append(quad.PassAs<DrawQuad>(), appendQuadsData);
+
+ // Perform explicit clipping on a quad to avoid setting a scissor later.
+ if (sharedQuadState->is_clipped && quad->PerformClipping())
+ sharedQuadState->is_clipped = false;
+ if (!quad->rect.IsEmpty())
+ quadSink.append(quad.PassAs<DrawQuad>(), appendQuadsData);
}
void TextureLayerImpl::didDraw(ResourceProvider* resourceProvider)
« cc/texture_draw_quad.cc ('K') | « cc/texture_draw_quad.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698