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

Unified Diff: cc/render_pass.cc

Issue 11416088: cc: Turn SharedQuadState into a struct-like class similar to DrawQuads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix debug build Created 8 years, 1 month 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
« no previous file with comments | « cc/quad_sink.h ('k') | cc/render_pass_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/render_pass.cc
diff --git a/cc/render_pass.cc b/cc/render_pass.cc
index ac8dea49b14f62355a87681b87ab5a3dcce96e00..bbb36e5a629250d83100214c67e5b77c3f19b97c 100644
--- a/cc/render_pass.cc
+++ b/cc/render_pass.cc
@@ -90,10 +90,14 @@ void RenderPass::appendQuadsToFillScreen(LayerImpl* rootLayer, SkColor screenBac
// Manually create the quad state for the gutter quads, as the root layer
// doesn't have any bounds and so can't generate this itself.
// FIXME: Make the gutter quads generated by the solid color layer (make it smarter about generating quads to fill unoccluded areas).
+
+ DCHECK(rootLayer->screenSpaceTransform().isInvertible());
+
gfx::Rect rootTargetRect = rootLayer->renderSurface()->contentRect();
float opacity = 1;
- SharedQuadState* sharedQuadState = quadCuller.useSharedQuadState(SharedQuadState::create(rootLayer->drawTransform(), rootTargetRect, rootTargetRect, opacity));
- DCHECK(rootLayer->screenSpaceTransform().isInvertible());
+ SharedQuadState* sharedQuadState = quadCuller.useSharedQuadState(SharedQuadState::Create());
+ sharedQuadState->SetAll(rootLayer->drawTransform(), rootTargetRect, rootTargetRect, opacity);
+
WebTransformationMatrix transformToLayerSpace = rootLayer->screenSpaceTransform().inverse();
for (Region::Iterator fillRects(fillRegion); fillRects.has_rect(); fillRects.next()) {
// The root layer transform is composed of translations and scales only, no perspective, so mapping is sufficient.
« no previous file with comments | « cc/quad_sink.h ('k') | cc/render_pass_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698