aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* Switch atlas clients over to using absolute texture coordinates (take 2)Gravatar Robert Phillips2017-08-25
| | | | | | | | | This is a prerequisite for being able to resize the atlas with impunity. Change-Id: Iccc9c7ced43f38a7d8483a7bd12a458d59a3453a Reviewed-on: https://skia-review.googlesource.com/38362 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* tiny concave path point fixGravatar Cary Clark2017-08-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tiny path added to PathTest.cpp has tinier cross products (e.g. 1e-12) so appears to be a series of unbending lines as far as getConvexity is concerned. This point fix looks for paths that do not bend left or right or go backwards, but do have a bounds, and calls them concave. A better fix may be to consider empty and degenerate paths to be concave instead of convex; I don't know if anyone relies on the existing behavior. Another better fix may be to change the math to compute the path turns even though the numbers are very small; on the surface, very difficult. R=bsalomon@google.com,reed@google.com Bug:755839 Change-Id: Ie2280f3f0b95fecab2899f5fc579fd39258e0647 Reviewed-on: https://skia-review.googlesource.com/38720 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Revert "Threaded generation of software paths"Gravatar Brian Salomon2017-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 76323bc0615044a5921afef0e19a350f3d04ffe0. Reason for revert: Breaking NUC bots in threaded gm comparison: https://chromium-swarm.appspot.com/task?id=382e589753187f10&refresh=10 Original change's description: > Threaded generation of software paths > > All information needed by the thread is captured by the prepare > callback object, the lambda captures a pointer to that, and does the > mask render. Once it's done, it signals the semaphore (also owned by the > callback). The callback defers the semaphore wait even longer (into the > ASAP upload), so the odds of waiting for the thread are REALLY low. > > Also did a bunch of cleanup along the way, and put in some trace markers > so we can monitor how well this is working. > > Traces of a GM that includes GPU and SW path rendering (path-reverse): > > Original: > https://screenshot.googleplex.com/f5BG3901tQg.png > Threaded, with wait in the callback (notice pre flush callback blocking): > https://screenshot.googleplex.com/htOSZFE2s04.png > Current version, with wait deferred to ASAP upload function: > https://screenshot.googleplex.com/GHjD0U3C34q.png > > Bug: skia: > Change-Id: I3d5a230bbd68eb35e1f0574b308485c691435790 > Reviewed-on: https://skia-review.googlesource.com/36560 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com Change-Id: Icac0918a3771859f671b69ae07ae0fedd3ebb3db No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/38560 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Fix Metal build from recent command buffer changeGravatar Greg Daniel2017-08-24
| | | | | | | | | Bug: skia: Change-Id: I93653a533499411118d3e55015d55000a465b51b Reviewed-on: https://skia-review.googlesource.com/38401 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Make Copy Ops to go through GpuCommandBuffer instead of straigt to GPU.Gravatar Greg Daniel2017-08-24
| | | | | | | | Bug: skia: Change-Id: I4eae4507e07278997e26419e94586eef0780c423 Reviewed-on: https://skia-review.googlesource.com/38361 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* rework plus blend modeGravatar Mike Klein2017-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The most interesting parts of this are how plus interacts with partial coverage. Plus needs its clamp to happen after the lerp. Luckily, some of its math folds away: d' = clamp[ d*(1-c) + (s+d)*c ] == clamp[ d - dc + sc + dc ] == clamp[ d + sc ] What's nice there is that coverage can be folded into the src term. This suggests that we can re-write the plus stage to clamp internally (and thus, be viable for 8-bit) if we always pre-scale with coverage. We don't have a way to pre-scale with 565 coverage until now, but it's only a step or two away from there. We can use the alternate formulation we derived for alpha for lerp_565, calculating the alpha coverage from red, green, and blue coverages _and_ the values of src and dst alpha. While we already pre-scale srcover today for 8-bit or constant coverage, we cannot do the same for 565. When evaluating the expression d' = s + (1-a)d we need the a term to be pre-scaled with red's coverage when calculating dr', with blue's when calculating db', etc. Essentially we need to carry around a bunch of extra values, and we've got no way to do that. So instead, we'll just carefully pre-scale plus with any coverage, and keep post-lerping srcover when we have 565 coverage. Change-Id: I7a7a52eec7d482e1b98bb8a01ea0a3d5e67bef65 Reviewed-on: https://skia-review.googlesource.com/38300 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Revert "Switch atlas clients over to using absolute texture coordinates"Gravatar Robert Phillips2017-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e84c087e621978e6d298b8ca950521601a0366cb. Reason for revert: ANGLE is unhappy Original change's description: > Switch atlas clients over to using absolute texture coordinates > > This is a prerequisite for being able to resize the atlas with impunity. > > Change-Id: I509816c8d6f38fbc92fa39aeab303b42ab09f58b > Reviewed-on: https://skia-review.googlesource.com/37560 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=egdaniel@google.com,jvanverth@google.com,robertphillips@google.com,brianosman@google.com Change-Id: I329efd642c22e11a5c576a4632fc557759b200d5 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/38400 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove SK_SUPPORT_LEGACY_RP_BLENDS-guarded codeGravatar Florin Malita2017-08-24
| | | | | | | | | | The flag is no longer used. Change-Id: I39156ef5683538263c2302f2fe3ba779e55dbc47 Reviewed-on: https://skia-review.googlesource.com/38360 Commit-Queue: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Switch atlas clients over to using absolute texture coordinatesGravatar Robert Phillips2017-08-24
| | | | | | | | | This is a prerequisite for being able to resize the atlas with impunity. Change-Id: I509816c8d6f38fbc92fa39aeab303b42ab09f58b Reviewed-on: https://skia-review.googlesource.com/37560 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* add SkTaskGroup::done()Gravatar Mike Klein2017-08-24
| | | | | | | | | | This lets you check if the work's done without blocking. Seems handy. Change-Id: Ie27c7b6fe0d01262b6a777abbc18b0de108641c0 Reviewed-on: https://skia-review.googlesource.com/38120 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Threaded generation of software pathsGravatar Brian Osman2017-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | All information needed by the thread is captured by the prepare callback object, the lambda captures a pointer to that, and does the mask render. Once it's done, it signals the semaphore (also owned by the callback). The callback defers the semaphore wait even longer (into the ASAP upload), so the odds of waiting for the thread are REALLY low. Also did a bunch of cleanup along the way, and put in some trace markers so we can monitor how well this is working. Traces of a GM that includes GPU and SW path rendering (path-reverse): Original: https://screenshot.googleplex.com/f5BG3901tQg.png Threaded, with wait in the callback (notice pre flush callback blocking): https://screenshot.googleplex.com/htOSZFE2s04.png Current version, with wait deferred to ASAP upload function: https://screenshot.googleplex.com/GHjD0U3C34q.png Bug: skia: Change-Id: I3d5a230bbd68eb35e1f0574b308485c691435790 Reviewed-on: https://skia-review.googlesource.com/36560 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* merge object files before parsing into assemblyGravatar Mike Klein2017-08-24
| | | | | | | | | | | | | This extra ld pass can merge all our many redundant constants, both within an instruction set and across them. This should save a bunch of code size on x86-64, with no other impact. It cuts 12K off my local build of ok. Change-Id: Ib2bb4adf88564aca45e55ee53dcf6584265c7dbe Reviewed-on: https://skia-review.googlesource.com/37940 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Validate rrect type in SkRRect::isValidGravatar Adrienne Walker2017-08-23
| | | | | | | | Bug: chromium: 758161 Change-Id: I2472ff59af2fab05d94d88d5effb44828e8a5132 Reviewed-on: https://skia-review.googlesource.com/37800 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Document missing 8bit blend stagesGravatar Florin Malita2017-08-23
| | | | | | | Change-Id: Id626f954fe45546a015a1bd423f19cca5f8967a9 Reviewed-on: https://skia-review.googlesource.com/37861 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Revert "Consolidate SkRasterPipelineBlitter blendmode construction"Gravatar Florin Malita2017-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 19bf2b3a645c9e4129ee72e26541c4edea708393. Reason for revert: not going to cover all cases Original change's description: > Consolidate SkRasterPipelineBlitter blendmode construction > > Only blitAntiH & blitMask/kA8 for now, but hopefully we can extend for > blitRect & blitMask/kLCD16 also. > > Change-Id: I5e888d49c0c11f2f1fc595dbfb382044fc224edc > Reviewed-on: https://skia-review.googlesource.com/37542 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Florin Malita <fmalita@chromium.org> TBR=mtklein@google.com,fmalita@chromium.org Change-Id: Ibd007bbc76f1bf8ec34998cc6ccb6b842792034c No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/37860 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Add a message when an op list fails to instantiateGravatar Brian Osman2017-08-23
| | | | | | | | | | | | | | | From local testing, TSAN causes this to happen for 40-50 GMs in the middle of a DM run. Having this message would have saved me a couple hours of head-scratching and debugging. Best theory about the TSAN thing is that it interferes with a driver thread that's reclaiming freed resources, but that's just a guess. Bug: skia: Change-Id: Ie6759fd2f22953595920cb271e2317c5ed1a0941 Reviewed-on: https://skia-review.googlesource.com/37441 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Initialize the swizzler if there is a subsetGravatar Chong Zhang2017-08-23
| | | | | | | | | Bug: b/64077740 Change-Id: Ic6bef3f63bcda24fc3d88ce0cdcf1216441faa40 Reviewed-on: https://skia-review.googlesource.com/37680 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Consolidate SkRasterPipelineBlitter blendmode constructionGravatar Florin Malita2017-08-23
| | | | | | | | | | Only blitAntiH & blitMask/kA8 for now, but hopefully we can extend for blitRect & blitMask/kLCD16 also. Change-Id: I5e888d49c0c11f2f1fc595dbfb382044fc224edc Reviewed-on: https://skia-review.googlesource.com/37542 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* GrTessellator: when sanitizing contours, remove non-finite points.Gravatar Stephen White2017-08-23
| | | | | | | | | | | | NaNs can't be correctly sorted. Don't run the unit test on VK backend, since it requires large (>64K bytes) vertex buffer uploads. Bug: 757650 Change-Id: I667693f135a090a5d9076bb7a2ec6879fc06d645 Reviewed-on: https://skia-review.googlesource.com/37484 Commit-Queue: Stephen White <senorblanco@chromium.org> Reviewed-by: Greg Daniel <egdaniel@google.com>
* make SkOpts functions inline, not staticGravatar Mike Klein2017-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | When Skia's built with an interestingly advanced instruction set baseline like SSSE3 or SSE4.1, we end up with two distinct copies of some SkOpts functions, one default in SkOpts.o and one specialization from SkOpts_{ssse3,sse41}.o. These functions are static, and so are technically unrelated, even though they're the same code compiled with the same instructions available. They're going to be identical. What we want here is to remove static but mark them as inline instead. In this case inline means "if the linker sees multiple copies of this, that's cool, just pick any one arbitrarily". That's just what we want. Now, when I disassemble a binary before and after this change, I do see the redundant routines removed. However, the file size change is minimal... I suspect that this must mean the linker has noticed that we had identical code and physically folded the two logically independent routines. I don't know how prevalent this optimization is, though, so it doesn't hurt to give it more of a "one copy please" hint with inline. There may also be a difference here between the binary size (~unchanged) and the in-memory layout of that binary? Change-Id: Id9c8f0ffc84aa1c9a066c22b623d34adab281857 Reviewed-on: https://skia-review.googlesource.com/37501 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* ColorBurn/ColorDodge stage tweaksGravatar Florin Malita2017-08-23
| | | | | | | | | | | | | | | | | | | Minor speedup. Before: 10212.01 ? blendmode_rect_ColorBurn 8888 9216.78 ? blendmode_rect_ColorDodge 8888 After: 9635.44 ? blendmode_rect_ColorBurn 8888 8820.22 ? blendmode_rect_ColorDodge 8888 Change-Id: I9e8a9aa21e2370de3174c31821fb0676260d2643 Reviewed-on: https://skia-review.googlesource.com/37620 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Switch GrSmallPath renderer over to always using integer texture coordinatesGravatar Robert Phillips2017-08-23
| | | | | | | | | As a preface to having all the atlas texture coordinates be absolute they must all first be integers. In the case of the small path renderer that means that the rect for the DF case must be bloated out a bit. Change-Id: I9969fcfe9d3ae3247a2964e2ca79cad522ccad9e Reviewed-on: https://skia-review.googlesource.com/37360 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* add compile-time not-supported checks to runtime CPU checksGravatar Mike Klein2017-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | There's no reason to call Init_ssse3() if we know Skia's built globally with SSSE3. And there's definitely no reason to call Init_ssse3() if Skia's build globally with SSE4.1+. These are the only places the Init_foo() methods are called, and those in turn are the only places that refer to their optimized routines, so guarding like this allows redundant routines to be dead-code stripped by the linker. There are still situations where we end up with two copies of the same routine, compiled at _the same_ optimization level. If you're on a Mac and have SSSE3 or SSE4.1 as your global baseline instruction set, you'll get two copies, one from SkOpts.o's defaults, and one from SkOpts_{ssse3,sse41}.o's "better" routines. I'm still thinking about how to best fix this. Might just be as simple as removing "static" and letting the linker dedup. This cuts off about 70K of code on a build of ok. Change-Id: Ia349d2c5299072bbd43966132798500de059b9ca Reviewed-on: https://skia-review.googlesource.com/37600 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add an (optional) SkTaskGroup to GrContextGravatar Brian Osman2017-08-23
| | | | | | | | | | | | | GrContextOptions has an SkExecutor field, allowing clients to supply a thread pool. If present, the GrContext will create an SkTaskGroup that can be used for internal threading work. Bug: skia: Change-Id: I8b01245515a21a83f9fe838caf0a01c9a26c0003 Reviewed-on: https://skia-review.googlesource.com/37580 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Fix artifacts on tiny stroked paths scaled up a lot.Gravatar Stephen White2017-08-23
| | | | | | | | | | | | | | | Set doConsumeDegenerates to false when calling SkPath::Iter::next() for all paths which are not in screen space. These lines are not degenerate for world space paths. Note: this change fixes only GrTessellatingPathRenderer and GrDefaultPathRenderer. GrMSAAPathRenderer still exhibits the bug. Bug: skia:6987 Change-Id: Ie3d494703211925c77052c68513948484e341486 Reviewed-on: https://skia-review.googlesource.com/37522 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
* Revert "GrTessellator: when sanitizing contours, remove non-finite points."Gravatar Robert Phillips2017-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 620cc248517a509040d3f94f29710edf3a151c5b. Reason for revert: Breaking the Vulkan bots Original change's description: > GrTessellator: when sanitizing contours, remove non-finite points. > > NaNs can't be correctly sorted. > > Bug: 757650 > Change-Id: Id1ca2fe1d1de7884da2a64ceef9491b1da7e8e77 > Reviewed-on: https://skia-review.googlesource.com/37220 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Stephen White <senorblanco@chromium.org> TBR=bsalomon@google.com,senorblanco@chromium.org Change-Id: I64d5c35801f844b31745a9c7ff60812d96af5e55 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 757650 Reviewed-on: https://skia-review.googlesource.com/37540 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* remove code associated with legacy affine imageshadersGravatar Mike Reed2017-08-23
| | | | | | | | | | | requires https://skia-review.googlesource.com/c/33180 CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Bug: skia: Change-Id: I226e120cc5aebe393bda8bc069e7927fdc981a0e Reviewed-on: https://skia-review.googlesource.com/36800 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Revert "Fix artifacts on tiny stroked paths scaled up a lot."Gravatar Robert Phillips2017-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 267641a90cb18a430b0a84910f651e2181744fd3. Reason for revert: Seems to be turning the bots red Original change's description: > Fix artifacts on tiny stroked paths scaled up a lot. > > Set doConsumeDegenerates to false when calling SkPath::Iter::next() for > all paths which are not in screen space. These lines are not degenerate > for world space paths. > > Bug: skia:6987 > Change-Id: I411faf594bf8a15891bfff08691e86679b7741ac > Reviewed-on: https://skia-review.googlesource.com/36881 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Stephen White <senorblanco@chromium.org> TBR=bsalomon@google.com,senorblanco@chromium.org Change-Id: I0d5a14670126ab3e0d99083a500ec8d3d0ef9961 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:6987 Reviewed-on: https://skia-review.googlesource.com/37440 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Revert "Revert "Add GrTextureOp and use to implement ↵Gravatar Brian Salomon2017-08-22
| | | | | | | | | | | | SkGpuDevice::drawImage[Rect]() when possible""" This reverts commit 20af6d12eefd8d937bc13bdb7fa0a9ac86b699af. Performance regressions on Android and Flutter Change-Id: If70edbe85aa251f298eddf18a89ba2cf56ed94fb Reviewed-on: https://skia-review.googlesource.com/37340 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Fix poor handling of nullptr for new blur codeGravatar Herb Derby2017-08-22
| | | | | | | | | BUG=chromium:749147 Change-Id: I2d4259805300c3f5ed9d25e142e9f12570c59781 Reviewed-on: https://skia-review.googlesource.com/37121 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Don't validate() in ~SkPathRefGravatar Adrienne Walker2017-08-22
| | | | | | | | | | | | | | | | | If an SkPathRef is constructed from arbitrary memory, it might not be valid. However, any SkPathRef should be able to be destroyed cleanly. An alternative to this would be to have CreateFromBuffer always do the validation (even in release builds), return null for invalid ones, and do the cleanup itself, but this seems like extra complication and maybe not something general release builds want. Bug: chromium: 752755 Change-Id: I1d509a5d5d0b173c20162ff79d731d6c8b4b6fb4 Reviewed-on: https://skia-review.googlesource.com/37321 Commit-Queue: Adrienne Walker <enne@chromium.org> Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Add GrPrepareCallback, always run at the start of flushGravatar Brian Osman2017-08-22
| | | | | | | | | | | | This is like an op, but only has one virtual, and always runs before any ops prepare. To be used in threaded software mask rendering (to schedule ASAP uploads). Bug: skia: Change-Id: I647482e2472d7321f3685e5bdbe49e10ac59c0b1 Reviewed-on: https://skia-review.googlesource.com/37160 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Make haveDecodedRow return voidGravatar Leon Scroggins III2017-08-22
| | | | | | | | | | The method already always returns true, except in a single case after asserting. Change-Id: Icf241a8af04220d459c0782ffd9b74c34c753236 Reviewed-on: https://skia-review.googlesource.com/37161 Reviewed-by: Chris Blume <cblume@chromium.org> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Fix artifacts on tiny stroked paths scaled up a lot.Gravatar Stephen White2017-08-22
| | | | | | | | | | | | Set doConsumeDegenerates to false when calling SkPath::Iter::next() for all paths which are not in screen space. These lines are not degenerate for world space paths. Bug: skia:6987 Change-Id: I411faf594bf8a15891bfff08691e86679b7741ac Reviewed-on: https://skia-review.googlesource.com/36881 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
* GrTessellator: when sanitizing contours, remove non-finite points.Gravatar Stephen White2017-08-22
| | | | | | | | | | NaNs can't be correctly sorted. Bug: 757650 Change-Id: Id1ca2fe1d1de7884da2a64ceef9491b1da7e8e77 Reviewed-on: https://skia-review.googlesource.com/37220 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
* Deinline methods of SkClipStack::ElementGravatar Brian Salomon2017-08-22
| | | | | | | Change-Id: Id234acc00d04cd9f3321b954902b83c4fd103c46 Reviewed-on: https://skia-review.googlesource.com/36740 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* remove disabled mask load and store codeGravatar Mike Klein2017-08-22
| | | | | | | | | | Things ran slower when we attempted to turn it on, and we've already removed the analog in SkJumper_stages.cpp. Change-Id: I61afa38990bf54d1bff2b1902f09a14df4e17da9 Reviewed-on: https://skia-review.googlesource.com/37080 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Remove SK_SUPPORT_LEGACY_BILERP2 dead codeGravatar Florin Malita2017-08-22
| | | | | | | | | Flag no longer defined. Change-Id: I4b4aa33ecd23b485cf80d79882f52da96c82a567 Reviewed-on: https://skia-review.googlesource.com/36822 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* use rasterpipeline if localmatrix is rotated or skewed for imagesGravatar Mike Reed2017-08-21
| | | | | | | | | Bug: skia: Change-Id: Ib269b5b9d79b055fe614aaacfd7e0d05d48f6085 Reviewed-on: https://skia-review.googlesource.com/33180 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* remove unused flag for rotated imageshadersGravatar Mike Reed2017-08-21
| | | | | | | | Bug: skia: Change-Id: I9066ec33a9742f6937cc61ff0afafd13af809222 Reviewed-on: https://skia-review.googlesource.com/36741 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Call initializeColorXform inside SkCodecGravatar Leon Scroggins III2017-08-18
| | | | | | | | | | | | | | | | | | | | | | | | Make initializeColorXform private, and only call in the base class. Add virtual method to skip initializeColorXform, for classes that do not need one. Change SkCodec::FrameInfo's SkAlphaType to an SkEncodedInfo::Alpha. This allows proper checking internally whether SkCodec needs to do a color correct premultiply. Depends on https://chromium-review.googlesource.com/c/620947, for this API change. (Separated from review.skia.org/25746) Bug: skia:5609 Bug: skia:6839 Change-Id: Icb0d46659c546060c34d32eaf792c86708726c7a Reviewed-on: https://skia-review.googlesource.com/35880 Reviewed-by: Chris Blume <cblume@chromium.org> Reviewed-by: Derek Sollenberger <djsollen@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Make texture created by SkColorSpaceXformImageGenerator be the right sizeGravatar Brian Salomon2017-08-18
| | | | | | | | | Previously it was the size of the original image with the subset contents at the top left. Change-Id: I9a50e44e5666acb06d9c3cfbb850c31e52a9e405 Reviewed-on: https://skia-review.googlesource.com/36441 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add SK_API to SkOverdrawCanvas and SkOverdrawColorFilter.Gravatar Sadrul Habib Chowdhury2017-08-18
| | | | | | | | | | | | The SkiaRenderer in chromium is going to use the overdraw canvas and filter for measuring overdraw. Move these headers out of src/ into include/. Bug: chromium:704285 Change-Id: I2abb1671b73e3d26552462cf700340a7e3b874f0 Reviewed-on: https://skia-review.googlesource.com/36160 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Reland "skia: add heif decoding support"Gravatar Leon Scroggins III2017-08-18
| | | | | | | | | | | | | | This reverts commit db68a426b6ba3a0fa1cace25ac306037eb7413a6. Fixes errors in Android and Google3 Bug: b/64077740 Change-Id: I3d2bb1223e4d8ba912ea2b88144aeecc487fce1a Reviewed-on: https://skia-review.googlesource.com/35701 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Chong Zhang <chz@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com>
* Revert "Revert "Add GrTextureOp and use to implement ↵Gravatar Brian Salomon2017-08-18
| | | | | | | | | | | | SkGpuDevice::drawImage[Rect]() when possible"" This reverts commit ceef4fb5c498003be77a32a46cedfbf5da22a274. Bug: skia: Change-Id: I50b738169b4cf9e06cbe0b5fad0234b506717b66 Reviewed-on: https://skia-review.googlesource.com/36201 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add GrMtlRenderTarget classGravatar Greg Daniel2017-08-18
| | | | | | | | | | Adds basic support for creating non-msaa pure render targets. Bug: skia: Change-Id: I63d2d474b86fc0ff5d8ee7757c08abbfd5e6c6ef Reviewed-on: https://skia-review.googlesource.com/31980 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Cache the results of get_pixel_formats_to_tryGravatar Brian Osman2017-08-18
| | | | | | | | | | | | | | | | | | | | | Choosing pixel formats is quite slow (depending on driver?). We were doing this once per context, and it added up. On my desktop windows machine, this saves another 7 seconds in `dm --config gl --src gm`. Actual times: 37s -> 30s (not writing PNGs) 47s -> 39.5s (writing PNGs) We always called this with MSAA sample count set to zero, so I cleaned up the code to make that clearer. Also included a comment about the theoretical risk, although I think that outside of a multi-GPU system, we're fine. Bug: skia: Change-Id: I50927ebfaf6fe8d88a63674427fbf9e06e4ab059 Reviewed-on: https://skia-review.googlesource.com/35763 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Use GrBackendObjectOwnership instead of GrVkImage::WrappedGravatar Greg Daniel2017-08-18
| | | | | | | | | | | This is more in line with what GL does and will make things cleaner for the metal backend as well. Bug: skia: Change-Id: I0ba0c588f813ad78051251c1cb9e8f92fd917ecc Reviewed-on: https://skia-review.googlesource.com/35940 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Add GrTextureOp and use to implement SkGpuDevice::drawImage[Rect]() ↵Gravatar Brian Salomon2017-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | when possible" This reverts commit 3fd295550f8c4fecd4bc61ce916738d49310eb67. Reason for revert: breaking things Original change's description: > Add GrTextureOp and use to implement SkGpuDevice::drawImage[Rect]() when possible > > This op draws a texture rectangle in src over blending with no edge antialiasing. It less powerful than NonAAFillRectOp/GrPaint but has less CPU overhead. > > Change-Id: Ia6107bb67c1c2a83de14c665aff64b0de2750fba > Reviewed-on: https://skia-review.googlesource.com/33802 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=djsollen@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com Change-Id: I9cdbeeac15b17d2d6b3385560ed826397c0373c6 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/36220 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add GrTextureOp and use to implement SkGpuDevice::drawImage[Rect]() when ↵Gravatar Brian Salomon2017-08-18
| | | | | | | | | | | possible This op draws a texture rectangle in src over blending with no edge antialiasing. It less powerful than NonAAFillRectOp/GrPaint but has less CPU overhead. Change-Id: Ia6107bb67c1c2a83de14c665aff64b0de2750fba Reviewed-on: https://skia-review.googlesource.com/33802 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>