Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Issue 395603002: Simplify flattening to just write enough to call the factory (Closed)

Created:
6 years, 5 months ago by reed1
Modified:
6 years, 4 months ago
CC:
reviews_skia.org, fmalita_google_do_not_use
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Simplify flattening to just write enough to call the factory/public-constructor for the class. We want to *not* rely on private constructors, and not rely on calling through the inheritance hierarchy for either flattening or unflattening(CreateProc). Refactoring pattern: 1. guard the existing constructor(readbuffer) with the legacy build-flag 2. If you are a instancable subclass, implement CreateProc(readbuffer) to create a new instances from the buffer params (or return NULL). If you're a shader subclass 1. You must read/write the local matrix if your class accepts that in its factory/constructor, else ignore it. Committed: https://skia.googlesource.com/skia/+/9fa60daad4d5f54c0dbe3dbcc7608a8f6d721187

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 9

Patch Set 4 : revised understanding : input filter count is requred, but elements may be null #

Total comments: 2

Patch Set 5 : #

Patch Set 6 : use SK_IMAGEFILTER_UNFLATTEN_COMMON macro #

Patch Set 7 : all imagefilters edited (afaik) #

Patch Set 8 : fix most of xfermodes #

Patch Set 9 : #

Patch Set 10 : rebase #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : rebase #

Patch Set 14 : #

Total comments: 6

Patch Set 15 : address review comments #

Patch Set 16 : dm now passes locally #

Patch Set 17 : simplify xfermodes, fix SkLayerDrawLooper #

Total comments: 32

Patch Set 18 : fix registration of custom filters in GMs #

Patch Set 19 : fix review comments -- expectedCount can be < 0 #

Patch Set 20 : make createprocs private, so we catch unnecessary registrants #

Patch Set 21 : #

Patch Set 22 : update SkGlobalInitialization_chromium.cpp so chrome can build #

Patch Set 23 : use friend class instead of function to better hide how we initialize #

Total comments: 8

Patch Set 24 : rebase #

Patch Set 25 : rename inputAt -> getInput #

Patch Set 26 : update dox so calling base flattening() is not needed #

Patch Set 27 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1542 lines, -536 lines) Patch
M gm/imagefiltersbase.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 chunks +33 lines, -15 lines 0 comments Download
M gm/imagefiltersgraph.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +19 lines, -5 lines 0 comments Download
M include/core/SkColorFilter.h View 1 chunk +2 lines, -0 lines 0 comments Download
M include/core/SkDrawLooper.h View 1 chunk +2 lines, -0 lines 0 comments Download
M include/core/SkFlattenable.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 5 chunks +64 lines, -14 lines 0 comments Download
M include/core/SkImageFilter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 chunks +25 lines, -4 lines 0 comments Download
M include/core/SkMaskFilter.h View 1 chunk +2 lines, -0 lines 0 comments Download
M include/core/SkPathEffect.h View 1 2 3 4 5 6 7 8 4 chunks +11 lines, -0 lines 0 comments Download
M include/core/SkPicture.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +1 line, -1 line 0 comments Download
M include/core/SkRasterizer.h View 1 chunk +2 lines, -0 lines 0 comments Download
M include/core/SkShader.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M include/core/SkXfermode.h View 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/Sk1DPathEffect.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/Sk2DPathEffect.h View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -0 lines 0 comments Download
M include/effects/SkAvoidXfermode.h View 1 2 1 chunk +4 lines, -1 line 0 comments Download
M include/effects/SkBitmapSource.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/SkBlurDrawLooper.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/SkBlurImageFilter.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/SkColorFilterImageFilter.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/SkColorMatrixFilter.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/SkComposeImageFilter.h View 1 2 3 2 chunks +13 lines, -2 lines 0 comments Download
M include/effects/SkCornerPathEffect.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/SkDashPathEffect.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -3 lines 0 comments Download
M include/effects/SkDiscretePathEffect.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/SkDisplacementMapEffect.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +3 lines, -5 lines 0 comments Download
M include/effects/SkDropShadowImageFilter.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/SkEmbossMaskFilter.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/SkLayerDrawLooper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +7 lines, -1 line 0 comments Download
M include/effects/SkLayerRasterizer.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/SkLerpXfermode.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/SkLightingImageFilter.h View 1 2 3 4 5 6 1 chunk +4 lines, -2 lines 0 comments Download
M include/effects/SkLumaColorFilter.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/SkMagnifierImageFilter.h View 1 2 3 4 5 6 1 chunk +3 lines, -4 lines 0 comments Download
M include/effects/SkMatrixConvolutionImageFilter.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/SkMatrixImageFilter.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/SkMergeImageFilter.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/SkMorphologyImageFilter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 chunks +12 lines, -0 lines 0 comments Download
M include/effects/SkOffsetImageFilter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +5 lines, -0 lines 0 comments Download
M include/effects/SkPerlinNoiseShader.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/SkPictureImageFilter.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/SkPixelXorXfermode.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/SkRectShaderImageFilter.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/SkTableMaskFilter.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M include/effects/SkTestImageFilters.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +9 lines, -0 lines 0 comments Download
M include/effects/SkTileImageFilter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +3 lines, -3 lines 0 comments Download
M include/effects/SkTransparentShader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +5 lines, -0 lines 0 comments Download
M include/effects/SkXfermodeImageFilter.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M samplecode/ClockFaceView.cpp View 1 2 3 4 5 6 7 8 3 chunks +16 lines, -1 line 0 comments Download
M samplecode/SampleAll.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M src/core/SkBitmapProcShader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -0 lines 0 comments Download
M src/core/SkBitmapProcShader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +17 lines, -4 lines 0 comments Download
M src/core/SkBlitter.cpp View 1 2 chunks +7 lines, -4 lines 0 comments Download
M src/core/SkComposeShader.cpp View 1 3 chunks +13 lines, -3 lines 0 comments Download
M src/core/SkDraw.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -3 lines 0 comments Download
M src/core/SkEmptyShader.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/core/SkFilterShader.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M src/core/SkFilterShader.cpp View 1 1 chunk +12 lines, -3 lines 0 comments Download
M src/core/SkFlattenable.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +6 lines, -7 lines 0 comments Download
M src/core/SkImageFilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +4 lines, -4 lines 0 comments Download
M src/core/SkLocalMatrixShader.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/core/SkLocalMatrixShader.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +13 lines, -1 line 0 comments Download
M src/core/SkPathEffect.cpp View 1 2 3 4 5 6 7 8 2 chunks +14 lines, -1 line 0 comments Download
M src/core/SkPictureShader.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +15 lines, -4 lines 0 comments Download
M src/core/SkReadBuffer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M src/core/SkShader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +12 lines, -1 line 0 comments Download
M src/core/SkXfermode.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 9 chunks +26 lines, -27 lines 0 comments Download
M src/core/SkXfermode_proccoeff.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +11 lines, -11 lines 0 comments Download
M src/effects/Sk1DPathEffect.cpp View 1 2 2 chunks +14 lines, -1 line 0 comments Download
M src/effects/Sk2DPathEffect.cpp View 1 2 3 chunks +24 lines, -4 lines 0 comments Download
M src/effects/SkAlphaThresholdFilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +13 lines, -0 lines 0 comments Download
M src/effects/SkArithmeticMode.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +13 lines, -1 line 0 comments Download
M src/effects/SkAvoidXfermode.cpp View 1 chunk +12 lines, -6 lines 0 comments Download
M src/effects/SkBitmapSource.cpp View 1 2 3 chunks +20 lines, -8 lines 0 comments Download
M src/effects/SkBlurDrawLooper.cpp View 2 chunks +12 lines, -2 lines 0 comments Download
M src/effects/SkBlurImageFilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 chunks +9 lines, -0 lines 0 comments Download
M src/effects/SkBlurMaskFilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +16 lines, -4 lines 0 comments Download
M src/effects/SkColorFilterImageFilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +7 lines, -1 line 0 comments Download
M src/effects/SkColorFilters.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 9 chunks +15 lines, -32 lines 0 comments Download
M src/effects/SkColorMatrixFilter.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +11 lines, -3 lines 0 comments Download
M src/effects/SkComposeImageFilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +8 lines, -18 lines 0 comments Download
M src/effects/SkCornerPathEffect.cpp View 1 2 1 chunk +6 lines, -1 line 0 comments Download
M src/effects/SkDashPathEffect.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +10 lines, -6 lines 0 comments Download
M src/effects/SkDiscretePathEffect.cpp View 1 2 1 chunk +10 lines, -1 line 0 comments Download
M src/effects/SkDisplacementMapEffect.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 chunks +26 lines, -0 lines 0 comments Download
M src/effects/SkDropShadowImageFilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +13 lines, -2 lines 0 comments Download
M src/effects/SkEmbossMaskFilter.cpp View 1 chunk +13 lines, -4 lines 0 comments Download
M src/effects/SkLayerDrawLooper.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +1 line, -30 lines 0 comments Download
M src/effects/SkLayerRasterizer.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +7 lines, -1 line 0 comments Download
M src/effects/SkLerpXfermode.cpp View 1 chunk +7 lines, -3 lines 0 comments Download
M src/effects/SkLightingImageFilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 5 chunks +156 lines, -79 lines 0 comments Download
M src/effects/SkLumaColorFilter.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -7 lines 0 comments Download
M src/effects/SkMagnifierImageFilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 chunks +25 lines, -4 lines 0 comments Download
M src/effects/SkMatrixConvolutionImageFilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 chunks +40 lines, -12 lines 0 comments Download
M src/effects/SkMatrixImageFilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +10 lines, -0 lines 0 comments Download
M src/effects/SkMergeImageFilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +28 lines, -1 line 0 comments Download
M src/effects/SkMorphologyImageFilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 4 chunks +16 lines, -1 line 0 comments Download
M src/effects/SkOffsetImageFilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +9 lines, -0 lines 0 comments Download
M src/effects/SkPerlinNoiseShader.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +23 lines, -5 lines 0 comments Download
M src/effects/SkPictureImageFilter.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +18 lines, -1 line 0 comments Download
M src/effects/SkPixelXorXfermode.cpp View 1 chunk +7 lines, -3 lines 0 comments Download
M src/effects/SkRectShaderImageFilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +7 lines, -1 line 0 comments Download
M src/effects/SkTableColorFilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +53 lines, -5 lines 0 comments Download
M src/effects/SkTableMaskFilter.cpp View 1 chunk +11 lines, -3 lines 0 comments Download
M src/effects/SkTestImageFilters.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +7 lines, -1 line 0 comments Download
M src/effects/SkTileImageFilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +18 lines, -0 lines 0 comments Download
M src/effects/SkTransparentShader.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -0 lines 0 comments Download
M src/effects/SkXfermodeImageFilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +8 lines, -0 lines 0 comments Download
M src/effects/gradients/SkGradientShader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 8 chunks +98 lines, -30 lines 0 comments Download
M src/effects/gradients/SkGradientShaderPriv.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +25 lines, -1 line 0 comments Download
M src/effects/gradients/SkLinearGradient.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M src/effects/gradients/SkLinearGradient.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +14 lines, -0 lines 0 comments Download
M src/effects/gradients/SkRadialGradient.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M src/effects/gradients/SkRadialGradient.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +13 lines, -0 lines 0 comments Download
M src/effects/gradients/SkSweepGradient.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +3 lines, -0 lines 0 comments Download
M src/effects/gradients/SkSweepGradient.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +12 lines, -0 lines 0 comments Download
M src/effects/gradients/SkTwoPointConicalGradient.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M src/effects/gradients/SkTwoPointConicalGradient.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +41 lines, -2 lines 0 comments Download
M src/effects/gradients/SkTwoPointRadialGradient.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M src/effects/gradients/SkTwoPointRadialGradient.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +17 lines, -2 lines 0 comments Download
M src/opts/SkXfermode_opts_SSE2.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M src/opts/SkXfermode_opts_SSE2.cpp View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -2 lines 0 comments Download
M src/opts/SkXfermode_opts_arm_neon.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -1 line 0 comments Download
M src/opts/SkXfermode_opts_arm_neon.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -2 lines 0 comments Download
M src/ports/SkGlobalInitialization_chromium.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +55 lines, -52 lines 0 comments Download
M src/ports/SkGlobalInitialization_default.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +55 lines, -53 lines 0 comments Download
M tests/GLProgramsTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M tests/ImageFilterTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +13 lines, -0 lines 0 comments Download
M tests/LayerRasterizerTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -3 lines 0 comments Download

Messages

Total messages: 52 (0 generated)
reed1
not finished, but well on its way
6 years, 5 months ago (2014-07-15 19:31:58 UTC) #1
reed1
have now implemented ~3 imagefilters. Those might be worth looking at, to see if I'm ...
6 years, 5 months ago (2014-07-17 21:06:05 UTC) #2
Stephen White
Direction looks good. Comments are nits. https://codereview.chromium.org/395603002/diff/40001/include/core/SkColorFilter.h File include/core/SkColorFilter.h (right): https://codereview.chromium.org/395603002/diff/40001/include/core/SkColorFilter.h#newcode138 include/core/SkColorFilter.h:138: #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING Nanonit: ...
6 years, 5 months ago (2014-07-17 21:29:00 UTC) #3
reed1
https://codereview.chromium.org/395603002/diff/40001/include/core/SkColorFilter.h File include/core/SkColorFilter.h (right): https://codereview.chromium.org/395603002/diff/40001/include/core/SkColorFilter.h#newcode138 include/core/SkColorFilter.h:138: #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING On 2014/07/17 21:29:00, Stephen White wrote: > ...
6 years, 5 months ago (2014-07-18 13:40:30 UTC) #4
Stephen White
https://codereview.chromium.org/395603002/diff/40001/include/core/SkColorFilter.h File include/core/SkColorFilter.h (right): https://codereview.chromium.org/395603002/diff/40001/include/core/SkColorFilter.h#newcode138 include/core/SkColorFilter.h:138: #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING On 2014/07/18 13:40:29, reed1 wrote: > On ...
6 years, 5 months ago (2014-07-18 14:06:20 UTC) #5
reed1
On 2014/07/18 14:06:20, Stephen White wrote: > https://codereview.chromium.org/395603002/diff/40001/include/core/SkColorFilter.h > File include/core/SkColorFilter.h (right): > > https://codereview.chromium.org/395603002/diff/40001/include/core/SkColorFilter.h#newcode138 ...
6 years, 5 months ago (2014-07-18 14:13:37 UTC) #6
Stephen White
BTW, I'm wondering if we should remove all the calls to buffer.validate(), and simply take ...
6 years, 5 months ago (2014-07-18 14:17:21 UTC) #7
reed1
uploaded version that requires specified number of inputs, but those elements may be NULL.
6 years, 5 months ago (2014-07-18 14:28:34 UTC) #8
reed1
On 2014/07/18 14:17:21, Stephen White wrote: > BTW, I'm wondering if we should remove all ...
6 years, 5 months ago (2014-07-18 14:41:52 UTC) #9
Stephen White
https://codereview.chromium.org/395603002/diff/60001/src/effects/SkColorFilterImageFilter.cpp File src/effects/SkColorFilterImageFilter.cpp (right): https://codereview.chromium.org/395603002/diff/60001/src/effects/SkColorFilterImageFilter.cpp#newcode99 src/effects/SkColorFilterImageFilter.cpp:99: return Create(cf, common.inputAt(0), &common.cropRect()); I see you've removed the ...
6 years, 5 months ago (2014-07-18 15:43:32 UTC) #10
sugoi1
On 2014/07/18 15:43:32, Stephen White wrote: > https://codereview.chromium.org/395603002/diff/60001/src/effects/SkColorFilterImageFilter.cpp > File src/effects/SkColorFilterImageFilter.cpp (right): > > https://codereview.chromium.org/395603002/diff/60001/src/effects/SkColorFilterImageFilter.cpp#newcode99 ...
6 years, 5 months ago (2014-07-18 15:51:58 UTC) #11
reed1
https://codereview.chromium.org/395603002/diff/60001/src/effects/SkColorFilterImageFilter.cpp File src/effects/SkColorFilterImageFilter.cpp (right): https://codereview.chromium.org/395603002/diff/60001/src/effects/SkColorFilterImageFilter.cpp#newcode99 src/effects/SkColorFilterImageFilter.cpp:99: return Create(cf, common.inputAt(0), &common.cropRect()); On 2014/07/18 15:43:32, Stephen White ...
6 years, 5 months ago (2014-07-18 16:18:47 UTC) #12
Stephen White
On 2014/07/18 16:18:47, reed1 wrote: > https://codereview.chromium.org/395603002/diff/60001/src/effects/SkColorFilterImageFilter.cpp > File src/effects/SkColorFilterImageFilter.cpp (right): > > https://codereview.chromium.org/395603002/diff/60001/src/effects/SkColorFilterImageFilter.cpp#newcode99 > ...
6 years, 5 months ago (2014-07-18 17:05:26 UTC) #13
reed1
On 2014/07/18 17:05:26, Stephen White wrote: > On 2014/07/18 16:18:47, reed1 wrote: > > > ...
6 years, 5 months ago (2014-07-18 17:27:28 UTC) #14
Stephen White
On 2014/07/18 17:27:28, reed1 wrote: > On 2014/07/18 17:05:26, Stephen White wrote: > > On ...
6 years, 5 months ago (2014-07-18 17:33:53 UTC) #15
sugoi1
On 2014/07/18 17:33:53, Stephen White wrote: > On 2014/07/18 17:27:28, reed1 wrote: > > On ...
6 years, 5 months ago (2014-07-18 17:45:02 UTC) #16
reed1
On 2014/07/18 17:45:02, sugoi1 wrote: > On 2014/07/18 17:33:53, Stephen White wrote: > > On ...
6 years, 5 months ago (2014-07-18 19:01:26 UTC) #17
reed1
this is ready for review. only known problem is around twopointgradients needing another reversal, so ...
6 years, 4 months ago (2014-08-18 15:35:18 UTC) #18
Stephen White
https://codereview.chromium.org/395603002/diff/260001/include/core/SkImageFilter.h File include/core/SkImageFilter.h (right): https://codereview.chromium.org/395603002/diff/260001/include/core/SkImageFilter.h#newcode338 include/core/SkImageFilter.h:338: #define SK_IMAGEFILTER_UNFLATTEN_COMMON(expectedCount) \ This macro is too much magic, ...
6 years, 4 months ago (2014-08-18 18:17:26 UTC) #19
sugoi1
On 2014/08/18 18:17:26, Stephen White wrote: > https://codereview.chromium.org/395603002/diff/260001/include/core/SkImageFilter.h > File include/core/SkImageFilter.h (right): > > https://codereview.chromium.org/395603002/diff/260001/include/core/SkImageFilter.h#newcode338 ...
6 years, 4 months ago (2014-08-18 20:10:17 UTC) #20
reed1
https://codereview.chromium.org/395603002/diff/260001/include/core/SkImageFilter.h File include/core/SkImageFilter.h (right): https://codereview.chromium.org/395603002/diff/260001/include/core/SkImageFilter.h#newcode338 include/core/SkImageFilter.h:338: #define SK_IMAGEFILTER_UNFLATTEN_COMMON(expectedCount) \ On 2014/08/18 18:17:26, Stephen White wrote: ...
6 years, 4 months ago (2014-08-18 22:39:16 UTC) #21
robertphillips
https://codereview.chromium.org/395603002/diff/320001/gm/gradients_2pt_conical.cpp File gm/gradients_2pt_conical.cpp (right): https://codereview.chromium.org/395603002/diff/320001/gm/gradients_2pt_conical.cpp#newcode338 gm/gradients_2pt_conical.cpp:338: canvas->save(); Why are we skipping these cases now ? ...
6 years, 4 months ago (2014-08-19 15:23:27 UTC) #22
sugoi1
https://codereview.chromium.org/395603002/diff/320001/gm/gradients_2pt_conical.cpp File gm/gradients_2pt_conical.cpp (right): https://codereview.chromium.org/395603002/diff/320001/gm/gradients_2pt_conical.cpp#newcode335 gm/gradients_2pt_conical.cpp:335: const int count = gGradCases[fGradCaseType].fCount; This may have been ...
6 years, 4 months ago (2014-08-19 18:46:18 UTC) #23
reed1
https://codereview.chromium.org/395603002/diff/320001/gm/gradients_2pt_conical.cpp File gm/gradients_2pt_conical.cpp (right): https://codereview.chromium.org/395603002/diff/320001/gm/gradients_2pt_conical.cpp#newcode338 gm/gradients_2pt_conical.cpp:338: canvas->save(); On 2014/08/19 15:23:27, robertphillips wrote: > Why are ...
6 years, 4 months ago (2014-08-19 19:58:06 UTC) #24
reed1
The CQ bit was checked by reed@google.com
6 years, 4 months ago (2014-08-20 01:20:20 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/reed@google.com/395603002/420001
6 years, 4 months ago (2014-08-20 01:20:35 UTC) #26
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
6 years, 4 months ago (2014-08-20 01:20:37 UTC) #27
reed1
The CQ bit was unchecked by reed@google.com
6 years, 4 months ago (2014-08-20 01:21:44 UTC) #28
reed1
The CQ bit was checked by reed@google.com
6 years, 4 months ago (2014-08-20 13:23:24 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/reed@google.com/395603002/440001
6 years, 4 months ago (2014-08-20 13:24:02 UTC) #30
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
6 years, 4 months ago (2014-08-20 13:24:04 UTC) #31
reed1
The CQ bit was unchecked by reed@google.com
6 years, 4 months ago (2014-08-20 13:36:45 UTC) #32
reed1
The CQ bit was checked by reed@google.com
6 years, 4 months ago (2014-08-20 21:11:15 UTC) #33
reed1
ptal
6 years, 4 months ago (2014-08-20 21:11:25 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/reed@google.com/395603002/460001
6 years, 4 months ago (2014-08-20 21:11:27 UTC) #35
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
6 years, 4 months ago (2014-08-20 21:11:29 UTC) #36
Stephen White
https://codereview.chromium.org/395603002/diff/440001/include/core/SkImageFilter.h File include/core/SkImageFilter.h (right): https://codereview.chromium.org/395603002/diff/440001/include/core/SkImageFilter.h#newcode216 include/core/SkImageFilter.h:216: bool unflatten(SkReadBuffer&, int expectedInputs = -1); Unrelated to this ...
6 years, 4 months ago (2014-08-20 21:23:15 UTC) #37
reed1
https://codereview.chromium.org/395603002/diff/440001/include/core/SkImageFilter.h File include/core/SkImageFilter.h (right): https://codereview.chromium.org/395603002/diff/440001/include/core/SkImageFilter.h#newcode216 include/core/SkImageFilter.h:216: bool unflatten(SkReadBuffer&, int expectedInputs = -1); On 2014/08/20 21:23:15, ...
6 years, 4 months ago (2014-08-20 22:04:15 UTC) #38
reed1
The CQ bit was checked by reed@google.com
6 years, 4 months ago (2014-08-20 22:26:43 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/reed@google.com/395603002/500001
6 years, 4 months ago (2014-08-20 22:27:19 UTC) #40
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
6 years, 4 months ago (2014-08-20 22:27:21 UTC) #41
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-21 04:27:19 UTC) #42
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Please ask for an LGTM from a full ...
6 years, 4 months ago (2014-08-21 04:27:21 UTC) #43
reed1
ptal
6 years, 4 months ago (2014-08-21 12:28:14 UTC) #44
Stephen White
LGTM
6 years, 4 months ago (2014-08-21 13:58:41 UTC) #45
reed1
The CQ bit was checked by reed@google.com
6 years, 4 months ago (2014-08-21 14:50:14 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/reed@google.com/395603002/520001
6 years, 4 months ago (2014-08-21 14:51:14 UTC) #47
commit-bot: I haz the power
Committed patchset #27 (520001) as 9fa60daad4d5f54c0dbe3dbcc7608a8f6d721187
6 years, 4 months ago (2014-08-21 15:00:10 UTC) #48
Stephen White
This change seems to have caused a large performance regression in SVG filters in Chrome ...
6 years, 4 months ago (2014-08-23 18:08:48 UTC) #49
reed1
On 2014/08/23 18:08:48, Stephen White wrote: > This change seems to have caused a large ...
6 years, 4 months ago (2014-08-25 12:22:27 UTC) #50
Stephen White
On 2014/08/25 12:22:27, reed1 wrote: > On 2014/08/23 18:08:48, Stephen White wrote: > > This ...
6 years, 4 months ago (2014-08-25 14:30:05 UTC) #51
reed1
6 years, 4 months ago (2014-08-25 14:40:26 UTC) #52
Message was sent while issue was closed.
On 2014/08/25 14:30:05, Stephen White wrote:
> On 2014/08/25 12:22:27, reed1 wrote:
> > On 2014/08/23 18:08:48, Stephen White wrote:
> > > This change seems to have caused a large performance regression in SVG
> filters
> > > in Chrome (found by hand-bisecting the skia roll):
> > > 
> > >
> >
>
https://chromeperf.appspot.com/report?masters=ChromiumPerf&bots=android-motoe...
> > > 
> > > Strange, since it should've been a no-op. I'll investigate further.
> > 
> > Will be interesting to see a profile. Since so much did get re-arranged,
> perhaps
> > we're just missing a fast-case we used to take.
> 
> I'm pretty sure I know what's going on now.
> 
> The old deserialization constructor copies the (deserialized) Common's
uniqueID
> into the SkImageFilter's uniqueID. The new path doesn't. This defeats
> SkImageFilter's caching under impl-side painting, since without the ID, the
> system has no way of connecting the filters created in Blink with the ones
> deserialized in Skia.
> 
> Looks like at a minimum, we'll have to add the uniqueID to each filter's
> constructor. Then we have two options, basically:
> 
> 1) Add a uniqueID parameter to each (public) Create() function, and have the
> CreateProcs pass common's uniqueID.
> 2) Change the CreateProc's to call the (private) constructors directly, and
pass
> the uniqueID there.
> 
> I'm in favour of #2, since it doesn't expose the uniqueID to the public API.
It
> may require duplicating some checks from the
> Create() in the CreateProc(), but actually many of them can probably be
removed,
> since they're ineffective in the face of
> a negative-scaling CTM anyway.

Perhaps you could VC with Brian and me to talk about this. It seems that two
"creations" can't hit the same cache entry with uniqueIDs, but if we flattened
the parameters state (as we did for all effects in the old picture world) we
could create a key that would match. In that world we wouldn't need to
read/write uniqueIDs.

Powered by Google App Engine
This is Rietveld 408576698