Chromium Code Reviews| Index: cc/layers/solid_color_layer_impl.cc |
| diff --git a/cc/layers/solid_color_layer_impl.cc b/cc/layers/solid_color_layer_impl.cc |
| index c8ddc7d7df85e2b820a714b47084fe7cd24d428a..70dc0cf9960dc6bd4b999ecbaaf61b9901db1965 100644 |
| --- a/cc/layers/solid_color_layer_impl.cc |
| +++ b/cc/layers/solid_color_layer_impl.cc |
| @@ -31,15 +31,17 @@ void SolidColorLayerImpl::AppendSolidQuads( |
| RenderPass* render_pass, |
| const Occlusion& occlusion_in_content_space, |
| SharedQuadState* shared_quad_state, |
| - const gfx::Size& content_bounds, |
| + const gfx::Rect& visible_content_rect, |
| SkColor color, |
| AppendQuadsData* append_quads_data) { |
| // We create a series of smaller quads instead of just one large one so that |
| // the culler can reduce the total pixels drawn. |
| - int width = content_bounds.width(); |
| - int height = content_bounds.height(); |
| - for (int x = 0; x < width; x += kSolidQuadTileSize) { |
| - for (int y = 0; y < height; y += kSolidQuadTileSize) { |
| + int width = visible_content_rect.width(); |
| + int height = visible_content_rect.height(); |
| + for (int x = visible_content_rect.x(); x < visible_content_rect.right(); |
| + x += kSolidQuadTileSize) { |
| + for (int y = visible_content_rect.y(); y < visible_content_rect.bottom(); |
| + y += kSolidQuadTileSize) { |
| gfx::Rect quad_rect(x, |
| y, |
| std::min(width - x, kSolidQuadTileSize), |
| @@ -74,7 +76,7 @@ void SolidColorLayerImpl::AppendQuads( |
| AppendSolidQuads(render_pass, |
| occlusion_in_content_space, |
| shared_quad_state, |
| - content_bounds(), |
| + gfx::Rect(content_bounds()), |
|
danakj
2014/10/23 23:27:28
why isn't this the visible rect too? same problem
danakj
2014/10/23 23:38:21
please leave a TODO pointing to a bug.
hendrikw
2014/10/23 23:53:48
Acknowledged.
|
| background_color(), |
| append_quads_data); |
| } |