aboutsummaryrefslogtreecommitdiffhomepage
path: root/gn
Commit message (Collapse)AuthorAge
* Use equal_range for factory lookupsGravatar Vladimir Levin2018-01-19
| | | | | | | | | | | | | | | | This patch uses equal_range instead of linear search to look up a factory entry by name. This does require a sort, but the expected usage is that the sort happens once and look ups happen many times. This improves performance on Chromium's oop deserialization of flattenables by about 10% R=reed@chromium.org Change-Id: I907f457a2ffb7d5b6d8261343099d982260b8415 Reviewed-on: https://skia-review.googlesource.com/96820 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Delete SkColorSpaceXformImageGenerator and SkImagePriv::SkMakeImageInColorSpaceGravatar Greg Daniel2018-01-19
| | | | | | | | | | | These don't seem to be used by anyone anymore so lets kill them. Bug: skia: Change-Id: I7908a9c9357e9e3b3166af9a14899dab522c3f11 Reviewed-on: https://skia-review.googlesource.com/97144 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* add shadermaskfilterGravatar Mike Reed2018-01-18
| | | | | | | | | | | | | | next steps: - gpu impl (will look a lot like shader's asFragProcessor - special-case rect-input (?) - explore stages w/ mtklein Bug: skia:7500 Change-Id: I71089e421d32443a3ddded6967b3e5bc67ed43f2 Reviewed-on: https://skia-review.googlesource.com/95104 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Extract a GrCCPathParser class that is decoupled from atlas opsGravatar Chris Dalton2018-01-18
| | | | | | | | | | | Allows coverage counts ultimately to be drawn either to an atlas or directly to the framebuffer. Bug: skia: Change-Id: I6cc07fce562c223381b89586d19ae98298bafe4d Reviewed-on: https://skia-review.googlesource.com/96083 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Add a GM and images to test SkEncodedOriginGravatar Leon Scroggins III2018-01-17
| | | | | | | | Bug: skia:7138 Change-Id: I4800bcffc6a397cb688e63a505dd36145e423fa2 Reviewed-on: https://skia-review.googlesource.com/95083 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* move SkWriter32.h to srcGravatar Mike Reed2018-01-16
| | | | | | | | | Bug: skia: Change-Id: If110f1716d2ad3b967aadca1c61d3e22386e17b1 Reviewed-on: https://skia-review.googlesource.com/94862 Commit-Queue: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Add SkAndroidCodec::computeSampledSizeGravatar Leon Scroggins III2018-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: b/63909536 Android's ImageDecoder API takes as input an arbitrary width and height to scale the image to. Internally, this uses SkAndroidCodec to sample, and then (if not a perfect match) scales to the desired size with drawing. computeSampledSize is a modified version of what ImageDecoder currently does to convert from arbitrary dimensions to a sampleSize. Moving it here allows it to be shared by SkAnimatedImage. The modified version also corrects two bugs: - a client using the dimensions returned by getSampledDimensions previously may have resulted in ImageDecoder decoding to a larger size and then scaling it. (example found in tests: dog.jpg is 180 x 180. getSampledDimensions(8) returns 23 x 23, but the old method resulted in using sampleSize of 7 and downscaling the resulting 25 x 25 image.) - recompute the sampleSize based on the size returned by getSampledDimensions. Change-Id: I022040e8bac31c20988903a0452257f7ae902bc7 Reviewed-on: https://skia-review.googlesource.com/94620 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Add Android ASAN botGravatar Kevin Lubick2018-01-12
| | | | | | | | | | | It should work on 32 and 64 bit android running M or newer. Bug: skia: Change-Id: I7e6d4000f4fee8f2704b84b7174174dd0e68d21c Reviewed-on: https://skia-review.googlesource.com/93700 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
* Add an SkDrawable for animated images (e.g. GIF)Gravatar Leon Scroggins III2018-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: b/63909536 SkAnimatedImage is a simple drawable for animating a GIF. Thread-safety is left up to the client. At most two bitmaps are stored in the drawable; one for the current frame and one for a frame that may need to be restored. The backup frame prevents some cases where we would otherwise have to re-decode from the beginning of the image. The API lets the client set the time value, and decodes to match that time. TODO: - Callback for when the animation is complete - Ability to use SkAndroidCodec - Modify the loop count (or leave that up to client?) - Better and/or client-specific caching Other changes: - Add a sample which animates a GIF - Reenable SK_CODEC_PRINTF for debug builds and Android Change-Id: I945ffbccdb6008f2a05ed4d9b2af869a261fb300 Reviewed-on: https://skia-review.googlesource.com/93420 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Revert "Revert "fix legacy makeRasterImage()""Gravatar Mike Klein2018-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ef29e42ef3d81a0e704cf0efcfc9937b531f0327. Reason for revert: probably not either roll. Original change's description: > Revert "fix legacy makeRasterImage()" > > This reverts commit 7c4ca043361f6adb3d17a9d3db2397d86bac5a2d. > > Reason for revert: layout, cereal tests? > > Original change's description: > > fix legacy makeRasterImage() > > > > Passing the color space down into SkImage_Lazy ends up triggering a > > SkTransferFunctionBehavior::kRespect decode (tf(r*a)), where we want > > ignore (tf(r)*a) to have any hope of working with the legacy backend. > > > > This fix in turn needs another little extension of another old hack in > > SkImage_Gpu for makeNonTextureImage() to keep working there. > > > > Bug: skia:7479 > > > > Change-Id: If48ca68e95d9eee597f6b10434498049981314ba > > Reviewed-on: https://skia-review.googlesource.com/93380 > > Commit-Queue: Mike Klein <mtklein@chromium.org> > > Reviewed-by: Brian Osman <brianosman@google.com> > > TBR=mtklein@chromium.org,brianosman@google.com > > Change-Id: I65092e01d767ef1fd35563f0b79ceded3c12b267 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:7479 > Reviewed-on: https://skia-review.googlesource.com/93820 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Mike Klein <mtklein@google.com> TBR=mtklein@chromium.org,mtklein@google.com,brianosman@google.com Change-Id: Ic9b48d311cca152ab2e620363dd4528ed382eb88 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7479 Reviewed-on: https://skia-review.googlesource.com/93960 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Revert "fix legacy makeRasterImage()"Gravatar Mike Klein2018-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7c4ca043361f6adb3d17a9d3db2397d86bac5a2d. Reason for revert: layout, cereal tests? Original change's description: > fix legacy makeRasterImage() > > Passing the color space down into SkImage_Lazy ends up triggering a > SkTransferFunctionBehavior::kRespect decode (tf(r*a)), where we want > ignore (tf(r)*a) to have any hope of working with the legacy backend. > > This fix in turn needs another little extension of another old hack in > SkImage_Gpu for makeNonTextureImage() to keep working there. > > Bug: skia:7479 > > Change-Id: If48ca68e95d9eee597f6b10434498049981314ba > Reviewed-on: https://skia-review.googlesource.com/93380 > Commit-Queue: Mike Klein <mtklein@chromium.org> > Reviewed-by: Brian Osman <brianosman@google.com> TBR=mtklein@chromium.org,brianosman@google.com Change-Id: I65092e01d767ef1fd35563f0b79ceded3c12b267 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7479 Reviewed-on: https://skia-review.googlesource.com/93820 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Specify "resources" in skia_nanobench's dataGravatar Pirama Arumuga Nainar2018-01-11
| | | | | | | | | | | | | | | Doing so installs packages the resource directory during a 'tests' build. This lets us run skia_nanobench in the internal test infra, which doesn't have access to the source tree. Test: Check that all files in "resources" is packaged during 'make tests dist' in an Android tree. Change-Id: Ia547cf09087e5795bdd825d0d48f179086a9ca4a Reviewed-on: https://skia-review.googlesource.com/93060 Reviewed-by: Derek Sollenberger <djsollen@google.com> Reviewed-by: Stephen Hines <srhines@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
* fix legacy makeRasterImage()Gravatar Mike Klein2018-01-11
| | | | | | | | | | | | | | | | Passing the color space down into SkImage_Lazy ends up triggering a SkTransferFunctionBehavior::kRespect decode (tf(r*a)), where we want ignore (tf(r)*a) to have any hope of working with the legacy backend. This fix in turn needs another little extension of another old hack in SkImage_Gpu for makeNonTextureImage() to keep working there. Bug: skia:7479 Change-Id: If48ca68e95d9eee597f6b10434498049981314ba Reviewed-on: https://skia-review.googlesource.com/93380 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* restore intersect methods to use old-style empty-checks on their inputsGravatar Mike Reed2018-01-10
| | | | | | | | | | Bug introduced when we made isEmpty check for int32_t width/height Bug:800804 Change-Id: I59799c88fb02f176c1545dd0edae050b510df079 Reviewed-on: https://skia-review.googlesource.com/93302 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* add flag for flutterGravatar Mike Reed2018-01-09
| | | | | | | Bug: skia: Change-Id: I73b6045aa17c7a38fcbd3245be926a5097d165ee Reviewed-on: https://skia-review.googlesource.com/92684 Reviewed-by: Mike Reed <reed@google.com>
* fix x86 Android buildsGravatar Mike Klein2018-01-08
| | | | | | | | | | | After tinkering with libstdc++ -> libc++, looks like we need this warning again. We already turn it on in Android's own x86 builds; see gn_to_bp.py for that. Change-Id: I7b7a76d1c22dd3f3b7712e9ce89b78d9a229a302 Reviewed-on: https://skia-review.googlesource.com/92360 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* switch android builds to libc++Gravatar Mike Klein2018-01-08
| | | | | | | | | All other options are going away real soon now. Change-Id: I57051fdabc2b0fd18fd133c9fb345ffa5a46e5db Reviewed-on: https://skia-review.googlesource.com/92300 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* CCPR: Rename GrCCPR* -> GrCC*Gravatar Chris Dalton2018-01-08
| | | | | | | | | | | Also runs clang-format on the files that don't have special shader builder styling. Bug: skia: Change-Id: I4a67569a7c8472acfb9200644c913844a92e3b2d Reviewed-on: https://skia-review.googlesource.com/92083 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Add GrProxyProviderGravatar Robert Phillips2018-01-08
| | | | | | | | | This pulls all the proxy tracking & creation functionality out of the GrResourceCache and GrResourceProvider and consolidates it in the GrProxyProvider. Change-Id: I7256f7c544319a70c1bd93dd5a9ccbe5fa0a544f Reviewed-on: https://skia-review.googlesource.com/91501 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Revert "remove unused SkCurveMeasure""Gravatar Mike Reed2018-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4d1d8bcf6df52bd8e9ae5b0289815c1a2527e7c8. Reason for revert: will try a manual roll to update static_initializers.gni Original change's description: > Revert "remove unused SkCurveMeasure" > > This reverts commit 065c2e827e3a5c7aab8f276b1f5358ba3ac33fa8. > > Reason for revert: change static initializer count? > > Original change's description: > > remove unused SkCurveMeasure > > > > Bug: skia: > > Change-Id: I36eb00883bc17e8eef4d1d226972f0125f0e2630 > > Reviewed-on: https://skia-review.googlesource.com/91702 > > Reviewed-by: Mike Reed <reed@google.com> > > Commit-Queue: Mike Reed <reed@google.com> > > TBR=reed@google.com > > Change-Id: I0d8ad2aa8b38a389048ba8bf5cafafea5788c3e1 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/91343 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> TBR=reed@google.com Change-Id: I7e6dfc5841b089dff047cd1d78dcebb722cdf8a4 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/91361 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "remove unused SkCurveMeasure"Gravatar Mike Reed2018-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 065c2e827e3a5c7aab8f276b1f5358ba3ac33fa8. Reason for revert: change static initializer count? Original change's description: > remove unused SkCurveMeasure > > Bug: skia: > Change-Id: I36eb00883bc17e8eef4d1d226972f0125f0e2630 > Reviewed-on: https://skia-review.googlesource.com/91702 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> TBR=reed@google.com Change-Id: I0d8ad2aa8b38a389048ba8bf5cafafea5788c3e1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/91343 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* remove unused SkCurveMeasureGravatar Mike Reed2018-01-05
| | | | | | | | Bug: skia: Change-Id: I36eb00883bc17e8eef4d1d226972f0125f0e2630 Reviewed-on: https://skia-review.googlesource.com/91702 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Add GrResourceProviderPriv and expose GrGpu in itGravatar Greg Daniel2018-01-05
| | | | | | | | Bug: skia: Change-Id: Iad965ecf33c9dc75c4f068d547698d973f52eb94 Reviewed-on: https://skia-review.googlesource.com/91440 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Enable conditional-uninitialized flagGravatar Kevin Lubick2018-01-05
| | | | | | | | | Bug: skia:7462 Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-SKNX_NO_SIMD Change-Id: I1c0a09984bf28a5c620a89af56040f018bae6310 Reviewed-on: https://skia-review.googlesource.com/90941 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* cubic-map for non-linear tGravatar Mike Reed2018-01-05
| | | | | | | | Bug: skia: Change-Id: I248864bd853361c1abfc2d8af61a27ab27a49a91 Reviewed-on: https://skia-review.googlesource.com/38882 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Reland "CCPR: Initial semi-optimized vertex shader Impl"Gravatar Chris Dalton2018-01-04
| | | | | | | | | | | | | | | | | | | | This is a reland of e3877ce5ceb7842b61d54bebcc51864e5787a2bc Original change's description: > CCPR: Initial semi-optimized vertex shader Impl > > TBR=bsalomon@google.com > > Bug: skia: > Change-Id: I24173e146d8c95cec5f29e8cb4fa5e2c28f9a33c > Reviewed-on: https://skia-review.googlesource.com/89120 > Reviewed-by: Chris Dalton <csmartdalton@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> Bug: skia: Change-Id: I1d194853540e64df9c7b55ceb388a5d2f32bc258 Reviewed-on: https://skia-review.googlesource.com/90963 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Re-enable 3 clang warningsGravatar Kevin Lubick2018-01-04
| | | | | | | | Bug: skia:7462 Change-Id: Iba0af2f0ff8ef646f93a0e2ced083d99020a38c9 Reviewed-on: https://skia-review.googlesource.com/90842 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
* [sksg] Refine invalidation logicGravatar Florin Malita2018-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to discriminate between nodes whose bounds updates contribute to the dirty region, and nodes whose bounds changes do not. E.g. animated shape in a group: the animated shape node bounds should yield damage, but the ancestor group bounds should not. To accomplish this, we refine the invalidation state: 1) self invalidation == the node itself was invalidated, and its bounds updates yield damage. 2) descendant invalidation == the node has some (self-)invalidated descendant, but its own bounds are not contributing damage. Also: * hoist the bounding box invalidation logic into the base class (Node::revalidate) and update to respect the states described above. * remove (now-redundant) GeometryNode bbox logic. * update revalidation methods to return the node bbox instead of void TBR= Change-Id: I8023d1793fb501c945a53f2dc2d2983e5b620ade Reviewed-on: https://skia-review.googlesource.com/90581 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* SkFloatToDecimal moved to src/utilsGravatar Hal Canary2018-01-03
| | | | | | | | | This change stages SkFloatToDecimal() for possible re-use by pdfium. Change-Id: Iedc0c78c8a633f0b0973365d2d8b540b5443590d Reviewed-on: https://skia-review.googlesource.com/90400 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* Add Win UBSAN jobs.Gravatar Ben Wagner2018-01-03
| | | | | | | | Bug: skia:2679 Change-Id: Ia462af01b9832da90206b9e9be2278cb48c6c502 Reviewed-on: https://skia-review.googlesource.com/86401 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Ben Wagner <benjaminwagner@google.com>
* update pipe for lattice and shadowrecGravatar Mike Reed2018-01-03
| | | | | | | | | | | - move some lattice routines into shared helper (SkCanvasPriv) Bug: skia: Change-Id: Ibbb80dd7461c7fd3082a0220604ab42cbb8815be Reviewed-on: https://skia-review.googlesource.com/90540 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Add FASTLINK to windows buildsGravatar Brian Osman2017-12-31
| | | | | | | | | | | | | | | From my local testing, this brings incremental link times back where they were before switching to Z7 (55s -> 15s). It also speeds up full builds times by a similar margin (so no real impact on per-translation unit build time). https://blogs.msdn.microsoft.com/vcblog/2016/10/05/faster-c-build-cycle-in-vs-15-with-debugfastlink/ Bug: skia: Change-Id: I83a3b8a3d6492eb9a6bd7fe8b6893b2dd6970b06 Reviewed-on: https://skia-review.googlesource.com/89800 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Add a bench for comparing complex clip strategiesGravatar Florin Malita2017-12-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clip consisting of a union of |n| circles. Comparing mask (2x saveLayer + srcIn) vs. clipPath approaches. MBP numbers: ! -> high variance, ? -> moderate variance micros bench 233.05 ! clip_strategy_mask_100 gl 207.61 ! clip_strategy_mask_10 gl 210.41 ? clip_strategy_mask_5 gl 219.10 ? clip_strategy_mask_1 gl 115.56 ? clip_strategy_path_100 gl 113.29 ! clip_strategy_path_10 gl 102.36 ? clip_strategy_path_5 gl 6.37 ? clip_strategy_path_1 gl 361.06 ! clip_strategy_mask_100 8888 328.97 ! clip_strategy_mask_10 8888 316.72 ! clip_strategy_mask_5 8888 325.84 ! clip_strategy_mask_1 8888 368.54 ! clip_strategy_path_100 8888 306.99 ! clip_strategy_path_10 8888 298.71 ! clip_strategy_path_5 8888 191.00 ! clip_strategy_path_1 8888 TBR= Change-Id: I945c12e2e35b9847af06342473e56272e2041e21 Reviewed-on: https://skia-review.googlesource.com/72521 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Revert "CCPR: Initial semi-optimized vertex shader Impl"Gravatar Chris Dalton2017-12-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e3877ce5ceb7842b61d54bebcc51864e5787a2bc. Reason for revert: Intel crashing again Original change's description: > CCPR: Initial semi-optimized vertex shader Impl > > TBR=bsalomon@google.com > > Bug: skia: > Change-Id: I24173e146d8c95cec5f29e8cb4fa5e2c28f9a33c > Reviewed-on: https://skia-review.googlesource.com/89120 > Reviewed-by: Chris Dalton <csmartdalton@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=bsalomon@google.com,brianosman@google.com,csmartdalton@google.com Change-Id: I2485db30397958722a07c5992c748ab69365ebb6 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/89300 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* CCPR: Initial semi-optimized vertex shader ImplGravatar Chris Dalton2017-12-22
| | | | | | | | | | TBR=bsalomon@google.com Bug: skia: Change-Id: I24173e146d8c95cec5f29e8cb4fa5e2c28f9a33c Reviewed-on: https://skia-review.googlesource.com/89120 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* converted YUVEffect to SkSLGravatar Ethan Nicholas2017-12-22
| | | | | | | | Bug: skia: Change-Id: I1875e44417a0a583c4f35ee4d46856a34ba55245 Reviewed-on: https://skia-review.googlesource.com/88580 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Initial scene graph (SkSG)Gravatar Florin Malita2017-12-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sketching a thin (as in close-to-skia-semantics) scene graph API, focused on external animation, inval tracking and minimal repaint. Only a few concrete classes/features so far: * Rect/Color/Transform/Group * basic inval tracking * a trivial animated sample with inval visualization Pretty much everything (especially naming) is volatile, so treat accordingly. The interesting bits to review are likely in Node.{h,cpp} for inval and SampleSGInval.cpp for usage. Initial class hierarchy: * Node: invalidation/ancestors tracking | -- * RenderNode: onRender(SkCanvas) | | | -- * Draw (concrete): rendering a [geometry, paint] tuple | | | -- * Group (concrete): grouping multiple RenderNodes | | | -- * EffectNode: single-descendant effect wrapper | | | -- * Transform (concrete): transform effect | -- * PaintNode: onMakePaint() | | | -- * Color (concrete): SkColor paint wrapper | -- * GeometryNode: onComputeBounds(), onDraw(SkCanvas, SkPaint) | -- * Rect (concrete): SkRect wrapper TBR= Change-Id: Iacf9b773c181a7582ecd31ee968562f179d1aa1b Reviewed-on: https://skia-review.googlesource.com/85502 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "CCPR: Initial semi-optimized vertex shader Impl"Gravatar Brian Osman2017-12-20
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a8f6aef13d0592305e05baf19ee724f31a53b466. Reason for revert: Looks to failing on ANGLE bots Original change's description: > CCPR: Initial semi-optimized vertex shader Impl > > Bug: skia: > Change-Id: If22f47a3b945ce7336f8e609c2e0c911f09e1d18 > Reviewed-on: https://skia-review.googlesource.com/86820 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=egdaniel@google.com,bsalomon@google.com,csmartdalton@google.com Change-Id: Ic5a73434cba4246a72790db2c27d06e7a50f389a No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/88220 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* CCPR: Initial semi-optimized vertex shader ImplGravatar Chris Dalton2017-12-20
| | | | | | | | Bug: skia: Change-Id: If22f47a3b945ce7336f8e609c2e0c911f09e1d18 Reviewed-on: https://skia-review.googlesource.com/86820 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* remove unused willPlayBackBitmaps from pictureGravatar Mike Reed2017-12-20
| | | | | | | | | | | and SkPictureAnalyzer Bug: skia: Change-Id: I394eca648234b1a69e6f9a0a88c407366a33d079 Reviewed-on: https://skia-review.googlesource.com/87791 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* converted GrRRectBlurEffect to SkSLGravatar Ethan Nicholas2017-12-20
| | | | | | | | Bug: skia: Change-Id: Ifd192db07e02d69d445277a361760ce4a452f603 Reviewed-on: https://skia-review.googlesource.com/87441 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "Revert "move homogenous with stride to matrixpriv""Gravatar Brian Salomon2017-12-19
| | | | | | | | | | | | | This reverts commit de71572f650005e36d4fc2fe95fb5677a25ae4f6. Revert "Revert "Transform vertices for distance field glyphs on CPU."" This reverts commit f226e66d75374e370f3ae2c6895bc689670e9e18. Change-Id: I2545afae3beb1d6b14bba056853ed826ae7a4679 Reviewed-on: https://skia-review.googlesource.com/86603 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Fix alpha contribution to tonal color.Gravatar Jim Van Verth2017-12-19
| | | | | | | | | | | Also adds a tonal color GM, a grayscale mode to shadowutils GM, and animated alpha to SampleAndroidShadows. Bug: skia: Change-Id: I1dcb5cab7e53ffa7a3bf1a07b6ebfed38df1a9ed Reviewed-on: https://skia-review.googlesource.com/85002 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Revert "Transform vertices for distance field glyphs on CPU."Gravatar Greg Daniel2017-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0215e39d7e415d0530231df6ad20d5f215c72152. Reason for revert: break intel 540 and HD2000 intel release bots on gltestthreading gm dftext_blob_pers Original change's description: > Transform vertices for distance field glyphs on CPU. > > This allows batching of DF draws with different view matrices. > > For perspective matrices this means the transformed position vertex > attribute must have w values. Currently, non-perspective DF draws still > use 2 component positions, though this could be changed in the future. > Consequently, perspective draws can batch with other perspective draws > but not non-perspective draws. > > Adds a GM to test batching and reusing the same blobs with both perspective > and non-perspective matrices. > > Change-Id: I0e42c5449ebf3a5a54025dbcdec824d904d5bd9e > Reviewed-on: https://skia-review.googlesource.com/79900 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,bsalomon@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Idc658d9263976d5b5e00a5026c5d6d3c8f4bdc2d Reviewed-on: https://skia-review.googlesource.com/86560 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Remove SkImage deferred texture image data APIs."Gravatar Eric Karl2017-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4f5e1d4ff3fa9f240398c9a08be94beb1c16dad0. Reason for revert: Unfortunately, we need this in Chrome for a bit longer. Working on understanding why the new path led to regressions. Will re-land this once the new path sticks. Original change's description: > Remove SkImage deferred texture image data APIs. > > These APIs existed for Chrome. Chrome is no longer using them. > > Change-Id: I15a5e2f88c7e8d1356188748fc68d4658f6f1849 > Reviewed-on: https://skia-review.googlesource.com/81021 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Ic9f683f262f2e1d0469156360f5ffaee977ca44a Reviewed-on: https://skia-review.googlesource.com/86280 Reviewed-by: Eric Karl <ericrk@chromium.org> Commit-Queue: Eric Karl <ericrk@chromium.org>
* Transform vertices for distance field glyphs on CPU.Gravatar Brian Salomon2017-12-15
| | | | | | | | | | | | | | | | | | This allows batching of DF draws with different view matrices. For perspective matrices this means the transformed position vertex attribute must have w values. Currently, non-perspective DF draws still use 2 component positions, though this could be changed in the future. Consequently, perspective draws can batch with other perspective draws but not non-perspective draws. Adds a GM to test batching and reusing the same blobs with both perspective and non-perspective matrices. Change-Id: I0e42c5449ebf3a5a54025dbcdec824d904d5bd9e Reviewed-on: https://skia-review.googlesource.com/79900 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Try /Z7 on Windows builds.Gravatar Mike Klein2017-12-15
| | | | | | | | | | | | | | | | | | | | | Right now /FS and /Zi together serialize debug information into .pdb files through another process. I tried just dropping /FS, so that each cl.exe instance writes to the .pdb file directly, but the bots don't like that. Instead, let's try switching /Zi to /Z7, to embed debug information directly into the object file instead of alongside in a .pdb. This is all about trying to improve build times. https://docs.microsoft.com/en-us/cpp/build/reference/z7-zi-zi-debug-information-format https://docs.microsoft.com/en-us/cpp/build/reference/fs-force-synchronous-pdb-writes Change-Id: If636f8fa21c639eff81d9c335c5223908c0fdcea Reviewed-on: https://skia-review.googlesource.com/85661 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Don't set /GS- on Windows builds.Gravatar Mike Klein2017-12-15
| | | | | | | | | | | | | I'm not sure why we're setting this... it disables buffer overrun protection. That seems like something we'd like on all test bots, not just the Debug ones. https://docs.microsoft.com/en-us/cpp/build/reference/gs-buffer-security-check Change-Id: I0bc3ec146812b4ad3d1d39488caf6e78633830fc Reviewed-on: https://skia-review.googlesource.com/85660 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Suppress warnings of unused variables.Gravatar Derek Sollenberger2017-12-14
| | | | | | | | | | Prepare to compile with default -Werror. Bug: b/66996870 Change-Id: I2dbff68e7482085683adb6b9d214e1af009e7479 Reviewed-on: https://skia-review.googlesource.com/85004 Reviewed-by: Stephen Hines <srhines@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
* make SkColorSpace_New realGravatar Mike Klein2017-12-14
| | | | | | | | | | | | | | | | | | | Some interesting things are starting to fall out already, like the fact that I needed to add a gamma_dst stage to be able to draw into gamma-transfer-fn destinations. I've also had to pass an SkAlphaType through to the linearize functions so that they can maintain premul invariants. I'm not sure this is actually a good idea... if you can, please double- check my logic at SkRasterPipeline.cpp:128? If it's correct logic, I'm going to need to do it all over the place. But I imagine you don't do this and somehow get away with it. Change-Id: I42cd9b161b54287d674225103ad9e19f8b388959 Reviewed-on: https://skia-review.googlesource.com/84680 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>