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

Unified Diff: cc/layers/solid_color_layer_impl.cc

Issue 675903002: cc: SolidColorLayerImpl::AppendSolidQuads takes the visible content rect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed the code that set the visible rect Created 6 years, 2 months 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
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);
}

Powered by Google App Engine
This is Rietveld 408576698