aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text
Commit message (Collapse)AuthorAge
* Replace log2 with SkNextLog2Gravatar Brian Osman2017-08-11
| | | | | | | | | | | log2 didn't exist on Android until API 18, and it's doing double precision math. I think this integer version is what we want? Bug: skia: Change-Id: I4909153c56a266688355349cda5d553b69f5c942 Reviewed-on: https://skia-review.googlesource.com/33680 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Don't draw text with zero glyph counts as pathsGravatar Jim Van Verth2017-07-31
| | | | | | | | Bug: chromium:750420 Change-Id: Ie1a62356a3263c440a94ba1fd637c12884465515 Reviewed-on: https://skia-review.googlesource.com/28862 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Don't create GrAtlasTextBlobs for zero glyph count text draws.Gravatar Brian Salomon2017-07-31
| | | | | | | | | Bug: chromium:749472 Change-Id: I709889dd6bb06032e30cbf820ca67e7534cfac58 Reviewed-on: https://skia-review.googlesource.com/28540 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Salomon <bsalomon@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>
* Revert "Revert "Make GrAtlasTextOp a non-legacy GrMeshDrawOp""Gravatar Brian Salomon2017-07-19
| | | | | | | | | | | | | This reverts commit e3e9628ecf863f433f26bf6107d6a39ced57fe30. Adds blendmode_mask_* benchs to blacklist for Chromecast. Otherwise a clean revert of the revert. Bug: skia: Change-Id: I9f64ae55804fa4aad97c1785834281039570c56c Reviewed-on: https://skia-review.googlesource.com/24409 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Make GrAtlasTextOp a non-legacy GrMeshDrawOp"Gravatar Brian Salomon2017-07-17
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 434a58ab5fefcc1b86588c7fce898b1e5bd248ba. Reason for revert: <INSERT REASONING HERE> Original change's description: > Make GrAtlasTextOp a non-legacy GrMeshDrawOp > > Change-Id: Ib9eaf149100b0ccecf1c18a755263f2579b8e6f6 > Reviewed-on: https://skia-review.googlesource.com/23482 > Reviewed-by: Jim Van Verth <jvanverth@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=jvanverth@google.com,bsalomon@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I7fd8503b4e0c297b2cfaf979545354aa58d1f989 Reviewed-on: https://skia-review.googlesource.com/23760 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make GrAtlasTextOp a non-legacy GrMeshDrawOpGravatar Brian Salomon2017-07-14
| | | | | | | Change-Id: Ib9eaf149100b0ccecf1c18a755263f2579b8e6f6 Reviewed-on: https://skia-review.googlesource.com/23482 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Don't pre-allocate GrTextBlobCache spaceGravatar Florin Malita2017-07-11
| | | | | | | | | | Let the pool handle the initial allocation on first use. Change-Id: I77e0a84f19ccefa0c3bf298483929345787c0d7e Reviewed-on: https://skia-review.googlesource.com/22078 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Eric Karl <ericrk@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Add proper aliased support for SDF textGravatar Jim Van Verth2017-07-06
| | | | | | | | | | | | | Previously, when asked to render aliased text with distance fields, we would get the aliased glyph from the cache and then try to anti-alias the edge. This change instead grabs the anti-aliased glyph, then deliberately aliases the edge. Bug: chromium:707979 Change-Id: I05766af17d7ae58bca27aaffd9e08e5c586e789c Reviewed-on: https://skia-review.googlesource.com/21728 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Enable SDF text when using a perspective matrix.Gravatar Jim Van Verth2017-06-27
| | | | | | | | | Also fixes some state issues in SampleApp. Change-Id: I854754e8b547f7e62aa90914520aaaa20095f965 Reviewed-on: https://skia-review.googlesource.com/20975 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Clean up GrResourceProvider usageGravatar Robert Phillips2017-06-15
| | | | | | | | | | | | | The only substantive changes are the removal of GrProxy instantiation in: SkGpuBlurUtils::GaussianBlur GrSimpleTextureEffect::Make* Change-Id: I10970609693bd6ff5b3a3c21b41d82642bb277bc Reviewed-on: https://skia-review.googlesource.com/19965 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Force AAType to MSAA if the render target has MSAA and the API doesn't ↵Gravatar Brian Salomon2017-06-14
| | | | | | | | | support disabling it. Change-Id: I88c29b8117fa82c6f41166b9333537a06bb841cc Reviewed-on: https://skia-review.googlesource.com/19818 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Fix LCD distance field text color filteringGravatar Jim Van Verth2017-06-08
| | | | | | | | | | | Distance field text was applying the color filter to determine any gamma adjustments, but not any effects of the shader as well. Bug: skia:6669 Change-Id: I73384f68141fb523ea2058e00d0a9fbb2fbc622b Reviewed-on: https://skia-review.googlesource.com/19049 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* sk_sp-ify GrResourceProvider some moreGravatar Robert Phillips2017-06-05
| | | | | | | | | | I believe this addresses the concerns of this particular bug (although more remains to be done) Bug: skia:5327 Change-Id: Ie82f08f87b3cf3d7986fe4eeb16a5d2553173913 Reviewed-on: https://skia-review.googlesource.com/18599 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Include non-legacy GrMeshDrawOps in GLPrograms test.Gravatar Brian Salomon2017-05-12
| | | | | | | | Bug: skia: Change-Id: Ifa0c3ffb5643c84ccdcb339fae75ea5d03a8451c Reviewed-on: https://skia-review.googlesource.com/16580 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@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>
* Fix GPU text colors when color spaces are involvedGravatar Brian Osman2017-05-11
| | | | | | | | | | | | | 1) Only store GrColors in GrTextUtils::Paint. We still store premul and unpremul versions, but this is slightly clearer. 2) GrTextUtils::Paint also needs info from the render target context to linearize and transform the color to dst space. Bug: skia:6605 Change-Id: I6e12c55eafaecd2a090c82b4f56827401305bf3a Reviewed-on: https://skia-review.googlesource.com/16486 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Allow custom GrAtlasGlyphCache texture sizesGravatar Eric Karl2017-05-05
| | | | | | | | | | | | A single glyph cache size doesn't make sense across the hardware Skia runs on. This change allows a custom size to be specified (via a byte limit), allowing cache size to be customized at context creation time. Bug: 717178 Change-Id: I4f7baddd1897b2eac4f6d6e4fff1f805e1cdd250 Reviewed-on: https://skia-review.googlesource.com/15135 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Rm makeRenderTargetContext in favor of deferred version (take 3)Gravatar Robert Phillips2017-04-25
| | | | | | | | | | | This is a reland of: https://skia-review.googlesource.com/c/13001/ (Rm makeRenderTargetContext in favor of deferred version) TBR=bsalomon@google.com Change-Id: If81f4d9fb889c091cd37ffde133d906fb3e37773 Reviewed-on: https://skia-review.googlesource.com/14027 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Rm makeRenderTargetContext in favor of deferred version (take 2)"Gravatar Robert Phillips2017-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 02242e82e4bf94a8f6862dadb5bf347ea5e31eb5. Reason for revert: Maybe breaking Chrome DEPS roll Original change's description: > Rm makeRenderTargetContext in favor of deferred version (take 2) > > This is a reland of: https://skia-review.googlesource.com/c/13001/ (Rm makeRenderTargetContext in favor of deferred version) > > Change-Id: Ife77b012d09c46895884a168fc5045bd92a4b919 > Reviewed-on: https://skia-review.googlesource.com/13196 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I2607116ed743f5d313da4a7b7f056776ed907702 Reviewed-on: https://skia-review.googlesource.com/14024 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Rm makeRenderTargetContext in favor of deferred version (take 2)Gravatar Robert Phillips2017-04-21
| | | | | | | | | This is a reland of: https://skia-review.googlesource.com/c/13001/ (Rm makeRenderTargetContext in favor of deferred version) Change-Id: Ife77b012d09c46895884a168fc5045bd92a4b919 Reviewed-on: https://skia-review.googlesource.com/13196 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Move GrAtlasGlyphCache over to SkArenaAlloc from SkVarAlloc.Gravatar Herb Derby2017-04-13
| | | | | | | Change-Id: Ibeee7235d30c68be9fd4f68ecf30a65c7ecb78f5 Reviewed-on: https://skia-review.googlesource.com/13020 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Revert "Rm makeRenderTargetContext in favor of deferred version"Gravatar Robert Phillips2017-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d83ec0441279b79551b4ecb4598696249ea55145. Reason for revert: various bot failures Original change's description: > Rm makeRenderTargetContext in favor of deferred version > > Change-Id: Ifdf67453607256ba7cdb0837263377bd83907212 > Reviewed-on: https://skia-review.googlesource.com/13001 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I4e67a20cbe658b24725dcf386ac8bfdd127647ea Reviewed-on: https://skia-review.googlesource.com/13131 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Rm makeRenderTargetContext in favor of deferred versionGravatar Robert Phillips2017-04-11
| | | | | | | Change-Id: Ifdf67453607256ba7cdb0837263377bd83907212 Reviewed-on: https://skia-review.googlesource.com/13001 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Revert "Create GrXferProcessor while doing GrProcessorSet analysis.""Gravatar Brian Salomon2017-04-08
| | | | | | | | | | This reverts commit 5dac9b3b5bf7e9c06c207cb92e257535c7d9ec95. Bug: skia: Change-Id: I3db2ec6776eb10c1f863b3992a2c8048c54b130f Reviewed-on: https://skia-review.googlesource.com/12620 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Create GrXferProcessor while doing GrProcessorSet analysis."Gravatar Brian Salomon2017-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0ae0e23696f2ef08503040f8c02765eb58b26ddf. Reason for revert: static assert failure on ios build Original change's description: > Create GrXferProcessor while doing GrProcessorSet analysis. > > > Bug: skia: > Change-Id: I62a628f9c0536ffb05c8f9d0c9ded5657f93b48e > Reviewed-on: https://skia-review.googlesource.com/11482 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ifd57367b0326dd2b53c622705a868e246645d589 Reviewed-on: https://skia-review.googlesource.com/12104 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Create GrXferProcessor while doing GrProcessorSet analysis.Gravatar Brian Salomon2017-04-08
| | | | | | | | Bug: skia: Change-Id: I62a628f9c0536ffb05c8f9d0c9ded5657f93b48e Reviewed-on: https://skia-review.googlesource.com/11482 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Move GrPipelineBuilder into GrRenderTargetContext::addLegacyDrawOpGravatar Brian Salomon2017-04-04
| | | | | | | | | This makes the legacy code use GrProcessorSet::Analysis in the same manner as the non-GrLegacyMeshDrawOps which enables changes to how analysis works. Change-Id: I8171e285ac8930beb3ac33cd3c4ee88f217b9e40 Reviewed-on: https://skia-review.googlesource.com/11205 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@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>
* Revert "Revert "Remove GrPipeline from GrDrawOp.""Gravatar Brian Salomon2017-03-21
| | | | | | | | | This reverts commit c48af934608bbb65650641f66adb51f2102d4274. Change-Id: I4ba78fd7e5a7d406b88223ca6f7245c029b60f76 Reviewed-on: https://skia-review.googlesource.com/9981 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Remove GrPipeline from GrDrawOp."Gravatar Brian Salomon2017-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2bf4b3a97b770811d9e0558dbbfbdb57cfafbdb7. Reason for revert: nanobench assertion Original change's description: > Remove GrPipeline from GrDrawOp. > > GrDrawOp subclasses are now free to construct their pipelines at flush time and now in theory could use multiple GrPipelines for multipass rendering. > > GrProcessorSet may be used to retain the processors from a GrPaint with "pending execution" style refs. > > NVPR and Instanced rendering are updated to create their pipelines at flush time without a GrPipelineBuilder. > > The monolithic pipeline creation/management that was on GrDrawOp is moved to GrMeshDrawOp. However, this is temporary and will be removed in coming changes. > > Change-Id: I124282e3cea5d070970b5460c8a679fcaf7a8eff > Reviewed-on: https://skia-review.googlesource.com/7279 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1bc64f6cbbd5f482417637a034342c2b5371dc5c Reviewed-on: https://skia-review.googlesource.com/9817 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove GrPipeline from GrDrawOp.Gravatar Brian Salomon2017-03-16
| | | | | | | | | | | | | | | GrDrawOp subclasses are now free to construct their pipelines at flush time and now in theory could use multiple GrPipelines for multipass rendering. GrProcessorSet may be used to retain the processors from a GrPaint with "pending execution" style refs. NVPR and Instanced rendering are updated to create their pipelines at flush time without a GrPipelineBuilder. The monolithic pipeline creation/management that was on GrDrawOp is moved to GrMeshDrawOp. However, this is temporary and will be removed in coming changes. Change-Id: I124282e3cea5d070970b5460c8a679fcaf7a8eff Reviewed-on: https://skia-review.googlesource.com/7279 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add GrRenderTargetContext::resourceProvider & GrResourceProvider::capsGravatar Robert Phillips2017-03-14
| | | | | | | | | and retract GrSurfaceContextPriv a bit Change-Id: Id47af1052f9bda4fe7c85b3ce46b3ebe37797524 Reviewed-on: https://skia-review.googlesource.com/9647 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Use SkTArray for mailbox pollingGravatar Florin Malita2017-03-14
| | | | | | | | | | The mailbox uses SkTArray internally, so swapping is optimal when dest has no preallocated storage. Change-Id: Ic295f3707d07c97b1881e775cac3a23a6b2fef71 Reviewed-on: https://skia-review.googlesource.com/9641 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Purge GrTextBlobCache entries on SkTextBlob deletionGravatar Florin Malita2017-03-14
| | | | | | | | | Similar to the SkImage purge mechanism. Change-Id: I0b7fb1bad507a3c7f30a4f7514bedd894d1748ac Reviewed-on: https://skia-review.googlesource.com/9631 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "Revert "Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead ↵Gravatar Florin Malita2017-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of raw ptrs"" This reverts commit 3304c447b953dad79fe7f355184ac13ed7e302e0. Reason for revert: Fix for SkTHashMap issue landed Original change's description: > Revert "Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs" > > This reverts commit db3ceb86421fb9da86bb920e3a1f0957beec08d9. > > Reason for revert: observing some strange budget behavior w/ instrumented Chromium builds; need to investigate. > > Original change's description: > > Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs > > > > Refactor to store sk_sps, and minimize explicit ref manipulation. > > > > Change-Id: Ie3d18e5fe1cefbbc5c2f3c4941287a24038522a6 > > Reviewed-on: https://skia-review.googlesource.com/9490 > > Commit-Queue: Florin Malita <fmalita@chromium.org> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > > TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reviews@skia.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I8ca9862ad1519a9ec69ad1ce8e4d129b0dae7b0a > Reviewed-on: https://skia-review.googlesource.com/9524 > Reviewed-by: Florin Malita <fmalita@google.com> > Commit-Queue: Florin Malita <fmalita@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org,fmalita@chromium.org,fmalita@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1ba50e3b574381717fbbf46b829d72aceff8f7fe Reviewed-on: https://skia-review.googlesource.com/9535 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs"Gravatar Florin Malita2017-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit db3ceb86421fb9da86bb920e3a1f0957beec08d9. Reason for revert: observing some strange budget behavior w/ instrumented Chromium builds; need to investigate. Original change's description: > Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs > > Refactor to store sk_sps, and minimize explicit ref manipulation. > > Change-Id: Ie3d18e5fe1cefbbc5c2f3c4941287a24038522a6 > Reviewed-on: https://skia-review.googlesource.com/9490 > Commit-Queue: Florin Malita <fmalita@chromium.org> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I8ca9862ad1519a9ec69ad1ce8e4d129b0dae7b0a Reviewed-on: https://skia-review.googlesource.com/9524 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Florin Malita <fmalita@google.com>
* Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrsGravatar Florin Malita2017-03-09
| | | | | | | | | Refactor to store sk_sps, and minimize explicit ref manipulation. Change-Id: Ie3d18e5fe1cefbbc5c2f3c4941287a24038522a6 Reviewed-on: https://skia-review.googlesource.com/9490 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@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>
* Make SkGr.h private and remove unused functionsGravatar Brian Osman2017-03-08
| | | | | | | | | BUG=skia: Change-Id: I6699d00c5412ed9d9bf14b032a08b06b1c766bce Reviewed-on: https://skia-review.googlesource.com/9398 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Refactor GrTextBlobCacheGravatar Florin Malita2017-03-08
| | | | | | | | | | | Instead of a single-level cache with blob-id-derived key, refactor GrTextBlobCache as a two-level cache with a direct blob-id key (to support efficient lookup by id in future CLs). Change-Id: Idf29c05224faeb04919610a3935572773d5aba03 Reviewed-on: https://skia-review.googlesource.com/9400 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* 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>
* Clean up/remove unused GrFragmentProcessor-derived ctorsGravatar Robert Phillips2017-02-28
| | | | | | | | | This is the simple (i.e., non-TextureAdjuster) portion of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors) Change-Id: I8f673ebe922e03c69473c18c166bcf818507c662 Reviewed-on: https://skia-review.googlesource.com/8997 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* SkScalarMul is deprecatedGravatar Mike Reed2017-02-14
| | | | | | | | | BUG=skia: Change-Id: I88ecfe9d4c72506f6b1a0e0dfadd2a5c171a6cb6 Reviewed-on: https://skia-review.googlesource.com/8353 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* make GR_TEST_UTILS=0 workGravatar Hal Canary2017-02-02
| | | | | | | Change-Id: Icce35140ca08b65217b32e6b1ffc6ad2f38ab37f Reviewed-on: https://skia-review.googlesource.com/7840 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Broaden checking of GrSurfaceProxy::MakeDeferred's return valueGravatar Robert Phillips2017-02-01
| | | | | | | | | | | | | We now expect MakeDeferred to baulk if the ultimate texture/rendertarget will not be instantiable. Added checks for MakeWrapped too since, technically, it too can baulk. BUG=676753 Change-Id: I3e052ebf98303fc46124272082c10f303d89da27 Reviewed-on: https://skia-review.googlesource.com/7830 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Rationalize GrContext's Gr*Proxy getter namingGravatar Robert Phillips2017-01-30
| | | | | | | | | | | | | | | | | | | | | | | | This CL replaces the entry points: asDeferredSurface asDeferredTexture asDeferredRenderTarget with: GrSurfaceProxy* asSurfaceProxy sk_sp<GrSurfaceProxy> asSurfaceProxyRef GrTextureProxy* asTextureProxy sk_sp<GrTextureProxy> asTextureProxyRef GrRenderTargetProxy* asRenderTargetProxy sk_sp<GrRenderTargetProxy> asRenderTargetProxyRef Change-Id: I7c2b1ea3d702023ff23019815ca13c9ff6f3b32d Reviewed-on: https://skia-review.googlesource.com/7741 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* verify that glyph position rect is non-empty in GrAtlasTextBlob::appendGlyphGravatar Lee Salzman2017-01-27
| | | | | | | | | BUG=skia: Change-Id: I35d170480cb3320a9d116e34aaf740aa201a294f Reviewed-on: https://skia-review.googlesource.com/7700 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Replace some GrSurface:read/writePixels with the GrSurfaceContext equivalentGravatar Robert Phillips2017-01-20
| | | | | | | Change-Id: I7b11a323b0c74ee70f52b1bd8be376fb7188cb19 Reviewed-on: https://skia-review.googlesource.com/7204 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Osman <brianosman@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>