RenderPass* render_pass,
const OcclusionTracker<LayerImpl>& occlusion_tracker,
SharedQuadState* shared_quad_state,
- const gfx::Size& content_bounds,
+ const gfx::Rect& visible_content_rect,
const gfx::Transform& target_space_transform,
SkColor color) {
Occlusion occlusion =
// 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 right = visible_content_rect.right();
+ int bottom = visible_content_rect.bottom();
+ 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),
- std::min(height - y, kSolidQuadTileSize));
+ std::min(right - x, kSolidQuadTileSize),
+ std::min(bottom - y, kSolidQuadTileSize));
gfx::Rect visible_quad_rect =
occlusion.GetUnoccludedContentRect(quad_rect);
if (visible_quad_rect.IsEmpty())
AppendDebugBorderQuad(
render_pass, content_bounds(), shared_quad_state, append_quads_data);
+ // TODO(hendrikw): We need to pass the visible content rect rather than
+ // |content_bounds()| here.
AppendSolidQuads(render_pass,
occlusion_tracker,
shared_quad_state,
- content_bounds(),
+ gfx::Rect(content_bounds()),
draw_properties().target_space_transform,
background_color());
}