aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrBuffer.cpp
Commit message (Collapse)AuthorAge
* begin cleanup of malloc porting layerGravatar Mike Reed2018-01-05
| | | | | | | | | | | | | | 1. Merge some of the allocators into sk_malloc_flags by redefining a flag to mean zero-init 2. Add more private helpers to simplify our call-sites (and handle some overflow mul checks) 3. The 2-param helpers rely on the saturating SkSafeMath::Mul to pass max_size_t as the request, which should always fail. Bug:508641 Change-Id: I322f1e6ed91113467e0fdb12c91c3dad33d890c8 Reviewed-on: https://skia-review.googlesource.com/90940 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Stephan Altmueller <stephana@google.com>
* Don't reuse failed buffers as scratchGravatar Robert Phillips2017-06-08
| | | | | | | | | This is/was occurring for ANGLE D3D configs Change-Id: I45d4c40143ce4ac4989612c7bfe7aefd178842da Reviewed-on: https://skia-review.googlesource.com/19076 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add resource provider flag to avoid client-side buffersGravatar csmartdalton2016-07-13
On some platforms, a newly-created buffer was liable to be CPU backed. This would break code that expected a VBO (aka instanced rendering). This change adds an optional flag to GrResourceProvider that requires a buffer to be created in GPU memory. It also moves the CPU backing logic into Gr land in order to properly cache real VBOs on platforms that prefer client-side buffers. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2143333002 Review-Url: https://codereview.chromium.org/2143333002