aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrMesh.h
Commit message (Collapse)AuthorAge
* Remove unused GrGpuResourceRef and GrTGpuResourceRefGravatar Brian Salomon2018-07-31
| | | | | | | | Change-Id: I8b4b323549f51e4601ccb6612f65d354e163e93c Reviewed-on: https://skia-review.googlesource.com/144504 Auto-Submit: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Stop passing GrPrimitiveProcessor to GrMesh::sendToGpu.Gravatar Brian Salomon2018-06-08
| | | | | | | | | | | | | It is currently used in GrGLGpu::setupGeometry. Instead: 1) Make GrMesh track whether primitive restart should be enabled. 2) Make GrGLProgram track program attributes. Change-Id: Ice411a495961fcbc3cedc81e8ae0583537f42153 Reviewed-on: https://skia-review.googlesource.com/132267 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* header cleanupGravatar Hal Canary2017-07-05
| | | | | | | Change-Id: I3f7667a1357194ae2bdd341ad9d46eb93920f404 Reviewed-on: https://skia-review.googlesource.com/21374 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Hide GrGpuResourceRef from prying eyesGravatar Robert Phillips2017-06-16
| | | | | | | Change-Id: I5535b8cc8e82ed4b6fe847b96b417531b4bae348 Reviewed-on: https://skia-review.googlesource.com/19967 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fix invalid assert in GrMesh::setIndexedGravatar Chris Dalton2017-06-06
| | | | | | | | | | | When drawing a single point it's valid for the first and last indices to be equal. Bug: skia:6728 Change-Id: Ice8cd89b306ed9564cdd9a77c557628662e18abb Reviewed-on: https://skia-review.googlesource.com/18904 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Add support for instanced drawsGravatar Chris Dalton2017-05-31
| | | | | | | | | | | | Adds an instance buffer to GrMesh and instance attribs to GrPrimitiveProcessor. Implements support in GL and Vulkan. Adds unit tests for instanced rendering with GrMesh. Bug: skia: Change-Id: If1a9920feb9366f346b8c37cf914713c49129b3a Reviewed-on: https://skia-review.googlesource.com/16200 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Fix glDrawRangeElementsGravatar Chris Dalton2017-05-30
| | | | | | | | | | | | | | | | | | Adds explicit min/max index value fields to GrMesh. This eliminates the previous assumption that the index values were within the range [0..vertexCount-1]. In the pattern case we still maintain this assumption. Updates GrMesh to hide its fields and handle its new complexity using a "helper" interface instead. Adds a unit test for GrMesh. Bug: skia: Change-Id: Ia23de72d510f8827cee56072b727fb70a6e46b8d Reviewed-on: https://skia-review.googlesource.com/17964 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Convert GrMesh back to a classGravatar Chris Dalton2017-05-15
| | | | | | | | | | | Specific methods that limit the data to valid configurations are better than a runtime mega-assert. Bug: skia: Change-Id: Ie15f2dc79659e44cfaddd16eb474795b110fda73 Reviewed-on: https://skia-review.googlesource.com/16577 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Convert GrMesh to a structGravatar Chris Dalton2017-05-03
| | | | | | | | | | | | | Converts GrMesh to a struct and changes the names/semantics of its fields to be more inline with their GL counterparts. Also renames the "instancing" feature to "pattern", to avoid ambiguity with hardware instancing. Bug: skia: Change-Id: Ia0999d4f9c83b5dd31f81b9bf4f36ed9abd26286 Reviewed-on: https://skia-review.googlesource.com/15157 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Rename GrBatch to GrOpGravatar Brian Salomon2016-12-01
| | | | | | | Change-Id: I27b6324f8040899fafeda23ca524bc54a4dbf090 Reviewed-on: https://skia-review.googlesource.com/5392 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Consolidate GPU buffer implementationsGravatar cdalton2016-03-25
| | | | | | | | | | | | | | | | Consolidates all the different buffer implementations into a single GrBuffer class. This will allow us to add new buffer types, use DSA in OpenGL, track buffer bindings by unique ID, cache buffers without respect to the type of data they have been used for previously, etc. This change is strictly a refactor; it introduces no change in functionality. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825393002 Committed: https://skia.googlesource.com/skia/+/8b1bff29675afd25843439eade634a57f68fe16f Review URL: https://codereview.chromium.org/1825393002
* Revert of Consolidate GPU buffer implementations (patchset #10 id:180001 of ↵Gravatar robertphillips2016-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1825393002/ ) Reason for revert: Lots of Android redness Original issue's description: > Consolidate GPU buffer implementations > > Consolidates all the different buffer implementations into a single > GrBuffer class. This will allow us to add new buffer types, use DSA in > OpenGL, track buffer bindings by unique ID, cache buffers without > respect to the type of data they have been used for previously, etc. > This change is strictly a refactor; it introduces no change in > functionality. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825393002 > > Committed: https://skia.googlesource.com/skia/+/8b1bff29675afd25843439eade634a57f68fe16f TBR=bsalomon@google.com,egdaniel@google.com,jvanverth@google.com,cdalton@nvidia.com # 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/1831133004
* Consolidate GPU buffer implementationsGravatar cdalton2016-03-25
| | | | | | | | | | | | | | Consolidates all the different buffer implementations into a single GrBuffer class. This will allow us to add new buffer types, use DSA in OpenGL, track buffer bindings by unique ID, cache buffers without respect to the type of data they have been used for previously, etc. This change is strictly a refactor; it introduces no change in functionality. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825393002 Review URL: https://codereview.chromium.org/1825393002
* Update how we send draws to gpu backend to reduce state setting.Gravatar egdaniel2016-03-17
The main change here is that we pull primitive type off of the vertices, we set the gpu state on gpu once per pipeline/prim proc draw batch, and we create the ProgramDescriptor only for the Cache/ProgramBuilder. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1806983002 Review URL: https://codereview.chromium.org/1806983002