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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 350183005: cc: update scaled transform to occlusion tracker during append quad. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated Created 6 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl.cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 5452941793305803df01e77e42039b1e5272a1f4..16cf19839e71ba04eac4ba49b2de343b7f390645 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -143,22 +143,19 @@ void PictureLayerImpl::AppendQuads(QuadSink* quad_sink,
gfx::Transform scaled_draw_transform = draw_transform();
scaled_draw_transform.Scale(SK_MScalar1 / max_contents_scale,
SK_MScalar1 / max_contents_scale);
+
gfx::Size scaled_content_bounds =
- gfx::ToCeiledSize(gfx::ScaleSize(content_bounds(), max_contents_scale));
+ gfx::ToCeiledSize(gfx::ScaleSize(bounds(), max_contents_scale));
sohanjg 2014/06/24 16:18:01 this is keeping same behavior as old code, where w
enne (OOO) 2014/06/24 18:06:11 This does not seem right to me. This makes scaled
sohanjg 2014/06/25 13:26:52 Do you mean the scaled_content_bounds calculation
gfx::Rect scaled_visible_content_rect =
gfx::ScaleToEnclosingRect(visible_content_rect(), max_contents_scale);
scaled_visible_content_rect.Intersect(gfx::Rect(scaled_content_bounds));
SharedQuadState* shared_quad_state = quad_sink->CreateSharedQuadState();
- shared_quad_state->SetAll(scaled_draw_transform,
- scaled_content_bounds,
- scaled_visible_content_rect,
- draw_properties().clip_rect,
- draw_properties().is_clipped,
- draw_properties().opacity,
- blend_mode(),
- sorting_context_id_);
+ draw_properties().target_space_transform = scaled_draw_transform;
enne (OOO) 2014/06/24 18:06:11 Sorry, but no. Draw properties should only be set
sohanjg 2014/06/25 13:26:52 Yes, this was just to try and fix the black patch
+ draw_properties().content_bounds = scaled_content_bounds;
+ draw_properties().visible_content_rect = scaled_visible_content_rect;
+ PopulateSharedQuadState(shared_quad_state);
gfx::Rect rect = scaled_visible_content_rect;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698