Moved "drawShadowedPicture" call outside of if cases in onDrawContent.
authorvjiaoblack <vjiaoblack@google.com>
Tue, 16 Aug 2016 12:38:45 +0000 (05:38 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 16 Aug 2016 12:38:45 +0000 (05:38 -0700)
commitd707f2d1cf91505d45edc2d92a7faac788d0d99e
tree86b3b963c080f3d44a41ca8faa81df4f73c025fc
parentc5064d9c3d54816e441402c48c60325b6749bba2
Moved "drawShadowedPicture" call outside of if cases in onDrawContent.

Bug description:
If you updated the view without changing frames (such as moving around the
cursor with 'z' (pixel zoom) on) the window would turn gray.

This was because I left the drawShadowedPicture call inside of the "if-updated"
case inside of SampleShadowing's onDrawContent handler.

If nothing changed and onDrawContent is called, we still need to update the
given canvas's fLights (there is no guarantee of whether the canvas (or its
fLights) has been updated or not), and then draw the shadowed picture.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2245923002

Review-Url: https://codereview.chromium.org/2245923002
samplecode/SampleShadowing.cpp