skia2/samplecode
Leon Scroggins III 42ee284567 Use SkAndroidCodec in SkAnimatedImage
Bug: b/63909536
Bug: b/63908092

SkAnimatedImage is designed around a specific Android use case, so move
it into the android folders.

Make SkAnimatedImage hold an SkAndroidCodec (instead of an SkCodec).
Expose fCodec so that SkAnimatedImage can animate by using the internal
SkCodec.

Update the sample to use SkAndroidCodec.

Allow webp to decode a scaled down animation. For RestoreBG frames,
adjust the frameRect (which is erased) to account for the scaling. Add
a test to verify that we decode a webp with a RestoreBG frame
successfully. Disable scaling for later frames in other formats (GIF,
for now), since the code for erasing a RestoreBG frame is currently
unaware of the sampling.

Change-Id: I5dd2b86138f2c7f6adcd08dce1bd49040f7dc224
Reviewed-on: https://skia-review.googlesource.com/94621
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2018-01-16 20:36:09 +00:00
..
ClockFaceView.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
DecodeFile.h
PerlinPatch.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
Sample2PtRadial.cpp
SampleAAClip.cpp
SampleAAGeometry.cpp Remove more views code, just to simplify things 2017-12-01 17:12:49 +00:00
SampleAARectModes.cpp
SampleAARects.cpp Revert "efficiently dash very large rectangles and very long lines" 2017-12-19 20:20:17 +00:00
SampleAll.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleAndroidShadows.cpp Fix alpha contribution to tonal color. 2017-12-19 19:27:06 +00:00
SampleAnimatedImage.cpp Use SkAndroidCodec in SkAnimatedImage 2018-01-16 20:36:09 +00:00
SampleAnimatedText.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleAnimator.cpp
SampleAnimBlur.cpp
SampleArc.cpp Remove more views code, just to simplify things 2017-12-01 17:12:49 +00:00
SampleAtlas.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleBigBlur.cpp
SampleBigGradient.cpp turn on extended Clang warnings on Windows too 2017-12-04 19:29:51 +00:00
SampleBitmapRect.cpp
SampleBlur.cpp
SampleCamera.cpp Remove more views code, just to simplify things 2017-12-01 17:12:49 +00:00
SampleCCPRGeometry.cpp CCPR: Rename GrCCPR* -> GrCC* 2018-01-08 22:51:11 +00:00
SampleChart.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleChineseFling.cpp resources: resource identifiers don't begin with leading slash 2017-12-08 20:03:18 +00:00
SampleCircle.cpp
SampleClamp.cpp
SampleClip.cpp
SampleClipDrawMatch.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleClock.cpp
SampleCode.cpp Remove more views code, just to simplify things 2017-12-01 17:12:49 +00:00
SampleCode.h Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleColorFilter.cpp
SampleComplexClip.cpp
SampleConcavePaths.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleCowboy.cpp Revert "Revert "resources: remove most uses of GetResourcePath()"" 2017-12-09 01:27:50 +00:00
SampleDash.cpp
SampleDegenerateTwoPtRadials.cpp
SampleDither.cpp Revert "efficiently dash very large rectangles and very long lines" 2017-12-19 20:20:17 +00:00
SampleEffects.cpp Alloc glyph image correctly for SkMask::k3D_Format. 2017-11-14 17:38:34 +00:00
SampleEmboss.cpp
SampleFatBits.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleFillType.cpp
SampleFilter2.cpp Remove more views code, just to simplify things 2017-12-01 17:12:49 +00:00
SampleFilterFuzz.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleFilterQuality.cpp resources: orgainize directory. 2017-12-08 17:16:00 +00:00
SampleFontCache.cpp
SampleFontScalerTest.cpp
SampleFuzz.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleGradients.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleHairCurves.cpp
SampleHairline.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleHairModes.cpp
SampleHT.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleIdentityScale.cpp Revert "Revert "resources: remove most uses of GetResourcePath()"" 2017-12-09 01:27:50 +00:00
SampleLayerMask.cpp
SampleLayers.cpp resources: orgainize directory. 2017-12-08 17:16:00 +00:00
SampleLCD.cpp
SampleLines.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleLua.cpp Fix SampleLua build 2017-12-11 17:15:40 +00:00
SampleManyRects.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleMeasure.cpp
SampleMegaStroke.cpp Remove more views code, just to simplify things 2017-12-01 17:12:49 +00:00
SamplePatch.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SamplePath.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SamplePathClip.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SamplePathEffects.cpp
SamplePathFill.cpp
SamplePathFinder.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SamplePathFuzz.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SamplePathOverstroke.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SamplePathText.cpp Add analytic clip FPs that read from the CCPR atlas 2017-12-05 18:06:18 +00:00
SamplePdfFileViewer.cpp
SamplePoints.cpp
SamplePolyToPoly.cpp Remove more views code, just to simplify things 2017-12-01 17:12:49 +00:00
SampleQuadStroker.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleRectanizer.cpp Fix leak in GM:Rectanizer 2017-12-24 17:06:42 +00:00
SampleRegion.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleRepeatTile.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleSGInval.cpp [sksg] Fix paint inval 2017-12-29 00:41:00 +00:00
SampleShaders.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleShaderText.cpp
SampleShadowColor.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleShadowReference.cpp resources: orgainize directory. 2017-12-08 17:16:00 +00:00
SampleShadowUtils.cpp Fix alpha contribution to tonal color. 2017-12-19 19:27:06 +00:00
SampleShip.cpp resources: orgainize directory. 2017-12-08 17:16:00 +00:00
SampleSlides.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleStringArt.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleStrokePath.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleStrokeRect.cpp
SampleSubpixelTranslate.cpp Revert "Revert "resources: remove most uses of GetResourcePath()"" 2017-12-09 01:27:50 +00:00
SampleSVGFile.cpp
SampleSVGPong.cpp Fix SVGPong slide crash in Viewer 2017-12-03 01:15:32 +00:00
SampleText.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleTextAlpha.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleTextBox.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleTextOnPath.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleTextureDomain.cpp
SampleTiling.cpp
SampleUnpremul.cpp resources: orgainize directory. 2017-12-08 17:16:00 +00:00
SampleVertices.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleWritePixels.cpp
SampleXfer.cpp Remove more views code, just to simplify things 2017-12-01 17:12:49 +00:00
SampleXfermodesBlur.cpp
vertexdump.cpp