aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
...
* Fixes in ReadPixels2 and yuv_texture gm to fix Vulkan validation issues.Gravatar Greg Daniel2018-04-23
| | | | | | | | Bug: skia: Change-Id: Idfccdec9106bdc79a690da0e173a232a0cbe51a9 Reviewed-on: https://skia-review.googlesource.com/122955 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Reland "Prevent masked solid-color draws from being turned into clears"Gravatar Robert Phillips2018-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f92bb3785fa8015cde9f379be52dedfce5abc290. Reason for revert: The new unit test has been suppressed on ANGLE Original change's description: > Revert "Prevent masked solid-color draws from being turned into clears" > > This reverts commit e9f2bbe082e9e1eb9d76e3043adedc9443427d8d. > > Reason for revert: ANGLE > > Original change's description: > > Prevent masked solid-color draws from being turned into clears > > > > GrRenderTargetContext::drawRect was eliding a BlurMask filtered circle. > > > > Bug: skia:7765 > > Change-Id: Id98c059f7d786ee5c9bca839c8e099997ff2aedb > > Reviewed-on: https://skia-review.googlesource.com/122793 > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,robertphillips@google.com > > Change-Id: I1b7752eab0fcf55ab6248eed587fd85d438efd78 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:7765 > Reviewed-on: https://skia-review.googlesource.com/122960 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: If432c24548ef0f6df4fd6a06aa3b1fb38ba793b8 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7765 Reviewed-on: https://skia-review.googlesource.com/123000 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@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>
* Revert "Prevent masked solid-color draws from being turned into clears"Gravatar Robert Phillips2018-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e9f2bbe082e9e1eb9d76e3043adedc9443427d8d. Reason for revert: ANGLE Original change's description: > Prevent masked solid-color draws from being turned into clears > > GrRenderTargetContext::drawRect was eliding a BlurMask filtered circle. > > Bug: skia:7765 > Change-Id: Id98c059f7d786ee5c9bca839c8e099997ff2aedb > Reviewed-on: https://skia-review.googlesource.com/122793 > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: I1b7752eab0fcf55ab6248eed587fd85d438efd78 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7765 Reviewed-on: https://skia-review.googlesource.com/122960 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Prevent masked solid-color draws from being turned into clearsGravatar Robert Phillips2018-04-23
| | | | | | | | | GrRenderTargetContext::drawRect was eliding a BlurMask filtered circle. Bug: skia:7765 Change-Id: Id98c059f7d786ee5c9bca839c8e099997ff2aedb Reviewed-on: https://skia-review.googlesource.com/122793 Reviewed-by: Brian Salomon <bsalomon@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 starting location in GrRTC::drawOval when converting to GrShapeGravatar Brian Salomon2018-04-20
| | | | | | | | Change-Id: I3b86d15add9d463e64c97f53bdb5042f1e2a2f27 Reviewed-on: https://skia-review.googlesource.com/122880 Auto-Submit: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Analytic dashing of circles with single on/off intervals and butt caps.Gravatar Brian Salomon2018-04-20
| | | | | | | | Change-Id: If19ac52cb78af57572a102cec0084f5b6c037680 Reviewed-on: https://skia-review.googlesource.com/121882 Auto-Submit: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@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>
* Reland "Add stub gpu workaround generators"Gravatar Adrienne Walker2018-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of 94d25b970b97c68ddd0b4ceb71f2233aac05e6b5 Original change's description: > Add stub gpu workaround generators > > Like https://chromium-review.googlesource.com/c/chromium/src/+/1005362, > this patch adds a way for Chrome and Skia to share a set of driver > workaround names so that they can be turned on by Chrome (or Skia) as > needed. > > To avoid weird cross-repository dependencies, the generator script is > duplicated in Skia. > > This patch just adds a few dummy workaround names to make sure the build > process is working. The followup to this is to add workaround init > to GrContext/GrContextOptions and to start implementing individual > workarounds. > > Implementing these workarounds is to support Chrome's "out of process > raster" which will use Ganesh without a command buffer, and so will not > have the workarounds that the command buffer provides. > > Bug: chromium:829614 > Change-Id: I40745a777a95805995991fedb81657ae418b52d9 > Reviewed-on: https://skia-review.googlesource.com/120608 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Adrienne Walker <enne@chromium.org> Bug: chromium:829614 Change-Id: Idb3309ffa894f7585ee493388b56565e9d4a3101 Reviewed-on: https://skia-review.googlesource.com/122800 Auto-Submit: Adrienne Walker <enne@chromium.org> Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add ability to dump opList info at flush-timeGravatar Robert Phillips2018-04-20
| | | | | | | | | When debugging DDL it is useful to just see which ops are being drawn instead of the entire reordering history. Change-Id: I89708fecbd53c097b00e65b0da426bfb8046b0ee Reviewed-on: https://skia-review.googlesource.com/122780 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Reduce threads used for DNG decodes on AndroidGravatar Leon Scroggins III2018-04-20
| | | | | | | | | | | | | | | | Bug: b/78120086 DNG files require lots of memory to decode. We recently removed the limit on how much SkRawCodec can allocate, allowing it to decode large warped DNG files, so long as the device has enough memory. But in practice, running too many threads at once with each thread allocating a lot of memory results in crashing on Android. Reduce the number of threads so we save memory and do not crash. Change-Id: I464b5a21c019463d2ec31e333f25ebb0b81605bd Reviewed-on: https://skia-review.googlesource.com/122786 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Add discard check when deciding if we should execute op list or not.Gravatar Greg Daniel2018-04-20
| | | | | | | | Bug: skia:7828 Change-Id: I339ba64b6312cd9444cd4faffd426d91852774e9 Reviewed-on: https://skia-review.googlesource.com/122784 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove another writePixels instanceGravatar Robert Phillips2018-04-20
| | | | | | | | | This converts the GrSWMaskHelper to being DDL compatible Change-Id: Ic0c7f95a7ed6d2936118b4127c2cfce94a2ec0da Reviewed-on: https://skia-review.googlesource.com/122788 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* ccpr: Don't solve for cubic roots that are out of rangeGravatar Chris Dalton2018-04-20
| | | | | | | | | | | | | Most real-world cubics don't have both KLM roots inside T=0..1, and a large amount don't have any. This CL gives a nice speedup by not wasting time finding padding around KLM roots that we aren't going to chop at anyway. Bug: skia: Change-Id: Icb7217142e29fc3f8e8ff657e9dc739caf6d6714 Reviewed-on: https://skia-review.googlesource.com/122129 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* ccpr: Fix flatness and triangle-ness detection for conicsGravatar Chris Dalton2018-04-20
| | | | | | | | | | | We should detect these cases by examining the curve at max height; not midtangent. Bug: skia:7821 Change-Id: I3d9e3a10798f0d825916840cb99d054b2a6284c3 Reviewed-on: https://skia-review.googlesource.com/122620 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Prevent matrix stack from being corrupted if a rotated image filter is ↵Gravatar Robert Phillips2018-04-20
| | | | | | | | | | clipped out Bug: skia:7765 Change-Id: Id76b63cebc25dcdff02d4ba3f6d6bba6f2b6b842 Reviewed-on: https://skia-review.googlesource.com/122782 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Robert Phillips <robertphillips@google.com>
* guard against NaN in path is rectGravatar Cary Clark2018-04-20
| | | | | | | | | | | | | | | Recent rewrite of SkPath::isRect() did not check against sequences with NaN and infinity. R=kjlubick@google.com Bug: oss-fuzz:7882 Change-Id: I9315f68e4c53c37fda819adc6d57d6b3e3acc1c6 Reviewed-on: https://skia-review.googlesource.com/122783 Commit-Queue: Cary Clark <caryclark@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> Auto-Submit: Cary Clark <caryclark@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
* Fix use-of-uninitialized-value in SkPictureShader::onMakeContextGravatar Florin Malita2018-04-20
| | | | | | | | | | | | | | | | | | SkPictureShader::refBitmapShader is expected to always initialize the scale adjust vector when returning a non-null shader. But the code path returning EmptyShader does not do that. Instead of hauling around a separate scale adjustment, we can refactor to avoid this problem by adjusting the local matrix directly, if needed, in refBitmapShader. The local matrix is conveniently already stored in a SkTCopyOnFirstWrite. Bug: chromium:835048, oss-fuzz:7738 Change-Id: I2df3bde7d6237f01bc71857c2fe254e86b186dc0 Reviewed-on: https://skia-review.googlesource.com/122544 Auto-Submit: Florin Malita <fmalita@chromium.org> Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* ccpr: Don't preempt the convex path rendererGravatar Chris Dalton2018-04-19
| | | | | | | | | | It seems to perform better on RRects from web pages. Bug: skia:7825 Change-Id: Ibecf33849c6d14e7486d9de740b1cc42f274080f Reviewed-on: https://skia-review.googlesource.com/122626 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Remove ambient clamp hack for analytic shadows.Gravatar Jim Van Verth2018-04-19
| | | | | | | | | | | | | | | The hack was added to make analytic ambient shadows match the geometric ones exactly. Removing it does produce a slight difference, but it's only visible at full black values (and then, only slightly) and this makes room to pass a blend parameter for falloff. Also fixes an issue with filling out arcs in the shadow tesselator. Bug: skia:7486 Change-Id: If78d0104df7e18f4320c1658af75576f6a4a8c73 Reviewed-on: https://skia-review.googlesource.com/122580 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* ccpr: Clean up GrCCGeometryGravatar Chris Dalton2018-04-19
| | | | | | | | | | | Gets rid of the ugly template functions, rearranges a few static methods, and adds a benchmark. Bug: skia: Change-Id: I442f3a581ba7faf7601ae5be0c7e07327df09496 Reviewed-on: https://skia-review.googlesource.com/122128 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Adding pinning to the strike cacheGravatar Herb Derby2018-04-19
| | | | | | | | | | | | Here is a simple API for the object that pins, and how it flows through the cache. BUG=skia:7515 Change-Id: I1b8304dc6f9d8652282300fc1e52d52debb5b6f4 Reviewed-on: https://skia-review.googlesource.com/122500 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Herb Derby <herb@google.com>
* Fix double counting of coverage in analytic round capped stroked circles.Gravatar Brian Salomon2018-04-19
| | | | | | | Change-Id: I28d39f8620d786180b0bf0204b18ca4d1fec597b Reviewed-on: https://skia-review.googlesource.com/122086 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* rm SkRRectsGaussianEdgeMaskFilterGravatar Robert Phillips2018-04-19
| | | | | | | | | Neat but unused. Change-Id: I1b2d160df274b05cfb5582a5385085cc2db89f7d Reviewed-on: https://skia-review.googlesource.com/121960 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* check if we fail to eval the conic in pathmeasureGravatar Mike Reed2018-04-19
| | | | | | | | Bug: oss-fuzz:7201 Change-Id: I9d40225b7827239d2a229dc056f7f2caa8a4eb31 Reviewed-on: https://skia-review.googlesource.com/122420 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Remove unused parameters from internalGetPath.Gravatar Ben Wagner2018-04-19
| | | | | | | | | | The fillPath and fillToDevMatrix parameters to SkScalerContext::internalGetPath are never used. Remove them. Change-Id: I4fda9b3a24232924e9f94be4abcf8ac10ac7901c Reviewed-on: https://skia-review.googlesource.com/122360 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* When creating testing backendTexture take colorspace into account.Gravatar Greg Daniel2018-04-19
| | | | | | | | | Bug: skia: Change-Id: Ifa8dbad3eca81790648476f9a6d3fa5a088fede9 Reviewed-on: https://skia-review.googlesource.com/122341 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Untangle strike cache and glyph cacheGravatar Herb Derby2018-04-19
| | | | | | | | | | | | The strike cache and the glpyh cache have been friends for a long time. Untangle this twisted relationship. BUG=skia:7515 Change-Id: Ie77393f6923e9886ec90ff7a60a1200e78319937 Reviewed-on: https://skia-review.googlesource.com/122084 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* disallow negative setReserve() callsGravatar Mike Klein2018-04-19
| | | | | | | | | | | | | | | | We already assert that setCount()'s argument is non-negative. This does the same for setReserve(). There was one call site I could find that was actually sometimes passing negative values to setReserve(), guarded here. Already reviewed: https://skia-review.googlesource.com/c/skia/+/115982 Change-Id: Ia52a286732bf4056e9baf09555d27bab9abf2554 Reviewed-on: https://skia-review.googlesource.com/122305 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* rm SkTDArray::select()Gravatar Mike Klein2018-04-19
| | | | | | | | | | | | It's only used in one call site, which is clearer without it. Already reviewed: https://skia-review.googlesource.com/c/skia/+/115982 Change-Id: I3d0f8c1f0756e01e29cdb9f9328b0f557d3650d3 Reviewed-on: https://skia-review.googlesource.com/122302 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* clean up setReserve() rule-bendingGravatar Mike Klein2018-04-19
| | | | | | | | | | | | | | | | | | | | | | These routines call setReserve(N), write M<N items into the reserved memory, and then setCount(M) afterwards. That happens to function with SkTDArray's current implementation, but really breaks the spirit of what setReserve() means. This CL switches those setReserve() calls to setCount(). Calling setCount(N), writing M<N items, then setCount(M) should have the exact same effect, and be completely within the rules. Already reviewed here: https://skia-review.googlesource.com/c/skia/+/115982 Change-Id: I462479488055cf1c99de2bc6dbc1707dbe24db7e Reviewed-on: https://skia-review.googlesource.com/122301 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Mike Klein <mtklein@chromium.org>
* Remove the limit on dng allocationsGravatar Leon Scroggins III2018-04-19
| | | | | | | | | | | | | | Bug: 78120086 Test: TODO The limit was artificial, and did not allow for certain transformations. SkRawCodec will already fail gracefully on failures to allocate, so just rely on that. Change-Id: Id9f92b6935d77dc6ff8a06b13bd157f476a3f84c Reviewed-on: https://skia-review.googlesource.com/121946 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Revert "Add stub gpu workaround generators"Gravatar Leon Scroggins2018-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 94d25b970b97c68ddd0b4ceb71f2233aac05e6b5. Reason for revert: Breaking the Chromium roll Original change's description: > Add stub gpu workaround generators > > Like https://chromium-review.googlesource.com/c/chromium/src/+/1005362, > this patch adds a way for Chrome and Skia to share a set of driver > workaround names so that they can be turned on by Chrome (or Skia) as > needed. > > To avoid weird cross-repository dependencies, the generator script is > duplicated in Skia. > > This patch just adds a few dummy workaround names to make sure the build > process is working. The followup to this is to add workaround init > to GrContext/GrContextOptions and to start implementing individual > workarounds. > > Implementing these workarounds is to support Chrome's "out of process > raster" which will use Ganesh without a command buffer, and so will not > have the workarounds that the command buffer provides. > > Bug: chromium:829614 > Change-Id: I40745a777a95805995991fedb81657ae418b52d9 > Reviewed-on: https://skia-review.googlesource.com/120608 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Adrienne Walker <enne@chromium.org> TBR=bsalomon@google.com,enne@chromium.org Change-Id: Ie0b69d7d028dabca1fd70813b6920386c8838247 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:829614 Reviewed-on: https://skia-review.googlesource.com/122240 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* path is rect track cornersGravatar Cary Clark2018-04-19
| | | | | | | | | | | | | | | | | | | | This was triggered by an exploit that started the first edge well outside the final rectangle, causing the captured to exceed the correct result. Ivan observes that we really only want the first and third corners to compute the bounds, so remove the tracking code that looks for a valid range of points, and record the corners instead. R=robertphillips@google.com Bug: 824145,skia:7792 Change-Id: If228573d0f05c7158dba8142c144d13834e691ec Reviewed-on: https://skia-review.googlesource.com/122081 Commit-Queue: Cary Clark <caryclark@skia.org> Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Auto-Submit: Cary Clark <caryclark@skia.org>
* Add stub gpu workaround generatorsGravatar Adrienne Walker2018-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | Like https://chromium-review.googlesource.com/c/chromium/src/+/1005362, this patch adds a way for Chrome and Skia to share a set of driver workaround names so that they can be turned on by Chrome (or Skia) as needed. To avoid weird cross-repository dependencies, the generator script is duplicated in Skia. This patch just adds a few dummy workaround names to make sure the build process is working. The followup to this is to add workaround init to GrContext/GrContextOptions and to start implementing individual workarounds. Implementing these workarounds is to support Chrome's "out of process raster" which will use Ganesh without a command buffer, and so will not have the workarounds that the command buffer provides. Bug: chromium:829614 Change-Id: I40745a777a95805995991fedb81657ae418b52d9 Reviewed-on: https://skia-review.googlesource.com/120608 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Adrienne Walker <enne@chromium.org>
* Move strike cache Find*() to strike cacheGravatar Herb Derby2018-04-18
| | | | | | | | | BUG=skia:7515 Change-Id: Ic1580d4752d51a62df5427a28f843bc7b3181797 Reviewed-on: https://skia-review.googlesource.com/122020 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Remove SK_SUPPORT_LEGACY_PATH_DAA_BITGravatar Yuqian Li2018-04-18
| | | | | | | | Change-Id: I5ff39063b1adc1c4f2bf5246fd69c6031c444908 Reviewed-on: https://skia-review.googlesource.com/122133 Commit-Queue: Yuqian Li <liyuqian@google.com> Auto-Submit: Yuqian Li <liyuqian@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Prevent unnecessary/unbounded growth of SkTDynamicHash capacityGravatar Florin Malita2018-04-18
| | | | | | | | | | | | | | | | | | | | | | | SkTDynamicHash doesn't immediately recycle slots for removed entries, but instead just marks them as deleted. The only way to reclaim deleted slots currently is when an exponential grow/resize is triggered. A consequence of this is that the capacity/allocated storage can grow indefinitely when the hash is long-lived and churning -- even if the number of active entries is small/stable. To prevent this, I propose we only grow the capacity when the number of active slots constitutes a significant portion. Otherwise (when most slots are deleted), we trigger a "purge" (resize to the same capacity) to clear the tombstones. Bug: chromium:832482 Change-Id: Iefdcd7439f7d62ac021e176b71007d207c8bc876 Reviewed-on: https://skia-review.googlesource.com/122082 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* DFT to draw A8 instead of incorrect vertical lcd.Gravatar Ben Wagner2018-04-18
| | | | | | | | | | | | | The distance field text renderer currently supports RGB and BGR striping but does not support vertical striping. Currently the vertical request is ignored and a horizontal striping is used when a vertical striping is requested. Instead of drawing the incorrect striping when vertical striping is requested, draw without the striping instead. Change-Id: Ic2b173fbfef7db1d2581bf22a5d52dd2a5a24e97 Reviewed-on: https://skia-review.googlesource.com/122085 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* ccpr: Implement conicsGravatar Chris Dalton2018-04-18
| | | | | | | | | | TBR=egdaniel@google.com Bug: skia: Change-Id: Idf7811dc285961db52db41c9ff145afda40c274d Reviewed-on: https://skia-review.googlesource.com/122127 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Always call endFlush on opLists that might survive a flushGravatar Chris Dalton2018-04-18
| | | | | | | | | | | | We were missing a few that got unreffed due to failed proxy instantiation. Bug: skia:7655 Bug: skia:7111 Change-Id: I95847a16890f2993a1433d4d9fdaa8a4a6c2f0b6 Reviewed-on: https://skia-review.googlesource.com/122121 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Convert A8 D32 mask blitters to Sk4pxGravatar Florin Malita2018-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | Improves the newly added bench by ~25% (hsw): -- before -- micros bench 2298.34 shadermaskfilter_picture_80 8888 2339.60 shadermaskfilter_picture_ff 8888 2287.11 shadermaskfilter_bitmap_80 8888 2223.14 shadermaskfilter_bitmap_ff 8888 -- after -- 1693.36 shadermaskfilter_picture_80 8888 1637.45 shadermaskfilter_picture_ff 8888 1691.65 shadermaskfilter_bitmap_80 8888 1637.70 shadermaskfilter_bitmap_ff 8888 But: skia:7810 Change-Id: I7274b10f517551ee2c0646842f72e0372d55e509 Reviewed-on: https://skia-review.googlesource.com/121642 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@google.com>
* Reland "Fix the fat rect bug in the threaded backend"Gravatar Yuqian Li2018-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1b637615144604a2d50cf983ac9aa5aab71cf73b. Reason for revert: add guard flag Original change's description: > Revert "Fix the fat rect bug in the threaded backend" > > This reverts commit c41569a29fde10c6fec43cc4593334e9a4b34b76. > > Reason for revert: maybe break the Chrome layout tests > > Original change's description: > > Fix the fat rect bug in the threaded backend > > > > Bug: skia:7813 > > Change-Id: I954232be1dccc63ce412ccde92c4f0e4617317b9 > > Reviewed-on: https://skia-review.googlesource.com/121641 > > Reviewed-by: Cary Clark <caryclark@google.com> > > Commit-Queue: Yuqian Li <liyuqian@google.com> > > TBR=caryclark@google.com,liyuqian@google.com,reed@google.com > > Change-Id: If35617a9774b3367561981e39a2fa89a972684b9 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:7813 > Reviewed-on: https://skia-review.googlesource.com/121820 > Reviewed-by: Yuqian Li <liyuqian@google.com> > Commit-Queue: Yuqian Li <liyuqian@google.com> TBR=caryclark@google.com,liyuqian@google.com,reed@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia:7813 Change-Id: I8b17be4251b5efc20142295cca787474f32e3a86 Reviewed-on: https://skia-review.googlesource.com/122100 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com>
* Support all destination profiles in SkColorSpaceXform_skcmsGravatar Brian Osman2018-04-18
| | | | | | | | | | | | | EnsureUsable forces the profile to something that we can target, so there may be some quality tradeoff (or complete fallback to sRGB for B2A profiles), but we will no longer fail to transform. Bug: skia: Change-Id: I6c5ffb8f092cd0aeffadc361c3ae95825916fa4f Reviewed-on: https://skia-review.googlesource.com/122080 Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* With ES3, enable both ES2 and ES3 external image extensionsGravatar Brian Osman2018-04-18
| | | | | | | | Bug: skia:7713 Change-Id: If06c0368e91c33bbac9e7715227d619c4834684f Reviewed-on: https://skia-review.googlesource.com/121884 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* fix path is rect flaw exposed by goldGravatar Cary Clark2018-04-18
| | | | | | | | | | | | | | | | | | | One of the path is rect bug fixes changed the behavior of zero-length strokes which showed up as a change in Gold. The bug is if a rect is defined by a series of colinear movetos, the bounds did not work out if the rect started and stopped in the middle of a side. R=robertphillips@google.com Bug: 824145,skia:7792 Change-Id: I226545efeda03dedd928eebc120d2508b428fef0 Reviewed-on: https://skia-review.googlesource.com/122002 Auto-Submit: Cary Clark <caryclark@skia.org> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Cary Clark <caryclark@skia.org>
* Simplify strike cache NodeGravatar Herb Derby2018-04-18
| | | | | | | | Change-Id: Ia7d65d84ad0ebe2a62fbd98629c7c37273a6167a Reviewed-on: https://skia-review.googlesource.com/121980 Auto-Submit: Herb Derby <herb@google.com> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>