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

Side by Side Diff: cc/render_pass.cc

Issue 11411050: cc: Make the DrawQuad subclasses into struct-like classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/quad_culler.cc ('k') | cc/render_pass_draw_quad.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/render_pass.h" 5 #include "cc/render_pass.h"
6 6
7 #include "cc/layer_impl.h" 7 #include "cc/layer_impl.h"
8 #include "cc/math_util.h" 8 #include "cc/math_util.h"
9 #include "cc/occlusion_tracker.h" 9 #include "cc/occlusion_tracker.h"
10 #include "cc/quad_culler.h" 10 #include "cc/quad_culler.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // FIXME: Make the gutter quads generated by the solid color layer (make it smarter about generating quads to fill unoccluded areas). 92 // FIXME: Make the gutter quads generated by the solid color layer (make it smarter about generating quads to fill unoccluded areas).
93 gfx::Rect rootTargetRect = rootLayer->renderSurface()->contentRect(); 93 gfx::Rect rootTargetRect = rootLayer->renderSurface()->contentRect();
94 float opacity = 1; 94 float opacity = 1;
95 SharedQuadState* sharedQuadState = quadCuller.useSharedQuadState(SharedQuadS tate::create(rootLayer->drawTransform(), rootTargetRect, rootTargetRect, opacity )); 95 SharedQuadState* sharedQuadState = quadCuller.useSharedQuadState(SharedQuadS tate::create(rootLayer->drawTransform(), rootTargetRect, rootTargetRect, opacity ));
96 DCHECK(rootLayer->screenSpaceTransform().isInvertible()); 96 DCHECK(rootLayer->screenSpaceTransform().isInvertible());
97 WebTransformationMatrix transformToLayerSpace = rootLayer->screenSpaceTransf orm().inverse(); 97 WebTransformationMatrix transformToLayerSpace = rootLayer->screenSpaceTransf orm().inverse();
98 for (Region::Iterator fillRects(fillRegion); fillRects.has_rect(); fillRects .next()) { 98 for (Region::Iterator fillRects(fillRegion); fillRects.has_rect(); fillRects .next()) {
99 // The root layer transform is composed of translations and scales only, no perspective, so mapping is sufficient. 99 // The root layer transform is composed of translations and scales only, no perspective, so mapping is sufficient.
100 gfx::Rect layerRect = MathUtil::mapClippedRect(transformToLayerSpace, fi llRects.rect()); 100 gfx::Rect layerRect = MathUtil::mapClippedRect(transformToLayerSpace, fi llRects.rect());
101 // Skip the quad culler and just append the quads directly to avoid occl usion checks. 101 // Skip the quad culler and just append the quads directly to avoid occl usion checks.
102 m_quadList.append(SolidColorDrawQuad::create(sharedQuadState, layerRect, screenBackgroundColor).PassAs<DrawQuad>()); 102 scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create();
103 quad->SetNew(sharedQuadState, layerRect, screenBackgroundColor);
104 m_quadList.append(quad.PassAs<DrawQuad>());
103 } 105 }
104 } 106 }
105 107
106 void RenderPass::setFilter(SkImageFilter* filter) { 108 void RenderPass::setFilter(SkImageFilter* filter) {
107 SkRefCnt_SafeAssign(m_filter, filter); 109 SkRefCnt_SafeAssign(m_filter, filter);
108 } 110 }
109 111
110 } // namespace cc 112 } // namespace cc
OLDNEW
« no previous file with comments | « cc/quad_culler.cc ('k') | cc/render_pass_draw_quad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698