cc: Shift far scrolled quads up in order to avoid floating inprecision.
In the situations when the visible rect is scrolled far enough away,
we can start experiencing floating point precision issues in the aa
path of the gl renderer. To avoid this, this patch shifts the quads
up and adjusts the quad_to_target_transform in the opposite direction.
In effect, the quads still appear in the same place, but the absolute
numbers involved in the calculation are smaller thus avoiding floating
point problems.
[email protected]
Bug: 765297
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ib93ddc0fa367116d53b4d471c9523fcce518e0bd
Reviewed-on: https://chromium-review.googlesource.com/690848
Reviewed-by: enne <[email protected]>
Commit-Queue: vmpstr <[email protected]>
Cr-Commit-Position: refs/heads/master@{#505418}
diff --git a/cc/layers/nine_patch_layer_impl.cc b/cc/layers/nine_patch_layer_impl.cc
index eb3cdd1..15822176 100644
--- a/cc/layers/nine_patch_layer_impl.cc
+++ b/cc/layers/nine_patch_layer_impl.cc
@@ -64,7 +64,7 @@
contents_opaque()
: false;
PopulateSharedQuadState(shared_quad_state, are_contents_opaque);
- AppendDebugBorderQuad(render_pass, bounds(), shared_quad_state,
+ AppendDebugBorderQuad(render_pass, gfx::Rect(bounds()), shared_quad_state,
append_quads_data);
if (!is_resource)