aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLPath.h
Commit message (Collapse)AuthorAge
* Replace GrStrokeInfo with GrStyle.Gravatar bsalomon2016-05-10
| | | | | | | | | A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002 Committed: https://skia.googlesource.com/skia/+/33595bdf4b64a745f6340338d307e806e96c587f Review-Url: https://codereview.chromium.org/1957363002
* Revert of Replace GrStrokeInfo with GrStyle. (patchset #4 id:160001 of ↵Gravatar bsalomon2016-05-10
| | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1957363002/ ) Reason for revert: Breaking some bots Original issue's description: > Replace GrStrokeInfo with GrStyle. > > A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers. > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002 > > Committed: https://skia.googlesource.com/skia/+/33595bdf4b64a745f6340338d307e806e96c587f TBR=egdaniel@google.com,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/1967513002
* Replace GrStrokeInfo with GrStyle.Gravatar bsalomon2016-05-10
| | | | | | | A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002 Review-Url: https://codereview.chromium.org/1957363002
* Revert of Batch multiple single NVPR draw paths to instanced draws (patchset ↵Gravatar stephana2016-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #5 id:80001 of https://codereview.chromium.org/1908433002/ ) Reason for revert: This causes what looks like significantly wrong results. Here is an example: https://gold.skia.org/diff?test=stroke-fill&left=cb47dc2cabbad7d146aedaac199ebace&top=2c6e65d597c574e3bb170a19ca9634c6 Original issue's description: > Batch multiple single NVPR draw paths to instanced draws > > Batch multiple single NVPR draw paths to instanced draws. > A draw path batch can be combined to other batch if the > batches do not overlap and have same draw characteristics. > > Join the batches in linked list and flatten the list to a > path list during draw time. > > Replace GrPathRendering::drawPath with GrPathRendering::drawPaths. > > Perf changes ARM, Shield TV device, Tegra X1 GPU: > desk_chalkboard.skp_1 21.5ms -> 17.8ms 0.83x > desk_mapsvg.skp_1 7.49ms -> 6.18ms 0.82x > Others results are more volatile. > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1908433002 > > Committed: https://skia.googlesource.com/skia/+/3c33c389e9f8d14d86756ea1ddeba2097f31ad22 TBR=joshualitt@chromium.org,bsalomon@google.com,kkinnunen@nvidia.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/1919843002
* Batch multiple single NVPR draw paths to instanced drawsGravatar kkinnunen2016-04-25
| | | | | | | | | | | | | | | | | | | Batch multiple single NVPR draw paths to instanced draws. A draw path batch can be combined to other batch if the batches do not overlap and have same draw characteristics. Join the batches in linked list and flatten the list to a path list during draw time. Replace GrPathRendering::drawPath with GrPathRendering::drawPaths. Perf changes ARM, Shield TV device, Tegra X1 GPU: desk_chalkboard.skp_1 21.5ms -> 17.8ms 0.83x desk_mapsvg.skp_1 7.49ms -> 6.18ms 0.82x Others results are more volatile. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1908433002 Review URL: https://codereview.chromium.org/1908433002
* 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
* Fix stroking of zero length paths with end caps on NVPRGravatar kkinnunen2015-12-01
| | | | | | | | | | Fix stroking of zero length paths with end caps on NVPR. In case of such paths, stroke them using Skia and just fill the path with NVPR. BUG=skia:4427 Review URL: https://codereview.chromium.org/1471763002
* Move definitions of GrGL basic types (e.g. GrGLenum) to their own header.Gravatar bsalomon2015-10-19
| | | | Review URL: https://codereview.chromium.org/1410333003
* Improve caching of dashed paths in GrStencilAndCoverPathRendererGravatar kkinnunen2015-05-18
| | | | | | | | | | | | | | | | Improve caching of dashed paths in GrStencilAndCoverPathRenderer. Look up the (NVPR specific) GrGLPath based on GrStrokeInfo and the original path. Use unique keys for all GrPaths. Dash the path with Skia dash stroker and use that path geometry for NVPR path. NVPR internal dashing stroke is not used, because the dashing implementation of NVPR does not match Skia implementation. Review URL: https://codereview.chromium.org/1116123003
* C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}Gravatar mtklein2015-03-25
| | | | | | | | | NOPRESUBMIT=true BUG=skia: DOCS_PREVIEW= https://skia.org/?cl=1037793002 Review URL: https://codereview.chromium.org/1037793002
* Fix up all the easy virtual ... SK_OVERRIDE cases.Gravatar mtklein2015-01-09
| | | | | | | | | | | | This fixes every case where virtual and SK_OVERRIDE were on the same line, which should be the bulk of cases. We'll have to manually clean up the rest over time unless I level up in regexes. for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end BUG=skia: Review URL: https://codereview.chromium.org/806653007
* Rename GrGpuGL to GrGLGpu for consistencyGravatar bsalomon2014-12-16
| | | | Review URL: https://codereview.chromium.org/808593003
* Make GrResourceCache2 responsible for calling release, abandon, and ~.Gravatar bsalomon2014-11-14
| | | | | | | | | | BUG=skia:2889 TBR=robertphillips@google.com NOTRY=true Review URL: https://codereview.chromium.org/729683002
* Make GrGpuResource::gpuMemorySize non-virtual w/ onGpuMemorySize virtual implGravatar bsalomon2014-11-12
| | | | | | BUG=skia:2889 Review URL: https://codereview.chromium.org/702413003
* Wrap NV_path_rendering API with GrGLPathRenderingGravatar cdalton2014-08-11
| | | | | | | | | | | | | | Adds a GrGLPathRendering class that wraps the NV_path_rendering extension and manages its various API versions. It also provides backup implementations when certain NVpr methods from later API versions are not present on the current system. BUG=skia: R=bungeman@google.com, bsalomon@google.com, kkinnunen@nvidia.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/444223002
* Revert "Adds a GrGLPathRendering class that wraps the NV_path_rendering"Gravatar bungeman2014-08-06
| | | | | | | | | | | | | | | | | | This reverts commit 5672da0fa54f31c9727568e9dd5fe82c6e1585bc. This appears to be blocking the Skia roll by causing failures in the blink layout tests on the canvas-lost-gpu-context.html test. The bisect for this can be seen at: https://codereview.chromium.org/449473002/ Original issue's description: > Adds a GrGLPathRendering class that wraps the NV_path_rendering > extension and manages its various API versions. It also provides > backup implementations when certain NVpr methods from later API > versions are not present on the current system. > > Committed: https://skia.googlesource.com/skia/+/5672da0fa54f31c9727568e9dd5fe82c6e1585bc
* Revert "Calculate rough approximations for nvpr path sizes"Gravatar bungeman2014-08-06
| | | | | | | This reverts commit 61bff7097251755bf9fa9a4ec60cc057c766b4a4. This is built on 5672da0fa54f31c9727568e9dd5fe82c6e1585bc which is causing blink test failures on canvas-lost-gpu-context.html.
* Calculate rough approximations for nvpr path sizesGravatar cdalton2014-08-05
| | | | | | | | | | | | | Calculates a rough approximation of the actual value for gpuMemorySize in GrGLPath and GrGLPathRange, instead of assuming every path is the same fixed size. BUG=skia: R=bsalomon@google.com, markkilgard@gmail.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/442603002
* Adds a GrGLPathRendering class that wraps the NV_path_renderingGravatar cdalton2014-08-04
| | | | | | | | | | | | extension and manages its various API versions. It also provides backup implementations when certain NVpr methods from later API versions are not present on the current system. R=bsalomon@google.com, kkinnunen@nvidia.com, markkilgard@gmail.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/437473002
* Add a GrPathRange classGravatar cdalton2014-07-21
| | | | | | | | | | | | | | | Adds a GrPathRange object that represents a range of paths on the gpu. Updates GrDrawTarget::drawPaths and supporting code to use GrPathRange instead of an array of GrPath objects. Change-Id: I67845f3893cd4d955db947d699aa3733cbb081e0 BUG=skia: R=bsalomon@google.com, jvanverth@google.com, kkinnunen@nvidia.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/400713003
* Split GrResource into GrCacheable/GrGpuObjectGravatar commit-bot@chromium.org2014-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, an object needed to inherit from GrResource (and thus be a GPU object) in order to live in the GrResourceCache. That was a problem for caching items that weren't GPU objects themselves, but owned GPU objects. This change splits GrResource into two classes: 1. GrCacheable: The base class for objects that can live in the GrResourceCache. 2. GrGpuObject, which inherits from GrCacheable: The base class for objects that get tracked by GrGpu. This change is purely a refactor; there is no change in functionality. Change-Id: I3e8daeb1f123041f414aa306c1366e959ae9e39e BUG=skia: R=bsalomon@google.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/251013002 git-svn-id: http://skia.googlecode.com/svn/trunk@14553 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make GrContext cache the gpu pathsGravatar commit-bot@chromium.org2013-11-01
| | | | | | | | | | | | | | | | | | Creating paths for nv_path_rendering is costly. Try to reduce this cost by caching paths based on the SkPath "hash" (i.e. SkPathRef generation id) and stroke properties. Adds the paths to GrContext::fTextureCache instance. Later this should be renamed and the GrContext API should reflect the nature of the cache better. R=bsalomon@google.com, mtklein@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/26557003 git-svn-id: http://skia.googlecode.com/svn/trunk@12083 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement stroking a path with nv_path_renderingGravatar commit-bot@chromium.org2013-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | Initialize the path stroke properties in the GrGLPath constructor. Use StencilStrokePath and CoverStrokePath to stroke the path. The order of the GL calls is: 1. StencilFill, if needed 2. StencilStroke, if needed 2a. CoverStroke, if stroke was applied 2b. CoverFill, if stroke was not applied The reason for not pairing StencilFill + CoverFill, StencilStroke + CoverStroke is that Skia API does not allow separate fill and stroke color within one call. Covering the stroke bounding box should also cover the fill bounding box. Causes different rendering in gm/dashcubics due to different rendering algorithm. (?) (TODO: this should be resolved somehow.) R=bsalomon@google.com, markkilgard@gmail.com, cdalton@nvidia.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/23440049 git-svn-id: http://skia.googlecode.com/svn/trunk@11672 2bbb7eff-a529-9590-31e7-b0007b416f81
* Result of running tools/sanitize_source_files.py (which was added in ↵Gravatar rmistry@google.com2012-08-23
| | | | | | | | | https://codereview.appspot.com/6465078/) This CL is part II of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6474054 git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81
* Towards NV path renderingGravatar bsalomon@google.com2012-06-11
Review URL: http://codereview.appspot.com/6302049/ git-svn-id: http://skia.googlecode.com/svn/trunk@4219 2bbb7eff-a529-9590-31e7-b0007b416f81