skia2/samplecode
vjiaoblack d707f2d1cf 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
2016-08-16 05:38:45 -07:00
..
ClockFaceView.cpp Add samples to Viewer. 2016-06-16 09:52:35 -07:00
DecodeFile.h Move off SK_SUPPORT_LEGACY_DATA_FACTORIES. 2016-08-02 14:40:46 -07:00
GMSampleView.cpp move colorshader into its own .cpp, add color4f variant 2016-05-04 13:09:39 -07:00
GMSampleView.h C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} 2015-03-25 18:17:32 -07:00
OverView.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
OverView.h Add a header for OverView.cpp as well. 2012-09-18 01:52:20 +00:00
PerlinPatch.cpp switch xfermodes over to sk_sp 2016-03-29 11:32:50 -07:00
Sample2PtRadial.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleAAClip.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleAAGeometry.cpp toy to play with antialias raytracing 2016-05-27 05:13:26 -07:00
SampleAARectModes.cpp Rein in the use of SkDevice.h 2016-04-20 05:29:51 -07:00
SampleAARects.cpp Rein in the use of SkDevice.h 2016-04-20 05:29:51 -07:00
SampleAll.cpp SkTypeface::MakeFromName to take SkFontStyle. 2016-05-31 11:42:37 -07:00
SampleAndroidShadows.cpp Add Android Shadow sample 2016-08-12 10:40:38 -07:00
SampleAnimatedText.cpp Move SkTypeface to sk_sp. 2016-05-12 10:09:31 -07:00
SampleAnimator.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleAnimBlur.cpp switch maskfilters to sk_sp 2016-04-04 10:02:58 -07:00
SampleApp.cpp [SVGDom] Deferred SampleApp parsing 2016-08-15 07:48:47 -07:00
SampleApp.h Remove use of MakeRenderTargetDirect from view system 2016-07-28 15:17:34 -07:00
SampleArc.cpp return pictures as sk_sp 2016-03-18 07:25:55 -07:00
SampleAtlas.cpp Add samples to Viewer. 2016-06-16 09:52:35 -07:00
SampleBigBlur.cpp switch maskfilters to sk_sp 2016-04-04 10:02:58 -07:00
SampleBigGradient.cpp use Make instead of Create to return a shared shader 2016-03-08 18:50:00 -08:00
SampleBitmapRect.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleBlur.cpp switch maskfilters to sk_sp 2016-04-04 10:02:58 -07:00
SampleCamera.cpp move setshader to sk_sp, re-using SK_SUPPORT_LEGACY_CREATESHADER_PTR 2016-03-25 09:08:00 -07:00
SampleChart.cpp Style Change: NULL->nullptr 2015-08-27 07:41:16 -07:00
SampleCircle.cpp Factor code to rotate a canvas about a point. 2016-07-12 15:01:19 -07:00
SampleClamp.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleClip.cpp Rein in the use of SkDevice.h 2016-04-20 05:29:51 -07:00
SampleClipDrawMatch.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleClock.cpp Add samples to Viewer. 2016-06-16 09:52:35 -07:00
SampleCode.cpp Add samples to Viewer. 2016-06-16 09:52:35 -07:00
SampleCode.h Add samples to Viewer. 2016-06-16 09:52:35 -07:00
SampleColorFilter.cpp Rein in the use of SkDevice.h 2016-04-20 05:29:51 -07:00
SampleComplexClip.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleConcavePaths.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleDash.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleDegenerateTwoPtRadials.cpp use Make instead of Create to return a shared shader 2016-03-08 18:50:00 -08:00
SampleDither.cpp Factor code to rotate a canvas about a point. 2016-07-12 15:01:19 -07:00
SampleDitherBitmap.cpp use Make instead of Create to return a shared shader 2016-03-08 18:50:00 -08:00
SampleDraw.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleEffects.cpp switch maskfilters to sk_sp 2016-04-04 10:02:58 -07:00
SampleEmboss.cpp switch maskfilters to sk_sp 2016-04-04 10:02:58 -07:00
SampleFatBits.cpp switch surface to sk_sp 2016-03-23 18:59:25 -07:00
SampleFillType.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleFilter2.cpp Remove uses of SkImageDecoder from samplecode 2016-03-18 15:48:49 -07:00
SampleFilter.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleFilterFuzz.cpp Convert SkAutoTUnref<SkData> to sk_sp<SkData>. 2016-08-03 13:32:32 -07:00
SampleFilterQuality.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleFontCache.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleFontScalerTest.cpp Factor code to rotate a canvas about a point. 2016-07-12 15:01:19 -07:00
SampleFuzz.cpp switch maskfilters to sk_sp 2016-04-04 10:02:58 -07:00
SampleGradients.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleHairCurves.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleHairline.cpp Remove uses of SkImageDecoder from samplecode 2016-03-18 15:48:49 -07:00
SampleHairModes.cpp Rein in the use of SkDevice.h 2016-04-20 05:29:51 -07:00
SampleHT.cpp Factor code to rotate a canvas about a point. 2016-07-12 15:01:19 -07:00
SampleIdentityScale.cpp Remove uses of SkImageDecoder from samplecode 2016-03-18 15:48:49 -07:00
SampleLayerMask.cpp Style Change: NULL->nullptr 2015-08-27 07:41:16 -07:00
SampleLayers.cpp Hide SkCanvas::LayerIter 2016-04-21 11:05:33 -07:00
SampleLCD.cpp Rein in the use of SkDevice.h 2016-04-20 05:29:51 -07:00
SampleLighting.cpp Added PointLights to SkLights::Light 2016-08-12 11:38:47 -07:00
SampleLines.cpp Remove uses of SkImageDecoder from samplecode 2016-03-18 15:48:49 -07:00
SampleLitAtlas.cpp Added PointLights to SkLights::Light 2016-08-12 11:38:47 -07:00
SampleLua.cpp Move off SK_SUPPORT_LEGACY_DATA_FACTORIES. 2016-08-02 14:40:46 -07:00
SampleManyRects.cpp Rein in the use of SkDevice.h 2016-04-20 05:29:51 -07:00
SampleMeasure.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleMegaStroke.cpp add new tests 2016-01-30 10:11:21 -08:00
SamplePatch.cpp Remove uses of SkImageDecoder from samplecode 2016-03-18 15:48:49 -07:00
SamplePath.cpp Reverse dependency between SkScalar.h and SkFixed.h. 2016-04-07 08:49:31 -07:00
SamplePathClip.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SamplePathEffects.cpp guard rasterizer and drawlooper setters 2016-03-21 13:25:16 -07:00
SamplePathFill.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SamplePathFuzz.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SamplePathOverstroke.cpp Add cubic example and draw original path 2016-06-30 10:04:21 -07:00
SamplePdfFileViewer.cpp Remove uses of SkImageDecoder from samplecode 2016-03-18 15:48:49 -07:00
SamplePictFile.cpp Remove uses of SkImageDecoder from samplecode 2016-03-18 15:48:49 -07:00
SamplePoints.cpp Remove uses of SkImageDecoder from samplecode 2016-03-18 15:48:49 -07:00
SamplePolyToPoly.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleQuadStroker.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleRectanizer.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleRegion.cpp Remove uses of SkImageDecoder from samplecode 2016-03-18 15:48:49 -07:00
SampleRepeatTile.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleShaders.cpp switch xfermodes over to sk_sp 2016-03-29 11:32:50 -07:00
SampleShaderText.cpp use Make instead of Create to return a shared shader 2016-03-08 18:50:00 -08:00
SampleShadowing.cpp Moved "drawShadowedPicture" call outside of if cases in onDrawContent. 2016-08-16 05:38:45 -07:00
SampleShip.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleSkLayer.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleSlides.cpp SkTypeface::MakeFromName to take SkFontStyle. 2016-05-31 11:42:37 -07:00
SampleStringArt.cpp Style Change: NULL->nullptr 2015-08-27 07:41:16 -07:00
SampleStrokePath.cpp switch maskfilters to sk_sp 2016-04-04 10:02:58 -07:00
SampleStrokeRect.cpp Rein in the use of SkDevice.h 2016-04-20 05:29:51 -07:00
SampleSubpixelTranslate.cpp Remove uses of SkImageDecoder from samplecode 2016-03-18 15:48:49 -07:00
SampleSVGFile.cpp [SVGDom] Deferred SampleApp parsing 2016-08-15 07:48:47 -07:00
SampleSVGPong.cpp [SVGDom] SVGPong sample app 2016-08-12 13:17:11 -07:00
SampleText.cpp Move SkTypeface to sk_sp. 2016-05-12 10:09:31 -07:00
SampleTextAlpha.cpp Rein in the use of SkDevice.h 2016-04-20 05:29:51 -07:00
SampleTextBox.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleTextOnPath.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleTextureDomain.cpp switch maskfilters to sk_sp 2016-04-04 10:02:58 -07:00
SampleTiling.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleTinyBitmap.cpp use Make instead of Create to return a shared shader 2016-03-08 18:50:00 -08:00
SampleUnpremul.cpp guard rasterizer and drawlooper setters 2016-03-21 13:25:16 -07:00
SampleVertices.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleWritePixels.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleXfer.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleXfermodesBlur.cpp SkTypeface::MakeFromName to take SkFontStyle. 2016-05-31 11:42:37 -07:00
vertexdump.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00