aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawingManager.h
Commit message (Collapse)AuthorAge
* Revert "Add pre-Flush callback to GrDrawingManager"Gravatar Robert Phillips2017-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d222ec492f5d0229986f529134d083e589bcc4a9. Reason for revert: TegraX1 Vulkan bot Original change's description: > Add pre-Flush callback to GrDrawingManager > > This will allow internal systems (e.g., fonts & path renderers) to create pre-flush atlases. > > Depends on: https://skia-review.googlesource.com/c/8988/ (Allow GrSurfaceProxy-derived classes to use flags when instantiating) > > Change-Id: I307796595d651cf376838bff1f9e4385c3753547 > Reviewed-on: https://skia-review.googlesource.com/8679 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I852648adc12d2aa58cd09c57d961c340d657776c Reviewed-on: https://skia-review.googlesource.com/9735 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add pre-Flush callback to GrDrawingManagerGravatar Robert Phillips2017-03-15
| | | | | | | | | | | This will allow internal systems (e.g., fonts & path renderers) to create pre-flush atlases. Depends on: https://skia-review.googlesource.com/c/8988/ (Allow GrSurfaceProxy-derived classes to use flags when instantiating) Change-Id: I307796595d651cf376838bff1f9e4385c3753547 Reviewed-on: https://skia-review.googlesource.com/8679 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Move read/write-Pixels up to GrSurfaceContextGravatar Robert Phillips2017-01-18
| | | | | | | | | | | | | | This still needs to be propagated out in several ways: replace more instances of GrSurface::read/write-Pixels add colorSpace to more instances of the TextureContext but it establishes a beach-head and is exciting enough as is. Change-Id: If86035aa0245e70b54541e83722b3c75bc5ade13 Reviewed-on: https://skia-review.googlesource.com/7172 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Rename GrBatchFlushState to GrOpFlushStateGravatar Brian Salomon2016-12-07
| | | | | | | Change-Id: I1a8052c61d7624929caf45ba44e2a465cd0dc1c2 Reviewed-on: https://skia-review.googlesource.com/5649 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Added GrSurfaceContext and GrTextureContextGravatar Brian Osman2016-11-23
| | | | | | | | | | | | | | | | | This lets copy-to-texture to be treated like copy-to-rt. To match current behavior, though, copies to texture are still executed immediately (forcing a flush). Once MDB is enabled, copies to texture will be deferred. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5093 Change-Id: Icc0ce5435507a5f0a237c22eedef879824952367 Reviewed-on: https://skia-review.googlesource.com/5093 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Consolidate GrSurfaceProxy Make methodsGravatar Robert Phillips2016-11-09
| | | | | | | | | | | I think GrSurfaceDesc is still the most compact way to communicate the deferred GrSurface's settings to the Proxy but this CL, at least, reduces where it is used. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4559 Change-Id: Ica599c28a5aef1ed4094f47a4ac119e2d204d652 Reviewed-on: https://skia-review.googlesource.com/4559 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove SkAutoTDelete.Gravatar Ben Wagner2016-11-03
| | | | | | | | | Replace with std::unique_ptr. Change-Id: I5806cfbb30515fcb20e5e66ce13fb5f3b8728176 Reviewed-on: https://skia-review.googlesource.com/4381 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Make GrDrawContext be GrRenderTargetProxy-backedGravatar Robert Phillips2016-10-28
| | | | | | | | | | | | | This is split out of https://codereview.chromium.org/2215323003/ (Start using RenderTargetProxy (omnibus)) GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3841 CQ_INCLUDE_TRYBOTS=master.client.skia.android:Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-GN_Android-Trybot Change-Id: I1a47f19ed1ac0c249e6ccac8db74095d7f456db4 Reviewed-on: https://skia-review.googlesource.com/3841 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@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>
* Add GrOpList and rename GrDrawTarget to GrRenderTargetOpListGravatar Robert Phillips2016-10-26
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3910 Change-Id: I026aa26ecc61a0d002e98892dca728536259e8b1 Reviewed-on: https://skia-review.googlesource.com/3910 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert of Make GrResourceCache dynamically change between LRU and random ↵Gravatar robertphillips2016-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | replacement strategies. (patchset #8 id:140001 of https://codereview.chromium.org/2321563006/ ) Reason for revert: Causing problems on Mac & Windows bots. Original issue's description: > Make GrResourceCache dynamically change between LRU and random replacement strategies. > > Random performs significantly better when each frame exceeds the budget by a small margin whereas LRU has worst case behavior. > > The decision of which to use is made based on the history from a few frames of the ratio of total unique key cache misses to unique key cache misses of resources purged in the last 2 frames. > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2321563006 > > Committed: https://skia.googlesource.com/skia/+/0f147ac2ae575bbad3515a526f13700bc5c8e9d7 TBR=bsalomon@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2386993004
* Make GrResourceCache dynamically change between LRU and random replacement ↵Gravatar bsalomon2016-10-03
| | | | | | | | | | | strategies. Random performs significantly better when each frame exceeds the budget by a small margin whereas LRU has worst case behavior. The decision of which to use is made based on the history from a few frames of the ratio of total unique key cache misses to unique key cache misses of resources purged in the last 2 frames. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2321563006 Review-Url: https://codereview.chromium.org/2321563006
* Add GrContextOptions flag to disable distance field path renderer.Gravatar bsalomon2016-09-15
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339213002 Review-Url: https://codereview.chromium.org/2339213002
* Move prepareForExternalIO implementation from GrContext to GrDrawingManagerGravatar bsalomon2016-09-08
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2324473002 Review-Url: https://codereview.chromium.org/2324473002
* Restructure flushing relationship between GrContext, GrDrawingManager, and ↵Gravatar bsalomon2016-09-07
| | | | | | | | | | | | | | | | | | GrResourceCache. Consolidates all flush actions into GrDrawingManager and makes GrContext::flush a passthrough. Removes the unused and untested discard flush variation. Replaces the indirect overbudget callback mechanism of GrResourceCache with a flag set by resource cache when it wants to flush that is checked after each draw by GrDrawContext. Modifies GrResourceCache::notifyFlushOccurred() to take a param indicating whether it triggered the flush that just occurred. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2307053002 Committed: https://skia.googlesource.com/skia/+/1dbb207babecdae8f1f74ed9d9900c73064df744 Review-Url: https://codereview.chromium.org/2307053002
* Revert of Restructure flushing relationship between GrContext, ↵Gravatar bsalomon2016-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GrDrawingManager, and GrResourceCache. (patchset #4 id:60001 of https://codereview.chromium.org/2307053002/ ) Reason for revert: Causing assertions on bots Original issue's description: > Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache. > > Consolidates all flush actions into GrDrawingManager and makes GrContext::flush a passthrough. > > Removes the unused and untested discard flush variation. > > Replaces the indirect overbudget callback mechanism of GrResourceCache with a flag set by resource cache when it wants to flush that is checked after each draw by GrDrawContext. > > Modifies GrResourceCache::notifyFlushOccurred() to take a param indicating whether it triggered the > flush that just occurred. > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2307053002 > > Committed: https://skia.googlesource.com/skia/+/1dbb207babecdae8f1f74ed9d9900c73064df744 TBR=robertphillips@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2312123003
* Revert of fix uninit immediate mode member var in GrDrawingManager (patchset ↵Gravatar bsalomon2016-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | #1 id:1 of https://codereview.chromium.org/2312333002/ ) Reason for revert: Reverting in order to revert earlier CL Original issue's description: > fix uninit immediate mode member var in GrDrawingManager > > TBR=robertphillips@google.com > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2312333002 > > NOTRY=true > > Committed: https://skia.googlesource.com/skia/+/ce3b852529ad1f026aad3976f3213c8943554ba2 TBR=robertphillips@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2311243003
* fix uninit immediate mode member var in GrDrawingManagerGravatar bsalomon2016-09-06
| | | | | | | | | TBR=robertphillips@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2312333002 NOTRY=true Review-Url: https://codereview.chromium.org/2312333002
* Restructure flushing relationship between GrContext, GrDrawingManager, and ↵Gravatar bsalomon2016-09-06
| | | | | | | | | | | | | | | | | GrResourceCache. Consolidates all flush actions into GrDrawingManager and makes GrContext::flush a passthrough. Removes the unused and untested discard flush variation. Replaces the indirect overbudget callback mechanism of GrResourceCache with a flag set by resource cache when it wants to flush that is checked after each draw by GrDrawContext. Modifies GrResourceCache::notifyFlushOccurred() to take a param indicating whether it triggered the flush that just occurred. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2307053002 Review-Url: https://codereview.chromium.org/2307053002
* Don't purge resources for trivial GrContext flushesGravatar bsalomon2016-08-31
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2298003003 Review-Url: https://codereview.chromium.org/2298003003
* Move GrAtlasTextContext to GrDrawingManager, so we only have one.Gravatar brianosman2016-08-11
| | | | | | | | | | Ultimately, avoids wasteful redundant computation and storage of distance field fake-gamma tables. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2240623002 Review-Url: https://codereview.chromium.org/2240623002
* Rename GrDrawingManager::drawContext to makeDrawContextGravatar robertphillips2016-08-05
| | | | | | | | This was violating our naming convention GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2216643002 Review-Url: https://codereview.chromium.org/2216643002
* Add SkColorSpace to GrDrawContextGravatar brianosman2016-07-21
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2164363002 Review-Url: https://codereview.chromium.org/2164363002
* Rename GrDrawingMgr::abandon to wasAbandoned & add a matching entry point to ↵Gravatar robertphillips2016-05-16
| | | | | | | | | | | | GrDrawingContext Since GrDrawingContext is generally replacing GrRenderTarget, this is to provide functionality similar to GrRenderTarget::wasDestroyed. This is split out of https://codereview.chromium.org/1930013002/ ((Mostly) Retract GrRenderTarget from SkGpuDevice) GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1979913002 Review-Url: https://codereview.chromium.org/1979913002
* Bring sk_sp to GrDrawContextGravatar robertphillips2016-04-27
| | | | | | | | This is split out of: https://codereview.chromium.org/1914883002/ (Refactor drawContext/RenderTarget creation) GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1918003003 Review-Url: https://codereview.chromium.org/1918003003
* Style bikeshed - remove extraneous whitespaceGravatar halcanary2016-03-29
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002 Review URL: https://codereview.chromium.org/1842753002
* Delete GrTextContextGravatar joshualitt2016-02-16
| | | | | | | | TBR=bsalomon@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1699073004 Review URL: https://codereview.chromium.org/1699073004
* Create GrPathRenderingDrawContextGravatar joshualitt2016-02-16
| | | | | | | | TBR=bsalomon@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1701013002 Review URL: https://codereview.chromium.org/1701013002
* Move surface props off of GrTextContextGravatar joshualitt2016-02-11
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1685653004 Review URL: https://codereview.chromium.org/1685653004
* Reland of Make a single GrSingleOwner in GrContext (patchset #1 id:1 of ↵Gravatar joshualitt2016-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1565303003/ ) Reason for revert: trying again Original issue's description: > Revert of Make a single GrSingleOwner in GrContext (patchset #3 id:40001 of https://codereview.chromium.org/1563703004/ ) > > Reason for revert: > breaking asan > > Original issue's description: > > Make a single GrSingleOwner in GrContext > > > > TBR=bsalomon@google.com > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563703004 > > > > Committed: https://skia.googlesource.com/skia/+/f9bc796e0dbd31674c22b34761913ee6e8fdd66a > > TBR=robertphillips@google.com,joshualitt@chromium.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/94da292e39db0d41da08b1d6055ca5e0d6b498cc TBR=robertphillips@google.com,joshualitt@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1572653002
* Revert of Make a single GrSingleOwner in GrContext (patchset #3 id:40001 of ↵Gravatar joshualitt2016-01-07
| | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1563703004/ ) Reason for revert: breaking asan Original issue's description: > Make a single GrSingleOwner in GrContext > > TBR=bsalomon@google.com > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563703004 > > Committed: https://skia.googlesource.com/skia/+/f9bc796e0dbd31674c22b34761913ee6e8fdd66a TBR=robertphillips@google.com,joshualitt@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1565303003
* Make a single GrSingleOwner in GrContextGravatar joshualitt2016-01-07
| | | | | | | | TBR=bsalomon@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563703004 Review URL: https://codereview.chromium.org/1563703004
* Add Drawing Manager guards against re-entrant flushesGravatar joshualitt2015-12-18
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1538013002 Review URL: https://codereview.chromium.org/1538013002
* Add debug option to clip each GrBatch to its device boundsGravatar bsalomon2015-11-30
| | | | Review URL: https://codereview.chromium.org/1471083002
* Update testing frameworks/tests for MDBGravatar robertphillips2015-11-16
| | | | | | | | | | | | | | | This CL: Fixes an ordering problem w.r.t. drawTarget clean up in GrContext::abandonContext (for text test that abandons context) Fixes when the lastDrawTarget field is set on a RenderTarget (now in GrDrawTarget ctor) due to GrTestTarget use case Updates the ProgramUnitTest to use multiple drawTargets Adds renderTarget creation to GrTestTargets (in MDB drawTargets require them) BUG=skia:4094 Committed: https://skia.googlesource.com/skia/+/9c8605144a0f15e3e69a4e1dcd5d3e63f339380e Review URL: https://codereview.chromium.org/1441533003
* Revert of Update testing frameworks/tests for MDB (patchset #4 id:60001 of ↵Gravatar egdaniel2015-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1441533003/ ) Reason for revert: Speculative revert for leaks based on ASAN bot (and some local valgrind testing) Original issue's description: > Update testing frameworks/tests for MDB > > This CL: > > Fixes an ordering problem w.r.t. drawTarget clean up in GrContext::abandonContext (for text test that abandons context) > Fixes when the lastDrawTarget field is set on a RenderTarget (now in GrDrawTarget ctor) due to GrTestTarget use case > Updates the ProgramUnitTest to use multiple drawTargets > Adds renderTarget creation to GrTestTargets (in MDB drawTargets require them) > > BUG=skia:4094 > > Committed: https://skia.googlesource.com/skia/+/9c8605144a0f15e3e69a4e1dcd5d3e63f339380e TBR=joshualitt@chromium.org,joshualitt@google.com,robertphillips@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4094 Review URL: https://codereview.chromium.org/1450513002
* Update testing frameworks/tests for MDBGravatar robertphillips2015-11-13
| | | | | | | | | | | | | This CL: Fixes an ordering problem w.r.t. drawTarget clean up in GrContext::abandonContext (for text test that abandons context) Fixes when the lastDrawTarget field is set on a RenderTarget (now in GrDrawTarget ctor) due to GrTestTarget use case Updates the ProgramUnitTest to use multiple drawTargets Adds renderTarget creation to GrTestTargets (in MDB drawTargets require them) BUG=skia:4094 Review URL: https://codereview.chromium.org/1441533003
* Move GrBatchFlushState from GrDrawTarget to GrDrawingManagerGravatar robertphillips2015-11-11
| | | | | | | | | | | | This CL: moves the flushState disables immediate mode (it was proving difficult to implement) also moves the program unit test to the drawing manager BUG=skia:4094 TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/1437843002
* Remove GrPipelineBuilder from getPathRenderer callGravatar robertphillips2015-10-29
| | | | | | | | | | | | | Logically this CL: Moves the PathRendererChain from GrContext to GrDrawManager - this was needed to untangled the Path-Chain/Renderer header mess - this entailed adding getDrawingMgr so the CMM could access the PathRenderingChain - this also entailed re-adding freeGpuResources to the GrDrawingMgr Moves the CanDrawArgs struct up stack Removes the GrPipelineBuilder from the CanDrawArgs struct Review URL: https://codereview.chromium.org/1407883004
* Add immediate mode option for gpu configs in dmGravatar bsalomon2015-10-23
| | | | Review URL: https://codereview.chromium.org/1421853002
* Remove DrawingMgr shims from GrContextGravatar robertphillips2015-10-17
BUG=skia:4094 Review URL: https://codereview.chromium.org/1413673002