aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrReducedClip.cpp
Commit message (Collapse)AuthorAge
* Deinline some GrPathRenderer method and one GrDrawingMananger method.Gravatar Brian Salomon2018-07-10
| | | | | | | | | | | | | | Removes circular dependencies from coming change. Some IWYU fallout from removing #includes from GrPathRenderer.h and GrDrawingManager.h Bug: skia: Change-Id: Ice377538e6d64b6a74a59e6140e1de9a58ab99bf Reviewed-on: https://skia-review.googlesource.com/140181 Commit-Queue: Brian Salomon <bsalomon@google.com> Auto-Submit: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Add genIDs from all contributing elements to GrReducedClip's mask key."Gravatar Brian Salomon2018-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1354048c8fa885b83e414532c011d710590d6b46. Reason for revert: tsan/valgrind failures Original change's description: > Add genIDs from all contributing elements to GrReducedClip's mask key. > > Change-Id: I3fed124ba3fefd1ef82acdb4ace9531d0c89ad8b > Reviewed-on: https://skia-review.googlesource.com/138586 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com Change-Id: Ia5bc098309cd02baf46f03d8ff17fabbd383481e No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/139920 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add genIDs from all contributing elements to GrReducedClip's mask key.Gravatar Brian Salomon2018-07-09
| | | | | | | Change-Id: I3fed124ba3fefd1ef82acdb4ace9531d0c89ad8b Reviewed-on: https://skia-review.googlesource.com/138586 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* ccpr: Use lazy proxies with GrCCAtlasGravatar Chris Dalton2018-06-18
| | | | | | | | Bug: skia: Change-Id: I576d9303d451352778de0425e3ecbc561331cd09 Reviewed-on: https://skia-review.googlesource.com/135362 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Make GrCaps and GrShaderCaps private.Gravatar Brian Salomon2018-05-11
| | | | | | | | | Moves getCaps() from GrContext to GrContextPriv and removes unused refCaps(). Change-Id: Ic6a8951b656c0d1b2773eae73bff8e88af819866 Reviewed-on: https://skia-review.googlesource.com/127389 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* ccpr: Remove canMakeClipProcessorGravatar Chris Dalton2018-04-27
| | | | | | | | | | | | Now that conics are supported we can make a ccpr clip FP out of any path. No need to ask. And the 'fDrawCachablePaths' check was redundant since clip paths are always volatile anyway (for now). Bug: skia: Change-Id: I670474a3b91f1c252ed323eb627bbb109788e6b8 Reviewed-on: https://skia-review.googlesource.com/124362 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "Delete GPU alpha clip masks"Gravatar Chris Dalton2018-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a466228a616b1b02ede2d4389fefcfc839a54a25. Reason for revert: Turned up a vulkan driver bug Original change's description: > Delete GPU alpha clip masks > > The cost of switching render targets on each draw to make a custom > clip is enormous. There are virtually no circumstances where this will > outperform our cached, multi-threaded software mask generator. The > tried-and-true approach to clipping on-GPU is with analytic FPs. And > now that we support CCPR clip FPs, there ulitmately should be very few > clip stacks that even require a mask as long as they don't use > deprecated SkClipOps. > > Bug: skia: > Change-Id: I79c5558c93c1b99179f1e933d029f69b14ad1ce3 > Reviewed-on: https://skia-review.googlesource.com/116724 > Reviewed-by: Brian Osman <brianosman@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=robertphillips@google.com,brianosman@google.com,csmartdalton@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia: Change-Id: Iba289e00ba2eca7084dc8517491cfb5f6ab6266f Reviewed-on: https://skia-review.googlesource.com/117420 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Delete GPU alpha clip masksGravatar Chris Dalton2018-03-28
| | | | | | | | | | | | | | | | The cost of switching render targets on each draw to make a custom clip is enormous. There are virtually no circumstances where this will outperform our cached, multi-threaded software mask generator. The tried-and-true approach to clipping on-GPU is with analytic FPs. And now that we support CCPR clip FPs, there ulitmately should be very few clip stacks that even require a mask as long as they don't use deprecated SkClipOps. Bug: skia: Change-Id: I79c5558c93c1b99179f1e933d029f69b14ad1ce3 Reviewed-on: https://skia-review.googlesource.com/116724 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Move GrSurfaceProxy::MakeLazy to GrProxyProvider::createLazyGravatar Robert Phillips2018-01-17
| | | | | | | | | | This is pretty much a straight up move of the GrSurfaceProxy code with some plumbing to get the ProxyProvider in the right places. Change-Id: I63cecb242dada503f97dbd1c0ce7ede75323100d Reviewed-on: https://skia-review.googlesource.com/94200 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Prefer fullscreen clears on Qualcomm/GLGravatar Chris Dalton2017-12-12
| | | | | | | | | | | | | | | | | Adds Qualcomm to the set of GL devices on which we prefer fullscreen clears. Renames fullscreenClearIsFree in GrCaps to preferFullscreenClears. Replaces 'bool canIgnoreClip' on GrRenderTargetContext::clear with an enum. Bug: skia: Change-Id: I5b30298c4d0b092c398b9fea6060f3e2bea91e46 Reviewed-on: https://skia-review.googlesource.com/83060 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Add analytic clip FPs that read from the CCPR atlasGravatar Chris Dalton2017-12-05
| | | | | | | | Bug: skia:7190 Change-Id: Ie31d368f52910e6917efdeb1b024370b06fc11ee Reviewed-on: https://skia-review.googlesource.com/77160 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Avoid GrEllipseEffect for small radii on devices without 32 bit float.Gravatar Brian Salomon2017-12-05
| | | | | | | | | Also limit small radius bail in GrCircleEffect to clip out cases. Change-Id: I14ce736969b05203219d68f30283c36c84f78f3a Reviewed-on: https://skia-review.googlesource.com/80621 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Cleanup yes/no enums in GaneshGravatar Chris Dalton2017-11-27
| | | | | | | | | | | | Yes/no enums should have a base type of bool, and kYes should always be true. Also, there is no need for a "GrEnumToBool()" function, as we can just use the enum itself directly: e.g. "GrAA(bool)". Bug: skia: Change-Id: I7bb3c2983f717f3467fca4ce6b32920d71026894 Reviewed-on: https://skia-review.googlesource.com/74860 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Reland "Fold analytic clip FPs into GrReducedClip"Gravatar Chris Dalton2017-11-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of 4355b26b359d5f2597a10012e7eb11fb3a1f025b Original change's description: > Fold analytic clip FPs into GrReducedClip > > Perf result on Pixel phone (sorted by impact): > > GEOMEAN 7.44 -> 6.92 ms [ 93%] > > keymobi_cnn_com.skp 3.55 -> 3.59 ms [101%] > keymobi_theverge_com.skp 4.08 -> 4.13 ms [101%] > desk_skbug6850autoscroll.skp 1.21 -> 1.22 ms [101%] > ... > top25desk_weather_com.skp 14.2 -> 11.5 ms [ 81%] > keymobi_androidpolice_com_2012_.skp 3.84 -> 2.95 ms [ 77%] > keymobi_shop_mobileweb_ebay_com.skp 2.94 -> 2.26 ms [ 77%] > keymobi_boingboing_net.skp 3.08 -> 2.24 ms [ 73%] > desk_jsfiddlebigcar.skp 1.90 -> 1.25 ms [ 66%] > keymobi_m_youtube_com_watch_v_9.skp 13.5 -> 8.84 ms [ 65%] > keymobi_sfgate_com_.skp 8.55 -> 5.55 ms [ 65%] > keymobi_blogger.skp 4.01 -> 2.60 ms [ 65%] > > Cleaner code, improved skps, slightly better geometric mean time. > > Pixel C is mostly unaffected, presumably because it uses window > rectangles. > > Bug: skia:7190 > Change-Id: Ia93f68b2f971ea66b3ab19dc73557ea602932a92 > Reviewed-on: https://skia-review.googlesource.com/67424 > Commit-Queue: Chris Dalton <csmartdalton@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com Bug: skia:7190 Change-Id: I92f1ed21b6292feb3209fcbd1725487784d420da Reviewed-on: https://skia-review.googlesource.com/72562 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "Fold analytic clip FPs into GrReducedClip"Gravatar Brian Osman2017-11-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4355b26b359d5f2597a10012e7eb11fb3a1f025b. Reason for revert: Most likely CL for layout test failures on Chrome roll: https://bugs.chromium.org/p/chromium/issues/detail?id=785931 Original change's description: > Fold analytic clip FPs into GrReducedClip > > Perf result on Pixel phone (sorted by impact): > > GEOMEAN 7.44 -> 6.92 ms [ 93%] > > keymobi_cnn_com.skp 3.55 -> 3.59 ms [101%] > keymobi_theverge_com.skp 4.08 -> 4.13 ms [101%] > desk_skbug6850autoscroll.skp 1.21 -> 1.22 ms [101%] > ... > top25desk_weather_com.skp 14.2 -> 11.5 ms [ 81%] > keymobi_androidpolice_com_2012_.skp 3.84 -> 2.95 ms [ 77%] > keymobi_shop_mobileweb_ebay_com.skp 2.94 -> 2.26 ms [ 77%] > keymobi_boingboing_net.skp 3.08 -> 2.24 ms [ 73%] > desk_jsfiddlebigcar.skp 1.90 -> 1.25 ms [ 66%] > keymobi_m_youtube_com_watch_v_9.skp 13.5 -> 8.84 ms [ 65%] > keymobi_sfgate_com_.skp 8.55 -> 5.55 ms [ 65%] > keymobi_blogger.skp 4.01 -> 2.60 ms [ 65%] > > Cleaner code, improved skps, slightly better geometric mean time. > > Pixel C is mostly unaffected, presumably because it uses window > rectangles. > > Bug: skia:7190 > Change-Id: Ia93f68b2f971ea66b3ab19dc73557ea602932a92 > Reviewed-on: https://skia-review.googlesource.com/67424 > Commit-Queue: Chris Dalton <csmartdalton@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com Change-Id: I86ff05196eaaeca4fb63836c9b449bbea76fe80b No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7190 Reviewed-on: https://skia-review.googlesource.com/72480 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Fold analytic clip FPs into GrReducedClipGravatar Chris Dalton2017-11-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Perf result on Pixel phone (sorted by impact): GEOMEAN 7.44 -> 6.92 ms [ 93%] keymobi_cnn_com.skp 3.55 -> 3.59 ms [101%] keymobi_theverge_com.skp 4.08 -> 4.13 ms [101%] desk_skbug6850autoscroll.skp 1.21 -> 1.22 ms [101%] ... top25desk_weather_com.skp 14.2 -> 11.5 ms [ 81%] keymobi_androidpolice_com_2012_.skp 3.84 -> 2.95 ms [ 77%] keymobi_shop_mobileweb_ebay_com.skp 2.94 -> 2.26 ms [ 77%] keymobi_boingboing_net.skp 3.08 -> 2.24 ms [ 73%] desk_jsfiddlebigcar.skp 1.90 -> 1.25 ms [ 66%] keymobi_m_youtube_com_watch_v_9.skp 13.5 -> 8.84 ms [ 65%] keymobi_sfgate_com_.skp 8.55 -> 5.55 ms [ 65%] keymobi_blogger.skp 4.01 -> 2.60 ms [ 65%] Cleaner code, improved skps, slightly better geometric mean time. Pixel C is mostly unaffected, presumably because it uses window rectangles. Bug: skia:7190 Change-Id: Ia93f68b2f971ea66b3ab19dc73557ea602932a92 Reviewed-on: https://skia-review.googlesource.com/67424 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Don't use analytic clip FPs when drawing to stencilGravatar Chris Dalton2017-11-07
| | | | | | | | | | | | | It doesn't make sense to multiply by coverage when drawing to stencil. This could theoretically work with FPs that discard and/or modify the sample mask, but for the time being an analytic FP means one that calculates a coverage value. Bug: skia:7190 Change-Id: I44140a5823f8683ec08244bdf9d369f51fa05dd9 Reviewed-on: https://skia-review.googlesource.com/68362 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "Don't use analytic clip FPs when drawing to stencil"Gravatar Chris Dalton2017-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4c92d4aa3ed653afdff9996b90a1139ed1dc9420. Reason for revert: Chromecast bot failure Original change's description: > Don't use analytic clip FPs when drawing to stencil > > It doesn't make sense to multiply by coverage when drawing to stencil. > This could theoretically work with FPs that discard and/or modify > the sample mask, but for the time being an analytic FP means one that > calculates a coverage value. > > Bug: skia:7190 > Change-Id: Ic40cf6c19c377cba80bad458993582f5cc07022a > Reviewed-on: https://skia-review.googlesource.com/67423 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com Change-Id: Ie5bd4852c201e47daee0920f5644141bee2d8a46 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7190 Reviewed-on: https://skia-review.googlesource.com/68400 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Don't use analytic clip FPs when drawing to stencilGravatar Chris Dalton2017-11-07
| | | | | | | | | | | | | It doesn't make sense to multiply by coverage when drawing to stencil. This could theoretically work with FPs that discard and/or modify the sample mask, but for the time being an analytic FP means one that calculates a coverage value. Bug: skia:7190 Change-Id: Ic40cf6c19c377cba80bad458993582f5cc07022a Reviewed-on: https://skia-review.googlesource.com/67423 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "Implement window rectangles in vulkan"Gravatar Jim Van Verth2017-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 94c0468b2b4255e3beed81efdcfbf6d9d39e11e4. Reason for revert: <INSERT REASONING HERE> Original change's description: > Implement window rectangles in vulkan > > Bug: skia: > Change-Id: I32c079b90a5503c797dfc073a093f940cd8c550a > Reviewed-on: https://skia-review.googlesource.com/65423 > Commit-Queue: Chris Dalton <csmartdalton@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=egdaniel@google.com,bsalomon@google.com,csmartdalton@google.com Change-Id: I5a90cb57fb5d4bcf8c7e76a5f71a7f16edbaf6be No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/67060 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Implement window rectangles in vulkanGravatar Chris Dalton2017-11-02
| | | | | | | | | Bug: skia: Change-Id: I32c079b90a5503c797dfc073a093f940cd8c550a Reviewed-on: https://skia-review.googlesource.com/65423 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Fold analytic clip FPs into GrReducedClip"Gravatar Chris Dalton2017-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d29e0da3523e390eeb77b5a823d7ff86569ac1d3. Reason for revert: More asserts Original change's description: > Fold analytic clip FPs into GrReducedClip > > Perf result on Pixel phone (sorted by impact): > > GEOMEAN 6.73 -> 6.49 ms [96% ] > > top25desk_pinterest.skp 0.45 -> 0.49 ms [107%] > desk_pokemonwiki.skp 14.6 -> 15.9 ms [106%] > keymobi_pinterest.skp 0.47 -> 0.49 ms [104%] > ... > keymobi_androidpolice_com_2012_.skp 3.69 -> 3.09 ms [83% ] > keymobi_shop_mobileweb_ebay_com.skp 2.90 -> 2.29 ms [78% ] > keymobi_boingboing_net.skp 2.95 -> 2.29 ms [76% ] > desk_jsfiddlebigcar.skp 1.79 -> 1.29 ms [71% ] > keymobi_m_youtube_com_watch_v_9.skp 12.9 -> 9.09 ms [70% ] > keymobi_blogger.skp 3.80 -> 2.69 ms [70% ] > keymobi_sfgate_com_.skp 8.16 -> 5.69 ms [69% ] > > Cleaner code, improved skps, slightly better geometric mean time. > > Pixel C is mostly unaffected, presumably because it uses window > rectangles. > > Bug: skia:7190 > Change-Id: I9c7f3512ca57e1d1afcd42865357b63ffcc192ce > Reviewed-on: https://skia-review.googlesource.com/66280 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=bsalomon@google.com,csmartdalton@google.com Change-Id: Ia91076d7b7a240798f1543f892d41a2968b421ae No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7190 Reviewed-on: https://skia-review.googlesource.com/66184 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Fold analytic clip FPs into GrReducedClipGravatar Chris Dalton2017-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Perf result on Pixel phone (sorted by impact): GEOMEAN 6.73 -> 6.49 ms [96% ] top25desk_pinterest.skp 0.45 -> 0.49 ms [107%] desk_pokemonwiki.skp 14.6 -> 15.9 ms [106%] keymobi_pinterest.skp 0.47 -> 0.49 ms [104%] ... keymobi_androidpolice_com_2012_.skp 3.69 -> 3.09 ms [83% ] keymobi_shop_mobileweb_ebay_com.skp 2.90 -> 2.29 ms [78% ] keymobi_boingboing_net.skp 2.95 -> 2.29 ms [76% ] desk_jsfiddlebigcar.skp 1.79 -> 1.29 ms [71% ] keymobi_m_youtube_com_watch_v_9.skp 12.9 -> 9.09 ms [70% ] keymobi_blogger.skp 3.80 -> 2.69 ms [70% ] keymobi_sfgate_com_.skp 8.16 -> 5.69 ms [69% ] Cleaner code, improved skps, slightly better geometric mean time. Pixel C is mostly unaffected, presumably because it uses window rectangles. Bug: skia:7190 Change-Id: I9c7f3512ca57e1d1afcd42865357b63ffcc192ce Reviewed-on: https://skia-review.googlesource.com/66280 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "Fold analytic clip FPs into GrReducedClip"Gravatar Chris Dalton2017-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1af37b758bc3c285effb7b96bd27faf4481d90d0. Reason for revert: asserts Original change's description: > Fold analytic clip FPs into GrReducedClip > > Perf result on Pixel phone (sorted by impact): > > GEOMEAN 6.73 -> 6.49 ms [96% ] > > top25desk_pinterest.skp 0.45 -> 0.49 ms [107%] > desk_pokemonwiki.skp 14.6 -> 15.9 ms [106%] > keymobi_pinterest.skp 0.47 -> 0.49 ms [104%] > ... > keymobi_androidpolice_com_2012_.skp 3.69 -> 3.09 ms [83% ] > keymobi_shop_mobileweb_ebay_com.skp 2.90 -> 2.29 ms [78% ] > keymobi_boingboing_net.skp 2.95 -> 2.29 ms [76% ] > desk_jsfiddlebigcar.skp 1.79 -> 1.29 ms [71% ] > keymobi_m_youtube_com_watch_v_9.skp 12.9 -> 9.09 ms [70% ] > keymobi_blogger.skp 3.80 -> 2.69 ms [70% ] > keymobi_sfgate_com_.skp 8.16 -> 5.69 ms [69% ] > > Cleaner code, improved skps, slightly better geometric mean time. > > Pixel C is mostly unaffected, presumably because it uses window > rectangles. > > Bug: skia:7190 > Change-Id: I070148258d04284def535134a72a4584c5d6f7c7 > Reviewed-on: https://skia-review.googlesource.com/65460 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com Change-Id: I6c325f969c1f4ff0fe80945a675c5f72a81d3865 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7190 Reviewed-on: https://skia-review.googlesource.com/66260 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Fold analytic clip FPs into GrReducedClipGravatar Chris Dalton2017-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Perf result on Pixel phone (sorted by impact): GEOMEAN 6.73 -> 6.49 ms [96% ] top25desk_pinterest.skp 0.45 -> 0.49 ms [107%] desk_pokemonwiki.skp 14.6 -> 15.9 ms [106%] keymobi_pinterest.skp 0.47 -> 0.49 ms [104%] ... keymobi_androidpolice_com_2012_.skp 3.69 -> 3.09 ms [83% ] keymobi_shop_mobileweb_ebay_com.skp 2.90 -> 2.29 ms [78% ] keymobi_boingboing_net.skp 2.95 -> 2.29 ms [76% ] desk_jsfiddlebigcar.skp 1.79 -> 1.29 ms [71% ] keymobi_m_youtube_com_watch_v_9.skp 12.9 -> 9.09 ms [70% ] keymobi_blogger.skp 3.80 -> 2.69 ms [70% ] keymobi_sfgate_com_.skp 8.16 -> 5.69 ms [69% ] Cleaner code, improved skps, slightly better geometric mean time. Pixel C is mostly unaffected, presumably because it uses window rectangles. Bug: skia:7190 Change-Id: I070148258d04284def535134a72a4584c5d6f7c7 Reviewed-on: https://skia-review.googlesource.com/65460 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Allow GrAppliedClip to have >1 clip coverage FPGravatar Chris Dalton2017-10-31
| | | | | | | | Bug: skia:7190 Change-Id: I07fc689b20968a1b9fe2620bf8a33faacf917823 Reviewed-on: https://skia-review.googlesource.com/65401 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "Fix int overflow issues with clip and path bounds."Gravatar Mike Klein2017-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b1fc36829de69da5376019403fdd649c06f4cf1b. Reason for revert: I hate to revert this, but I think it's caused some layout test diffs that are holding up the roll. https://storage.googleapis.com/chromium-layout-test-archives/linux_trusty_blink_rel/17909/layout-test-results/results.html Original change's description: > Fix int overflow issues with clip and path bounds. > > * Clamp scissor clip bounds to query bounds (which are RT bounds) > * Change IsInsideClip test to be more int overflow friendly > * Check to make sure path bounds can have representable width and height > > Bug: skia:7239 > Bug: skia:7240 > Change-Id: I4c512d05c5609a5a466393408282101697ebea83 > Reviewed-on: https://skia-review.googlesource.com/65506 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,bsalomon@google.com,csmartdalton@google.com Change-Id: Ic5c15219cdbe92811284130bce1e984823f0c4d1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7239, skia:7240 Reviewed-on: https://skia-review.googlesource.com/65920 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Fix int overflow issues with clip and path bounds.Gravatar Jim Van Verth2017-10-31
| | | | | | | | | | | | | * Clamp scissor clip bounds to query bounds (which are RT bounds) * Change IsInsideClip test to be more int overflow friendly * Check to make sure path bounds can have representable width and height Bug: skia:7239 Bug: skia:7240 Change-Id: I4c512d05c5609a5a466393408282101697ebea83 Reviewed-on: https://skia-review.googlesource.com/65506 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Merge clip rects in GrReducedClipGravatar Chris Dalton2017-10-27
| | | | | | | | | | | | Merges the intersection of all rect clips into a single clip rect element. This is also the first step toward better handling of the subtractive elements. Bug: skia: Change-Id: I36bd9c256874917adb68f43e8faddc609e65f37a Reviewed-on: https://skia-review.googlesource.com/64380 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Improve heuristics for when to use ccprGravatar Chris Dalton2017-09-12
| | | | | | | | | | | | | Gives the convex and tessellating renderers first claim on larger paths, and the distance field renderer first claim on complex, non-volatile paths. This also requires plumbing the clip bounds through GrPathRenderer::CanDrawPathArgs. Bug: skia: Change-Id: I16e1d35ad5ee63251e33f113b1579cbba60456da Reviewed-on: https://skia-review.googlesource.com/42224 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Rename methods and enum on SkClipStack::Element to indicate "device space"Gravatar Brian Salomon2017-08-30
| | | | | | | Change-Id: I83056843b530f76590f755f97e3d0a5a58f371fa Reviewed-on: https://skia-review.googlesource.com/39402 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Move transformation of clip elements to SkClipStack::ElementGravatar Brian Salomon2017-08-28
| | | | | | | Change-Id: Ia6ff3fdc927e33dbd28ccfb345859594289d0690 Reviewed-on: https://skia-review.googlesource.com/36820 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Improve handling of clip stack IDGravatar Robert Phillips2017-06-28
| | | | | | | Change-Id: I1d5cf06d9b50c370f969a8778181fe94f7d35844 Reviewed-on: https://skia-review.googlesource.com/21061 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fix for Android batching bugGravatar Robert Phillips2017-06-28
| | | | | | | | | | | | | | | On Android it looks like we have: stencilClip1 draw1 stencilClip2 draw2 where draw1 is being forward combined with draw2 b.c. they are both stencil clipped but it shouldn't b.c. they are different stencil clips. Change-Id: Ia704d7ab869022a055eed0726e2b7fab8eaaf817 Reviewed-on: https://skia-review.googlesource.com/20977 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fix GrReducedClip.cpp: assertion failure surrounding tiny query boundsGravatar Chris Dalton2017-06-05
| | | | | | | | | | Some assertions cannot be relied upon due to FP error. Bug: skia:5990 Change-Id: I32445b320b9100ae2f80d2f762707d823da77805 Reviewed-on: https://skia-review.googlesource.com/18602 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Make GrRenderTarget[(Proxy)|(Context)]? advertise a "full scene aa type".Gravatar Brian Salomon2017-05-12
| | | | | | | | Bug: skia: Change-Id: I24549604e8305028e34e0022bfef992a8e8c33f7 Reviewed-on: https://skia-review.googlesource.com/16230 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add flag to avoid stencil buffers in SkiaGravatar Eric Karl2017-05-09
| | | | | | | | | | | | | | | Certain systems experience a leak in the GL driver associated with stencil buffers. Attempts to avoid the leak (while still using stencil buffers) dind't succeed. This patch adds a GrContextOption fAvoidStencilBuffers. This disables certain path rendering modes, as well as stencil based masking/clipping. Bug: 713854 Change-Id: Ifa6c0f2bd5ee395547bda9165d6c79d197ae8b8b Reviewed-on: https://skia-review.googlesource.com/15253 Commit-Queue: Eric Karl <ericrk@chromium.org> Reviewed-by: Eric Karl <ericrk@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Compute clipped draw bounds outside GrAppliedClip.Gravatar Brian Salomon2017-03-14
| | | | | | | | | | | | We will be storing GrAppliedClips alongside ops. The op already stores the clipped bounds. If GrAppliedClip has draw bounds then as ops combine the GrAppliedClip's bounds should be merged to be consistent. However, we won't actually ever use those bounds again so it would be wasteful to merge them. Change-Id: I4ef3010dc04761e256120a2e0e074bc3c6ff6ca1 Reviewed-on: https://skia-review.googlesource.com/9642 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* Remove origin from GrClipStackClip and GrWindowRectsState.Gravatar Brian Salomon2017-03-13
| | | | | | | Change-Id: I993f426fee0f21cf1f529f58d242de3017253678 Reviewed-on: https://skia-review.googlesource.com/9623 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* Remove atlas creation from GrResourceProviderGravatar Robert Phillips2017-03-02
| | | | | | | | | This is pulled out of: https://skia-review.googlesource.com/c/6680/ (Make SkImage_Gpu be deferred) and is only tangentially related to the goal of that CL. Change-Id: I6b6db4869597070f85ab3b9fea178fc88c104f87 Reviewed-on: https://skia-review.googlesource.com/9106 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Make GrPaints move their GrProcessor ownership into GrPipelineBuilder.Gravatar Brian Salomon2017-01-11
| | | | | | | | | This makes GrPaints usable only once. In some places we must make copies in order to issue draws with the same paint state. Change-Id: Ie816e5185ce93a064111cad64c6880e1e21184c2 Reviewed-on: https://skia-review.googlesource.com/6844 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Removing ref counting from GrXPFactory.""Gravatar Brian Salomon2017-01-09
| | | | | | | | | This reverts commit 003312a211e65f35e402d6fe80a32e23d4c94ac4. Change-Id: Ib41065e5c356d1dd99e70fa10611ac6756c2b79d Reviewed-on: https://skia-review.googlesource.com/6803 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Removing ref counting from GrXPFactory."Gravatar Brian Salomon2017-01-09
| | | | | | | | | | | This reverts commit a8f80de2bc17672b4b6f26d3cf6b38123ac850c9. Reason for revert: nanobench failing on windows bots, possibly others Change-Id: Iacb8c650064a28654c165665be057377ffb02ba5 Reviewed-on: https://skia-review.googlesource.com/6802 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Removing ref counting from GrXPFactory.Gravatar Brian Salomon2017-01-09
| | | | | | | | | All GrXPFactory instances are static constexpr. Change-Id: If1086b08534166201e53b3fd9379104e361eb5e6 Reviewed-on: https://skia-review.googlesource.com/6701 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove antialias axis from GrPathRendererChain::DrawTypeGravatar Brian Salomon2016-12-13
| | | | | | | Change-Id: I910ef57027059c3c7dd780ba9de40363c201e174 Reviewed-on: https://skia-review.googlesource.com/5728 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* change SkClipOp to a class enumGravatar Mike Reed2016-12-12
| | | | | | | | | BUG=skia: Change-Id: I25dbe6d6b8666a2a0a7be7bdd2ae0b067868d14e Reviewed-on: https://skia-review.googlesource.com/5718 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Relandx2 "Remove antialiasing control from GrPaint."Gravatar Brian Salomon2016-12-09
| | | | | | | | | | | Fixes a bad merge. This reverts commit 073285c0595d46205d1482cc19af2d7d891bfeae. Change-Id: I5e92339d9b33d3a6dc58b9fcd2a1b3a5684e8f8a Reviewed-on: https://skia-review.googlesource.com/5774 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Reland "Remove antialiasing control from GrPaint.""Gravatar Brian Salomon2016-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 3944484020d98ff8f386378296106c321279482b. Reason for revert: Merges badly with a recent change. Will rebase and reland. Original change's description: > Reland "Remove antialiasing control from GrPaint." > > This contains fixes for GLPrograms test and mixed samples rendering. > > This reverts commit 419d81eed4a010e6080db199795117cbedf9e6e4. > > BUG=skia: > > Change-Id: If8f002fbfaaaab6d1607403f2b15ccc7f1e17e87 > Reviewed-on: https://skia-review.googlesource.com/5763 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org BUG=skia: NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Iff9657041e28604a845bc5a9acec7c9b248c53bd Reviewed-on: https://skia-review.googlesource.com/5772 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Reland "Remove antialiasing control from GrPaint."Gravatar Brian Salomon2016-12-09
| | | | | | | | | | | | | This contains fixes for GLPrograms test and mixed samples rendering. This reverts commit 419d81eed4a010e6080db199795117cbedf9e6e4. BUG=skia: Change-Id: If8f002fbfaaaab6d1607403f2b15ccc7f1e17e87 Reviewed-on: https://skia-review.googlesource.com/5763 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert[2] "remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS"Gravatar Mike Reed2016-12-09
| | | | | | | | | | | This reverts commit a129dfef2aaab0b5995cdf1ab7b2cdd41c29cf72. BUG=skia: Change-Id: I717de6e5fcd4516aa684b014b1414b0f82ac2b91 Reviewed-on: https://skia-review.googlesource.com/5722 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com>