Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 20805343 authored by Xavier Ducrohet's avatar Xavier Ducrohet
Browse files

LayoutLib: Fix Canvas layer support with 2+ layers

- When drawing is not clipped to the top layers,
  drawing should not happen automatically on all
  existing layers. Instead each layer's flags dictate
  whether drawing should happen on layers beneath, starting
  with the top layer.
- upon restore, the same mechanism is taken. Only blit
  a layer into the layer beneath if it was drawn into
  using the logic above.

Also fixed:
- saveLayer() does not, in fact, always save matrix
  and clip info. The flag dictate this, the same way
  it does in save()
- drawing code didn't properly detect the case of drawing
  into layers if a save() was called after saveLayer().
  Now the code only looks at the layer list which provide
  all the needed info (flags mostly), and doesn't rely
  on mLocalLayer (which is used during restore only now).
- Properly handle HAS_ALPHA_LAYER_SAVE_FLAG (or lack
  thereof) when creating the BufferedImage for the layer.

Change-Id: I2fbbcc0f5d3a3dd208763705bc23e6658fd4e573
parent 1039872f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment