Chromium Code Reviews| Index: cc/output/bsp_walk_action.cc |
| diff --git a/cc/output/bsp_walk_action.cc b/cc/output/bsp_walk_action.cc |
| index da5ada5a82aa3bd5504f4f8e681b9fcd171b7437..a5e5063d3ae467526d7d57d3e63be3ecdd26cd8c 100644 |
| --- a/cc/output/bsp_walk_action.cc |
| +++ b/cc/output/bsp_walk_action.cc |
| @@ -9,15 +9,36 @@ |
| #include "base/memory/scoped_ptr.h" |
| #include "cc/output/direct_renderer.h" |
| #include "cc/quads/draw_polygon.h" |
| +#include "cc/quads/draw_quad.h" |
| namespace cc { |
| -void BspWalkActionToVector::operator()(DrawPolygon* item) { |
| - list_->push_back(item); |
| +BspWalkActionDrawPolygon::BspWalkActionDrawPolygon( |
| + DirectRenderer* renderer, |
| + DirectRenderer::DrawingFrame* frame, |
| + const gfx::Rect& render_pass_scissor, |
| + bool using_scissor_as_optimization) |
| + : renderer_(renderer), |
| + frame_(frame), |
| + render_pass_scissor_(render_pass_scissor), |
| + using_scissor_as_optimization_(using_scissor_as_optimization) { |
| +} |
| + |
| +void BspWalkActionDrawPolygon::operator()(DrawPolygon* item) { |
| + gfx::Transform inverse_transform; |
| + if (item->original_ref()->quadTransform().GetInverse(&inverse_transform)) { |
|
enne (OOO)
2015/02/04 21:23:59
Isn't it true that we don't draw things that don't
awoloszyn
2015/02/12 16:48:51
Done.
|
| + item->TransformToLayerSpace(inverse_transform); |
| + renderer_->DoDrawPolygon(*item, frame_, render_pass_scissor_, |
| + using_scissor_as_optimization_); |
| + } |
| } |
| BspWalkActionToVector::BspWalkActionToVector(std::vector<DrawPolygon*>* in_list) |
| : list_(in_list) { |
| } |
| +void BspWalkActionToVector::operator()(DrawPolygon* item) { |
| + list_->push_back(item); |
| +} |
| + |
| } // namespace cc |