aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrRenderTargetContextPriv.h
Commit message (Collapse)AuthorAge
* 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>
* 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>
* Remove instanced renderingGravatar Brian Salomon2017-12-08
| | | | | | | Change-Id: I4219b1d23a647b849ee41fe71b53e1c45edfc3f4 Reviewed-on: https://skia-review.googlesource.com/82241 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Brian Salomon <bsalomon@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>
* Add "lazy" texture proxiesGravatar Chris Dalton2017-11-30
| | | | | | | | | | | Adds ultra-deferred proxies that are instantiated by a user-supplied callback during flush. Bug: skia:7190 Change-Id: I75a7ac6dba953c3b0a99febc203a7f4d2f3789fc Reviewed-on: https://skia-review.googlesource.com/76461 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Robert Phillips <robertphillips@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>
* Make GrPipeline hold a GrRenderTargetProxy (instead of a GrRenderTarget)Gravatar Robert Phillips2017-07-26
| | | | | | | | | | | In a future world where GrSurface no longer has an origin it will be useful for the GrPipeline to be holding the GrRenderTargetProxy (which will still have an origin). Change-Id: I743a8cc07b6b92f8116227fb77b7c37da43cde8a Reviewed-on: https://skia-review.googlesource.com/26804 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove GrLegacyMeshDrawOp and GrPipelineBuilderGravatar Brian Salomon2017-07-19
| | | | | | | Change-Id: Ib301a0e7d4b4c4f05417d28862017307949748c9 Reviewed-on: https://skia-review.googlesource.com/23584 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@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>
* Move copy operation from GrRenderTargetContext/GrTextureContext to ↵Gravatar Robert Phillips2017-06-28
| | | | | | | | | GrSurfaceContext Change-Id: I5f48ce9978370f07238a7318ccb6270e10069c92 Reviewed-on: https://skia-review.googlesource.com/21104 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Move all non-AA fill rect ops off of GrLegacyMeshDrawOp.Gravatar Brian Salomon2017-05-10
| | | | | | | | | This adds perspective to GrNewNonAAFillRectOp, renames it to GrNonAAFillRectOp, and deletes the previous version of that namespace. Change-Id: I20f35bf019f9c9105e6ec83dda11328451138109 Reviewed-on: https://skia-review.googlesource.com/15634 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Move pipeline handling out of GrMeshDrawOp.Gravatar Brian Salomon2017-04-03
| | | | | | | | | | | The monolithic GrPipeline is moved to a subclass GrLegacyDrawMeshOp. The pipeline used to record a GrMesh draw in a GrMeshDrawOp must now be passed rather than implicitly using the op's pipeline. Change-Id: I50d77e4dcc8d91a523fa7566ce43a9a291174706 Reviewed-on: https://skia-review.googlesource.com/11002 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@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>
* Add a separate draw function to GrRenderTargetContext for GrMeshDrawOp ↵Gravatar Brian Salomon2017-03-09
| | | | | | | | | | | | derived classes. The first phase of deferring GrPipeline creation until flush will apply only to GrDrawOp subclasses that do not derive from GrMeshDrawOp. This change prepares for that by creating separate draw functions on GrRenderTargetContext for GrMeshDrawOp-derived ops. This is temporary and will incrementally be undone as pipeline-creation deferral rolls out to the GrMeshDrawOps in a later phase of this work. Change-Id: I0f5b71fe913f3273cfe9e965f7d8bbe7f01ad0ef Reviewed-on: https://skia-review.googlesource.com/9481 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add a unique ID to GrOpLists and return it from GrRenderTargetContext::addDrawOpGravatar Robert Phillips2017-03-08
| | | | | | | | | This is to support the preFlush callbacks Change-Id: I8513ea08b6516681566eceafa789b2ee7925ebce Reviewed-on: https://skia-review.googlesource.com/9199 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>
* Remove ref counting from GrOp.Gravatar Brian Salomon2017-01-03
| | | | | | | | | Instead use std::unique_ptr to manage GrOp lifetime. Change-Id: Ic1dc1e0ffd7254c3994221f498677af5bbf66a71 Reviewed-on: https://skia-review.googlesource.com/6479 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Add a deferred copy surface (take 3)Gravatar Robert Phillips2016-12-15
| | | | | | | | | | | | | | This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext). There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added. This is a reland of https://skia-review.googlesource.com/c/5773/ (Add a deferred copy surface) Change-Id: Ib8fd96d0569274ef781366eb900ed8ee839ae9bd Reviewed-on: https://skia-review.googlesource.com/6109 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Add a deferred copy surface (take 2)"Gravatar Robert Phillips2016-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 398487a850431cf495330d4023607df5305a311f. Reason for revert: See if this is causing the roll failure Original change's description: > Add a deferred copy surface (take 2) > > This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext). > > There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added. > > This is a reland of https://skia-review.googlesource.com/c/5773/ (Add a deferred copy surface) > > Change-Id: Ide560f569aede5e622420dc2f30eef76357d69f4 > Reviewed-on: https://skia-review.googlesource.com/5939 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1ef40f0d5fb0bca62031f94f10eb18acd753e913 Reviewed-on: https://skia-review.googlesource.com/6024 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add a deferred copy surface (take 2)Gravatar Robert Phillips2016-12-13
| | | | | | | | | | | | | | This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext). There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added. This is a reland of https://skia-review.googlesource.com/c/5773/ (Add a deferred copy surface) Change-Id: Ide560f569aede5e622420dc2f30eef76357d69f4 Reviewed-on: https://skia-review.googlesource.com/5939 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Add a deferred copy surface"Gravatar Robert Phillips2016-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4431de6af930a8638c194b072558ea3a4b79d908. Reason for revert: ANGLE errors (at the very least) Original change's description: > Add a deferred copy surface > > This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext). > > There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added. > > Change-Id: Iab1867668d8146a766201158a251b9174438ee2b > Reviewed-on: https://skia-review.googlesource.com/5773 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I61408d9e306b9b1ab32f93ab086e95184e12857f Reviewed-on: https://skia-review.googlesource.com/5938 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add a deferred copy surfaceGravatar Robert Phillips2016-12-13
| | | | | | | | | | | | This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext). There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added. Change-Id: Iab1867668d8146a766201158a251b9174438ee2b Reviewed-on: https://skia-review.googlesource.com/5773 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Rename testingOnly_drawBatch to testingOnly_addDrawOp and sk_spGravatar Brian Salomon2016-12-09
| | | | | | | Change-Id: I35efd4ad2b7132145c1e477f0b1f283276e9fad5 Reviewed-on: https://skia-review.googlesource.com/5704 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@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>
* Different approach to fixing gpu blurs on platforms that "useDrawInsteadOfClear"Gravatar Robert Phillips2016-12-09
| | | | | | | | | | | This CL reverts https://skia-review.googlesource.com/c/5148/ (Fix gpu blurring on platforms that "useDrawInsteadOfClear") (all the worstCaseWidth/Height stuff) and adds a new GrRenderTargetContext entry point (absClear) to specify clears that can't be discarded or altered. BUG=skia: Change-Id: I18b1373ecf4a153ca8c0f290ab8b1d00770426da Reviewed-on: https://skia-review.googlesource.com/5484 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Remove antialiasing control from GrPaint."Gravatar Brian Salomon2016-12-08
| | | | | | | | | | | This reverts commit 9f549358b3ac9f61e78b194e39d6ac6eb322e35e. Reason for revert: hitting asserts Change-Id: I542d34edc05ecf72b7646263f25736a0950c78e7 Reviewed-on: https://skia-review.googlesource.com/5707 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove antialiasing control from GrPaint.Gravatar Brian Salomon2016-12-08
| | | | | | | | | | | | | This adds an additional param (of new enum type GrAA) to draws that can antialias and a new enum GrAAType to indicate the AA technique (none, fragment shader computed coverage, msaa). Some GMs change due to this: 1) In some places we weren't disabling MSAA when the draw was supposed to be unantialiased. 2) Some bounding rect draws that use GrFragmentProcessors were unnecessarily turning on antialiasing, by disabling it a very small number of pixel LSBs change. Change-Id: I7d8d8793dda70bcd373d09055beb9949c1a8a4d0 Reviewed-on: https://skia-review.googlesource.com/5608 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Rename GrDrawBatch->GrDrawOpGravatar Brian Salomon2016-12-01
| | | | | | | Change-Id: I18f520924b8a2548566fd61dbea4e3e12bd253dd Reviewed-on: https://skia-review.googlesource.com/5411 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Add explicit UniqueID classes for GrGpuResource & GrSurfaceProxyGravatar Robert Phillips2016-11-11
| | | | | | | | | | | This sets the stage for using the Proxy's/RenderTargetContext's ID above the flush and the RenderTarget's/GrGpuResource's below the flush. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4650 Change-Id: I9f1e6b00c02a0691d90b58c49e1d8c60684884c1 Reviewed-on: https://skia-review.googlesource.com/4650 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Move GrRenderTargetPriv::maxWindowRectangles to GrRenderTargetContextPriv & ↵Gravatar Robert Phillips2016-11-09
| | | | | | | | | | | | | GrRenderTargetProxy This removes a reason to call accessRenderTarget on the GrRenderTargetContext GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4583 Change-Id: I6e8a53ffd5c1fea80f542b70e05744e2991f70f8 Reviewed-on: https://skia-review.googlesource.com/4583 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* TEMPORARY: track stencil clip state in GrRenderTargetOpListGravatar csmartdalton2016-11-01
| | | | | | | | | | | Tracks the stencil clip state in GrRenderTargetOpList instead of GrStencilAttachment. This is a temporary move to unblock MDB, after which point we will be able to overhaul clipping. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2468743002 Review-Url: https://codereview.chromium.org/2468743002
* Rename renderTargetContextPriv to priv, and some more leftover DCsGravatar Brian Osman2016-10-27
| | | | | | | | | | | | | | | | API change is for non-public API. TBR=bsalomon@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4060 Change-Id: I5011d753c3c6d1145ff242eab6baff2ae0647ba3 Reviewed-on: https://skia-review.googlesource.com/4060 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Rename GrDrawContext to GrRenderTargetContextGravatar Brian Osman2016-10-27
This is in preparation for GrTextureContext and GrSurfaceContext BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4030 Change-Id: Ie58c93052e68f3f1f5fe8d15d63760de274a6fbd Reviewed-on: https://skia-review.googlesource.com/4030 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>