skia2/include/core
Michael Ludwig 08b260c27b Refactor complex CTM management for image filters
This consolidates the scale decomposition and SkMatrixImageFilter logic
that SkCanvas did during a layer save into an applyCTM function. It is
expanded to handle the extra transformation steps for backdrops.

The backdrop logic in SkCanvas has also been updated to only snap the
necessary portion of the buffer, and also use applyCTM. Previously any
backdrop filter with a CTM beyond scale/translate would do no filtering.

Unfortunately, perspective has caused too many headaches to solve in a
single CL, so its issues are recorded at skbug.com/9074.

Other minor fixes that were encountered while working on this:
- Raster's CopyFromRaster() incorrectly held onto the subset after copying.
  (unfortunately it looks like snapBackImage() needs to copy; referencing
   the subset directly corrupted the output).
- SkLocalMatrixImageFilter now supports complex CTMs assuming its input
  supports CTMs.
- CropRects need to apply in the source coordinate system, but are not
  aware of complex CTMs when performing clipping. For a simple fix, any
  filter with a crop rect set cannot support complex CTMs until that's
  updated.

Bug: skia:9074, chromium:959412
Change-Id: I1276a4ec400dfefb958c14beda078bdf1d087baa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213080
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-05-17 16:12:11 +00:00
..
SkAnnotation.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkBBHFactory.h simplify rtree loops in Skia too 2019-05-15 15:42:10 +00:00
SkBitmap.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkBlendMode.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkBlurTypes.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkCanvas.h Use SkTextEncoding enum instead of macros. 2019-05-07 20:54:16 +00:00
SkCanvasVirtualEnforcer.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkClipOp.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkColor.h SkColors: Fix new color constants 2019-05-03 16:50:46 +00:00
SkColorFilter.h Reland "Reland "remove legacy 255-biased colormatrix"" 2019-05-13 12:57:41 +00:00
SkColorPriv.h cut SK_SAMPLES_FOR_X, simplify SK_?32_SHIFT 2019-04-24 20:58:58 +00:00
SkColorSpace.h preserve comments past the #include "" 2019-05-14 19:35:34 +00:00
SkContourMeasure.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkCoverageMode.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkCubicMap.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkData.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkDataTable.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkDeferredDisplayListRecorder.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkDeque.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkDocument.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkDrawable.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkDrawLooper.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkEncodedImageFormat.h GOOGLE3 -> SK_BUILD_FOR_GOOGLE3 2017-12-19 14:42:16 +00:00
SkExecutor.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkFilterQuality.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkFlattenable.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkFont.h Introduce SkStrikeSpecStorage. 2019-05-13 21:01:47 +00:00
SkFontArguments.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkFontLCDConfig.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkFontMetrics.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkFontMgr.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkFontParameters.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkFontStyle.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkFontTypes.h Reland "Remove includes from SkFontTypes.h" 2019-04-17 22:07:49 +00:00
SkGraphics.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkICC.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkImage.h Reland "Add flush() to SkImage." 2019-05-09 15:07:51 +00:00
SkImageEncoder.h Revert "add runtime registration for encoders" 2019-05-15 22:02:39 +00:00
SkImageFilter.h Refactor complex CTM management for image filters 2019-05-17 16:12:11 +00:00
SkImageGenerator.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkImageInfo.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkMallocPixelRef.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkMaskFilter.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkMath.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkMatrix44.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkMatrix.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkMilestone.h Update Skia milestone to 76 2019-04-18 12:24:23 +00:00
SkMultiPictureDraw.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkOverdrawCanvas.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkPaint.h SkPaint: new constructor 2019-05-02 19:52:07 +00:00
SkPath.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkPathEffect.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkPathMeasure.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkPicture.h remove SkMiniPicture and co. 2019-05-14 19:19:44 +00:00
SkPictureRecorder.h remove SkMiniPicture and co. 2019-05-14 19:19:44 +00:00
SkPixelRef.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkPixmap.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkPngChunkReader.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkPoint3.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkPoint.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkPostConfig.h cut SK_SAMPLES_FOR_X, simplify SK_?32_SHIFT 2019-04-24 20:58:58 +00:00
SkPreConfig.h Revert "simplify and centralize SK_API" 2019-04-22 18:09:45 +00:00
SkPromiseImageTexture.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkRasterHandleAllocator.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkRect.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkRefCnt.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkRegion.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkRRect.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkRSXform.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkRWBuffer.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkScalar.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkSerialProcs.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkShader.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkSize.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkStream.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkString.h IWYU for SkTLogic.h 2019-05-02 21:17:37 +00:00
SkStrokeRec.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkSurface.h Add SkSurface::asyncReadPixels() 2019-05-10 19:13:07 +00:00
SkSurfaceCharacterization.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkSurfaceProps.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkSwizzle.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkTextBlob.h Use SkTextEncoding enum instead of macros. 2019-05-07 20:54:16 +00:00
SkTileMode.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkTime.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkTraceMemoryDump.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkTypeface.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkTypes.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkUnPreMultiply.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkVertices.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkYUVAIndex.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkYUVASizeInfo.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00