Shrink saveLayer device bounds when it supplies an explicit bounds and has a complex paint

This CL shrinks the bound computed for saveLayers that possess both an explicit
bound and a complex paint (e.g., one that affects transparent black). In this
case the bound of the layer should be the clipped explicit bound rather then
the clip prior/after the saveLayer/restore block.

In the following the first bound is the currently computed bound
while the second is the new/desired one:

For a 100x100 picture

saveLayer (no bound, no paint) [ 0 0 100 100 ]  [ 50 50 100 100 ]
  setMatrix (translate 50, 50) [ 0 0 100 100 ] [ 50 50 100 100 ]
  saveLayer (bound of 0, 0, 50, 50 - complex paint) [ 0 0 100 100 ] [ 50 50 100 100 ]
  restore [ 0 0 100 100 ] [ 50 50 100 100 ]
restore [ 0 0 100 100 ] [ 50 50 100 100 ]

Review URL: https://codereview.chromium.org/696763002
4 files changed