aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
Commit message (Collapse)AuthorAge
* fonts: Dont memcpy with nullptr in SkRemoteGlyphCacheGravatar Khushal2018-05-01
| | | | | | | | | | The behaviour is undefined and causes ASAN bots to complain. Bug: skia:7515 Change-Id: I454714ab9047a6fced5ab7bfdbc12214d728eadf Reviewed-on: https://skia-review.googlesource.com/125029 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
* Fix index overflow check for rewriting fans as triangles.Gravatar Brian Salomon2018-05-01
| | | | | | | | | | Not only could the old test cause int overflow, it was just wrong. Bug: skia:8085 Change-Id: Id6b81f4aa1b115f0dbfd2266aee8fab5d5d30aee Reviewed-on: https://skia-review.googlesource.com/124779 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* fonts: Set up remote glyph caching to push fonts.Gravatar Khushal2018-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the SkStrikeClient is designed to pull fonts from the server on demand, and to pre-fetch a batched request by analyzing the ops using a SkTextBlobCacheDiffCanvas. This change modifies the design to support a push based model, where the server pushes fonts required by the client and sets up the requisite SkGlyphCaches on the client prior to rasterizing the ops. This model still relies on the SkTextBlobCacheDiffCanvas for analyzing the glyphs required for rasterizing an op. The glyph caches required for raster are locked and missing glyphs to be sent to the client are tracked by the SkStrikeServer. The embedder can serialize this font data at any point, but must ensure that this data is deserialized by the SkStrikeClient at the remote end, before rasterizing any ops analyzed prior to serialization. Any refs on the caches are released once the font data is serialized by the server. The locking of glyph caches relies on the embedder providing discardable handles. These handles can be created on the server and serialized to be sent to the client, and map to an instance of SkGlyphCache. This allows the server to control the lifetime of the caches on the client. Bug: skia:7515 Change-Id: Id39f346b47b60899778404bbd0429ee811d0e53b Reviewed-on: https://skia-review.googlesource.com/120283 Commit-Queue: Khusal Sagar <khushalsagar@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* Convert skcms to only export functions (not data)Gravatar Brian Osman2018-05-01
| | | | | | | | | | | | | | This simplifies shared library builds on Windows (no need to conditionally change declspec to dllimport). Once this lands, we can make the same change (plus update internal references): https://skia-review.googlesource.com/c/skcms/+/124982 Change-Id: I0d4fa9031258f77d370e6e6e018afaf543c29d85 Reviewed-on: https://skia-review.googlesource.com/124983 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* handle non-a8 masks in coverage blitterGravatar Mike Reed2018-05-01
| | | | | | | | Bug: skia:7885 Change-Id: I3ae2d3c7a762d3d718b9a6d40d8c1d696b6aaefc Reviewed-on: https://skia-review.googlesource.com/124923 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* pin offset request before applying to regionGravatar Mike Reed2018-05-01
| | | | | | | | Bug: oss-fuzz:8085 Change-Id: I2e19250822a6ffc3d68a474c8eb4cca0ea66c991 Reviewed-on: https://skia-review.googlesource.com/124700 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Alter the decimation portion of Ganesh's GaussianBlur methodGravatar Robert Phillips2018-05-01
| | | | | | | | | This CL doesn't change any GMs for me locally but (because of the backingFit and clipRect changes) it has the possibility of doing so. Change-Id: Iaa1ad9baf420624d118bf1b12d8bac726218274d Reviewed-on: https://skia-review.googlesource.com/124283 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Use skcms equality to detect sRGB profilesGravatar Brian Osman2018-04-30
| | | | | | | | | | | This ensures that table-based sRGB profiles convert to Skia's sRGB color space. Previously, they would turn into complex XYZ SkColorSpaces. Change-Id: Idda71970c6545b50d8ac8ff52872ed44e20aee39 Reviewed-on: https://skia-review.googlesource.com/124502 Auto-Submit: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@google.com>
* Check that Android is not looking up fontsGravatar Herb Derby2018-04-30
| | | | | | | | Change-Id: I86529296dc1229a1c9864dd12886d52d7db3aae2 Reviewed-on: https://skia-review.googlesource.com/124580 Commit-Queue: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Rewrite SkVertices specified with triangle fans as indexed trianglesGravatar Brian Salomon2018-04-28
| | | | | | | Change-Id: Ifaacc426bc657b324f6a885a8ef70b347b048226 Reviewed-on: https://skia-review.googlesource.com/124349 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* Call SkMatrix::getType to make it thread safeGravatar Yuqian Li2018-04-28
| | | | | | | | | TBR: reed@google.com, mtklein@google.com Bug: skia: Change-Id: I6da4b12b38ecaba71441de7a45a1990b000b1de4 Reviewed-on: https://skia-review.googlesource.com/124402 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Copy SkBitmap to make it thread safeGravatar Yuqian Li2018-04-28
| | | | | | | | | | TBR: reed@google.com, mtklein@google.com Bug: skia: Change-Id: I9aa1ac8bc5387c5a86301c242e12b3448b332d26 Reviewed-on: https://skia-review.googlesource.com/124400 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Just pass color glyph masks to filters.Gravatar Ben Wagner2018-04-27
| | | | | | | | | | | | | | | Allow the filters to try to apply themselves to the color mask. Most mask filters will just return false, but allow them the opprotunity. This removes the behavior of trying to create a mask from the color mask. This updates the blur mask filter to handle kARGB32_Format directly by using just the alpha (which mirrors current behavior). Change-Id: I15eb736060ecf9b24aca874758c167b74d9ebc22 Reviewed-on: https://skia-review.googlesource.com/124185 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Reland "Reland "Reland "Exercise the threaded backend in test bots"""Gravatar Yuqian Li2018-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 47f2b7b089c688503b12caff9c8a84fb185d01c5. Reason for revert: try to fix the issue by reducing the set of bots Original change's description: > Revert "Reland "Reland "Exercise the threaded backend in test bots""" > > This reverts commit 7ddad479e464a3d481d106415c9c1b8cc8496848. > > Reason for revert: bots failure > > Original change's description: > > Reland "Reland "Exercise the threaded backend in test bots"" > > > > This reverts commit 0f5972604ce4439fd33118d6be1e4f24fe6c267f. > > > > Reason for revert: ASAN/MSAN should have been fixed > > > > Original change's description: > > > Revert "Reland "Exercise the threaded backend in test bots"" > > > > > > This reverts commit 654ca8a340700ca8089abb7828adc2c229c6241e. > > > > > > Reason for revert: ASAN,MSAN failures > > > > > > Original change's description: > > > > Reland "Exercise the threaded backend in test bots" > > > > > > > > This reverts commit ea51393ba918f75c1b40d521081789eeb3b42d6f. > > > > > > > > Reason for revert: try again after many fixes of the threaded backend > > > > > > > > Original change's description: > > > > > Revert "Exercise the threaded backend in test bots" > > > > > > > > > > This reverts commit a39991ebd70f4aaf1290dd516467d729811e45ee. > > > > > > > > > > Reason for revert: Random bots timeout > > > > > > > > > > Original change's description: > > > > > > Exercise the threaded backend in test bots > > > > > > > > > > > > We can't draw everything correctly now, but it's at least not crashing. > > > > > > > > > > > > The draw_to_canvas is modified by adding flush because now the raster > > > > > > canvas also needs flush like GPU canvases because of the threaded > > > > > > backend. (Previously, AndroidCodecSrc vetoed GPU (non-raster) sink > > > > > > and that's why it was not crashing.) > > > > > > > > > > > > > > > > > > Bug: skia: > > > > > > Change-Id: I222d706c33e15326e1b97d6bef6c46b8c35cebfd > > > > > > Reviewed-on: https://skia-review.googlesource.com/118886 > > > > > > Reviewed-by: Kevin Lubick <kjlubick@google.com> > > > > > > Commit-Queue: Yuqian Li <liyuqian@google.com> > > > > > > > > > > TBR=kjlubick@google.com,stephana@google.com,liyuqian@google.com > > > > > > > > > > Change-Id: Ib1089d937b6e25cc39d90ad4de35b3a4c406f6b1 > > > > > No-Presubmit: true > > > > > No-Tree-Checks: true > > > > > No-Try: true > > > > > Bug: skia: > > > > > Reviewed-on: https://skia-review.googlesource.com/119100 > > > > > Reviewed-by: Yuqian Li <liyuqian@google.com> > > > > > Commit-Queue: Yuqian Li <liyuqian@google.com> > > > > > > > > TBR=kjlubick@google.com,stephana@google.com,liyuqian@google.com > > > > > > > > # Not skipping CQ checks because original CL landed > 1 day ago. > > > > > > > > Bug: skia:7838 > > > > Change-Id: I1405212204bf694b2f31dfc38154759e1d3e363f > > > > Reviewed-on: https://skia-review.googlesource.com/121680 > > > > Commit-Queue: Yuqian Li <liyuqian@google.com> > > > > Reviewed-by: Yuqian Li <liyuqian@google.com> > > > > > > TBR=kjlubick@google.com,stephana@google.com,liyuqian@google.com > > > > > > Change-Id: Id1b273e22a1d0cbc15a2155252909f576b401fa4 > > > No-Presubmit: true > > > No-Tree-Checks: true > > > No-Try: true > > > Bug: skia:7838 > > > Reviewed-on: https://skia-review.googlesource.com/123360 > > > Reviewed-by: Mike Klein <mtklein@google.com> > > > Commit-Queue: Mike Klein <mtklein@google.com> > > > > TBR=mtklein@google.com,kjlubick@google.com,stephana@google.com,liyuqian@google.com > > > > # Not skipping CQ checks because original CL landed > 1 day ago. > > > > Bug: skia:7838 > > Change-Id: I205d579f2959ea726b447993314c1326b731730e > > Reviewed-on: https://skia-review.googlesource.com/123660 > > Commit-Queue: Yuqian Li <liyuqian@google.com> > > Reviewed-by: Yuqian Li <liyuqian@google.com> > > TBR=mtklein@google.com,kjlubick@google.com,stephana@google.com,liyuqian@google.com > > Change-Id: I1d3986cc2af12836dd7acbcbba713081a88301a6 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:7838 > Reviewed-on: https://skia-review.googlesource.com/124200 > Reviewed-by: Yuqian Li <liyuqian@google.com> > Commit-Queue: Yuqian Li <liyuqian@google.com> TBR=mtklein@google.com,kjlubick@google.com,stephana@google.com,liyuqian@google.com Change-Id: I2d4d0c172849a86b37c60b32938a7a2b828258fa No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7838 Reviewed-on: https://skia-review.googlesource.com/124201 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com>
* Add ASYNC trace macrosGravatar Brian Osman2018-04-27
| | | | | | | | | These allow markers over long (non-nested, non-scoped) blocks of time. Change-Id: I2ebd724e644232f1b911121d25a37dcee193a15d Reviewed-on: https://skia-review.googlesource.com/124320 Reviewed-by: Xiao Yu <xster@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* use std::atomic in SkRegionPrivGravatar Mike Reed2018-04-27
| | | | | | | | Bug: skia:7882 Change-Id: I333f3457fbcd9621d712c40844f4896bd85a9a1c Reviewed-on: https://skia-review.googlesource.com/124266 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Add InternalSurfaceFlag so we know if RenderTargetProxys and RenderTargets ↵Gravatar Greg Daniel2018-04-26
| | | | | | | | | | use GL FBO 0. Bug: skia:7748 Change-Id: I2fda3cde12ccdef19fe06ff287a8024b58d28ef0 Reviewed-on: https://skia-review.googlesource.com/124048 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Replace flatten with writeFlattenable for desc.Gravatar Ben Wagner2018-04-26
| | | | | | | | | | | | | | | | This replaces calls to SkFlattenable::flatten(SkWriteBuffer&) with calls to SkWriteBuffer::writeFlattenable(const SkFlattenable*) when creating the descriptor for an SkScalerContext. This adds the identifier of the flattenable to the descriptor to avoid collisions when two flattenables take the same (or no) parameters. This used to be enforced when the SkScalerContext re-created the flattenable from the descriptor, but since this is no longer required these possible collisions may occur. Change-Id: I2b7efebebf20ffcc0f2b58a081ff0c58158f7d70 Reviewed-on: https://skia-review.googlesource.com/124054 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Call destructors during reset to avoid memory leakGravatar Yuqian Li2018-04-26
| | | | | | | | | | | | | | Otherwise, the following ASAN test would fail: out/ASAN/dm --config t8888 -m savelayer_initfromprev Bug: skia: Change-Id: I464dd419c64dcb06197169cca51253f26c44e93e Reviewed-on: https://skia-review.googlesource.com/124053 Commit-Queue: Yuqian Li <liyuqian@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> Auto-Submit: Yuqian Li <liyuqian@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* Revert "Reland "Revert "Add arcs as a specialized geometry to GrShape."""Gravatar Brian Salomon2018-04-26
| | | | | | | | | | This reverts commit 580aee2fa4a57bf8208498fbc23acea04e16e092. Bug: skia:7794 Change-Id: I9c2b923859c826dff58c22c529dc4e2ab4d0f186 Reviewed-on: https://skia-review.googlesource.com/124042 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Track tail of strike cacheGravatar Herb Derby2018-04-26
| | | | | | | | | Change-Id: Ic5d5ae5d4c45d0bc5b82dd2257752184a8b529d0 Reviewed-on: https://skia-review.googlesource.com/123935 Commit-Queue: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> Auto-Submit: Herb Derby <herb@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* Make rounding code publicGravatar Herb Derby2018-04-26
| | | | | | | Change-Id: I37fec55277fe99734980c7473f964d37ca4248b8 Reviewed-on: https://skia-review.googlesource.com/123931 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Count the correct number of pos using text encoding.Gravatar Yuqian Li2018-04-26
| | | | | | | | | | | | | Otherwise, the following will crash: out/ASAN/dm --config t8888 --verbose --src gm -m skbug_5321 Bug: skia: Change-Id: I9b1d3412b9695b0fbd8a9afb0e6d3ae7159aeee6 Reviewed-on: https://skia-review.googlesource.com/123750 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Auto-Submit: Yuqian Li <liyuqian@google.com>
* Check negative width before blitAntiRectGravatar Yuqian Li2018-04-26
| | | | | | | | | | | Since we decrease the width when clipped, it might be negative. Bug: skia:7858 Change-Id: I348bd07d917905a55bec1a4b4e0915c6528fe6b1 Reviewed-on: https://skia-review.googlesource.com/123927 Auto-Submit: Yuqian Li <liyuqian@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Reland "Revert "Add arcs as a specialized geometry to GrShape.""Gravatar Brian Salomon2018-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8a98bc96748d1bdaf9c2d8cfa0b672e3a035973d. Reason for revert: <INSERT REASONING HERE> Original change's description: > Revert "Revert "Add arcs as a specialized geometry to GrShape."" > > This reverts commit af88ec37124846a0168a4ab061bf10cc6030c2d6. > > Bug: skia:7794 > Change-Id: I2d0e1d7b4e025481241d823b09f5de5d0f1a13eb > Reviewed-on: https://skia-review.googlesource.com/123627 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: Ib09a533600028b76a69b455c952f3dd12b39bdba No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7794 Reviewed-on: https://skia-review.googlesource.com/123780 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove SkASSERT(fConvexity == kUnknown_Convexity) due to racingGravatar Yuqian Li2018-04-25
| | | | | | | | | | Bug: skia:7822 Change-Id: I2def72a6d032c43376906d189e5ee834c76b0898 Reviewed-on: https://skia-review.googlesource.com/123749 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com> Auto-Submit: Yuqian Li <liyuqian@google.com>
* Make SkString::appendf safe for long strings.Gravatar Brian Salomon2018-04-25
| | | | | | | | Bug: skia:7841 Change-Id: I5bc77f5230b63da74e42d756ab4a1fefcfab9926 Reviewed-on: https://skia-review.googlesource.com/123634 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* fix android-frameworkGravatar Mike Reed2018-04-25
| | | | | | | | | Bug: skia: Change-Id: Iac3f306808d931ce46380ec1ed4bda940cd7181d Reviewed-on: https://skia-review.googlesource.com/123746 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Stan Iliev <stani@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Snap bitmap for SkThreadedBMPDevice::drawBitmapRectGravatar Yuqian Li2018-04-25
| | | | | | | | | | | Otherwise, dm --config t8888 -m rects_as_paths will fail in ASAN. Bug: skia: Change-Id: I2b69b3544af7303a1e052c67f087d3ac9d26689d Reviewed-on: https://skia-review.googlesource.com/123685 Auto-Submit: Yuqian Li <liyuqian@google.com> Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert "Revert "Add arcs as a specialized geometry to GrShape.""Gravatar Brian Salomon2018-04-25
| | | | | | | | | | This reverts commit af88ec37124846a0168a4ab061bf10cc6030c2d6. Bug: skia:7794 Change-Id: I2d0e1d7b4e025481241d823b09f5de5d0f1a13eb Reviewed-on: https://skia-review.googlesource.com/123627 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Experiment to track coverage in a layerGravatar Mike Reed2018-04-25
| | | | | | | | Bug: skia: Change-Id: I5ed334f63e64991944394dc8103092a2c6280546 Reviewed-on: https://skia-review.googlesource.com/122000 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Refactor GaussianBlurGravatar Robert Phillips2018-04-25
| | | | | | | | | | | | | One of the bounding boxes in this method goes haywire in DDL mode. Hopefully, this refactoring will make it easier to determine which one it is. Note that in this CL I tried to not change the existing behavior at all. Bug: skia:7765 Change-Id: Ie71b4c338fd7ecf4f4b8b4cb5609ef3e686eaef5 Reviewed-on: https://skia-review.googlesource.com/122956 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Make SkColorSpace::Make(skcms_ICCProfile) stricterGravatar Brian Osman2018-04-24
| | | | | | | | | | | Don't do any modification to the incoming profile. Basically, if you want this to succeed, call skcms_EnsureUsableAsDestinationWithSingleCurve first. Change-Id: Iafe3fd3c82c2fb2cc0e42b1968a69bf605be241c Reviewed-on: https://skia-review.googlesource.com/123521 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* Reland "call skcms_OptimizeForSpeed()"Gravatar Mike Klein2018-04-24
| | | | | | | | | | | | | | | | | | | | | | | This is a reland of 3b8feb331a11989fdd82c2d8d18e576df98e8895 Original change's description: > call skcms_OptimizeForSpeed() > > I've guarded src and dst separately, so that we can land, > rebaseline just the src change, and then later (when it > does something), rebaseline optimizing dst separately. > > Small threshold tweak to keep a unit test passing. > > Change-Id: I57cc43c54b6065f58fa8f9448ea1d73fc42505f0 > Reviewed-on: https://skia-review.googlesource.com/123181 > Commit-Queue: Mike Klein <mtklein@chromium.org> > Reviewed-by: Brian Osman <brianosman@google.com> Change-Id: Ia29b4c941e121486a627ac7221947f4a452211ad Reviewed-on: https://skia-review.googlesource.com/123480 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Properly restore from image filter save layers.Gravatar Ben Wagner2018-04-24
| | | | | | | | | | | | | | | | SkCanvas::internalSaveLayer calls internalSetMatrix to smash the matrix. SkCanvas::internalRestore tried to restore the state by setting just the matrix on the canvas. However, this misses restoring the matrix on the top devices. Correct this by making internalRestore mirror internalSaveLayer and call internalSetMatrix. Without this change some draw calls will not respect the matrix correctly when they follow a draw with an image filter. Change-Id: If2660cd3799c3050604d9d8754b140507ec3f5e1 Reviewed-on: https://skia-review.googlesource.com/123241 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>
* Revert "Add arcs as a specialized geometry to GrShape."Gravatar Mike Klein2018-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 255bcf57ffd9db368cd66ca9697549efd799153e. Reason for revert: layout and scuba image diffs Original change's description: > Add arcs as a specialized geometry to GrShape. > > BUG: skia:7794 > > Change-Id: I484693711f48e55631732a0f4ee97e2848dec89d > Reviewed-on: https://skia-review.googlesource.com/122900 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: I9293b8fbb535d940bca5fc30a95908416b9eb7a7 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/123362 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Revert "call skcms_OptimizeForSpeed()"Gravatar Mike Klein2018-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 3b8feb331a11989fdd82c2d8d18e576df98e8895. Reason for revert: darks too bright Original change's description: > call skcms_OptimizeForSpeed() > > I've guarded src and dst separately, so that we can land, > rebaseline just the src change, and then later (when it > does something), rebaseline optimizing dst separately. > > Small threshold tweak to keep a unit test passing. > > Change-Id: I57cc43c54b6065f58fa8f9448ea1d73fc42505f0 > Reviewed-on: https://skia-review.googlesource.com/123181 > Commit-Queue: Mike Klein <mtklein@chromium.org> > Reviewed-by: Brian Osman <brianosman@google.com> TBR=mtklein@chromium.org,brianosman@google.com Change-Id: I23e59d4dc711e8b112e70f31a5c9abad67551bcd No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/123361 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Add arcs as a specialized geometry to GrShape.Gravatar Brian Salomon2018-04-23
| | | | | | | | | BUG: skia:7794 Change-Id: I484693711f48e55631732a0f4ee97e2848dec89d Reviewed-on: https://skia-review.googlesource.com/122900 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* call skcms_OptimizeForSpeed()Gravatar Mike Klein2018-04-23
| | | | | | | | | | | | | I've guarded src and dst separately, so that we can land, rebaseline just the src change, and then later (when it does something), rebaseline optimizing dst separately. Small threshold tweak to keep a unit test passing. Change-Id: I57cc43c54b6065f58fa8f9448ea1d73fc42505f0 Reviewed-on: https://skia-review.googlesource.com/123181 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* Fix variable name collisionGravatar Yuqian Li2018-04-23
| | | | | | | | | | Bug: skia: Change-Id: I0b62ae9dac14d75e94d2c29d335703d41fee77ed Reviewed-on: https://skia-review.googlesource.com/123280 Commit-Queue: Yuqian Li <liyuqian@google.com> Commit-Queue: Stan Iliev <stani@google.com> Auto-Submit: Yuqian Li <liyuqian@google.com> Reviewed-by: Stan Iliev <stani@google.com>
* Clip the SkAntiRect because of possible tilingsGravatar Yuqian Li2018-04-23
| | | | | | | | | | | | Otherwise, the AndroidShadow will crash or draw incorrectly for the threaded backend with # tiles >= 3. Bug: skia: Change-Id: If3c3b41f3576b1c44178d6343626e99be64e766b Reviewed-on: https://skia-review.googlesource.com/122953 Commit-Queue: Yuqian Li <liyuqian@google.com> Auto-Submit: Yuqian Li <liyuqian@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* Generalize to SkDescriptorMapGravatar Herb Derby2018-04-23
| | | | | | | Change-Id: I4e7ff8093dbbe24cd5de4d4ea478716514d519f2 Reviewed-on: https://skia-review.googlesource.com/123041 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Fix deprecated constructor usageGravatar Brian Osman2018-04-23
| | | | | | | | | Bug: skia: Change-Id: I76ea81b863892f03caa315923f913ae73be71839 Reviewed-on: https://skia-review.googlesource.com/123042 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* use SkRect::outset, as it clamps on overflowGravatar Mike Reed2018-04-23
| | | | | | | | | Bug: oss-fuzz:7929 Change-Id: Ic9a2582eb7ab638fda71b10bf987a6c584770e43 Reviewed-on: https://skia-review.googlesource.com/122959 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Rewrite CHECK_INTERSECT to perform the !(opposite) predicate, so that weGravatar Mike Reed2018-04-23
| | | | | | | | | | return false if either argument is NaN. Bug: oss-fuzz:7914 Change-Id: If4f5eae736bb93451d2ff1c802e7c84a62a38cbc Reviewed-on: https://skia-review.googlesource.com/122957 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Reject XYZ profiles missing some (or all) TRC tagsGravatar Brian Osman2018-04-23
| | | | | | | | | | | | | | The previous behavior isn't justified by the spec, and doesn't match skcms' behavior. To ease migration and avoid discrepancy when dealing with fuzzer-generated profiles, enforce the stricter rules here. Bug: chromium:835666 Change-Id: Ice6452b521a737d6dc339571dcbb313567235ed6 Reviewed-on: https://skia-review.googlesource.com/122952 Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* (Mostly) respect FilterQuality in draw[stretchy]Gravatar Leon Scroggins III2018-04-23
| | | | | | | | | | | | | | | | | | | | | | | Bug: b/77917978 For drawImageLattice drawBitmapLattice drawImageNine drawBitmapNine , respect the SkFilterQuality on the SkPaint. Previously the GPU used the lowest quality to avoid a bleeding effect, leading to ugly nine- patches on Android. For all backends, cap the filter quality at kLow_SkFilterQuality. Update SkCanvas' documentation to specify this. Change-Id: Id28c7753834975f039170f14bc51be4f2bd44d41 Reviewed-on: https://skia-review.googlesource.com/121891 Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com> Auto-Submit: Leon Scroggins <scroggo@google.com>
* Fixed SkVertices crashing on Windows DLL buildsGravatar Yong-Hwan Baek2018-04-22
| | | | | | | | | SkVertices::Builder uses custom new operator but not exposed to dll. While delete operator in SkVertices.h could be inlined, it causes crash on Windows DLL builds. This patch fixes this issue. Change-Id: I8b635ad3aa4a3f496a392ce7840417947999e4b0 Reviewed-on: https://skia-review.googlesource.com/122480 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Remove assert that color spaces have valid profile dataGravatar Brian Osman2018-04-22
| | | | | | | | | | | | | | Chrome fuzzing can trigger this code with malformed profile data (which suggests that the older SkColorSpace::MakeICC allowed some invalid profile data to slip through). In any case, simply returning false to reject the profile is fine. Bug: chromium:835540 Change-Id: Ib675b8e9e3be444ad5dbf8153d60d86284682c90 Reviewed-on: https://skia-review.googlesource.com/122940 Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@google.com>
* Fix argument names and documentation for SkMatrix44::set3x3()Gravatar Brian Osman2018-04-20
| | | | | | | | | | | | | | | Column-major is an implementation choice, not an interface. There is exactly one acceptable subscript notation for indexing matrix elements, and it's row first, then column. Having these named backwards was unnecessarily confusing. Note that this doesn't alter behavior in any way, it just brings this function in line with expectations from any reasonable mathematician. Change-Id: Ie4ceb40281ef507889d25403afbf24116514c45a Reviewed-on: https://skia-review.googlesource.com/122790 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>