aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private
Commit message (Collapse)AuthorAge
...
* remove unused stat tracking from SkArenaAllocGravatar Mike Klein2018-06-07
| | | | | | | | | | | | I'm really only trying to remove the dependency on SkDebugf(). If we want to keep this, I could switch it to take an optional stats callback called in the destructor? Change-Id: I5aa2a58ccc7c8e17e61f29b482b2851be056fa07 Reviewed-on: https://skia-review.googlesource.com/132922 Auto-Submit: Mike Klein <mtklein@chromium.org> Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Herb Derby <herb@google.com>
* Revert "Require mips to be allocated at texture creation time and disable ↵Gravatar Greg Daniel2018-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | late allocations." This reverts commit cd2c3f9055452d413d6be7ea6dc63fd1922fe994. Reason for revert: Looks to be causing angle failures on initial clear test Original change's description: > Require mips to be allocated at texture creation time and disable late allocations. > > If we get a non-mipped texture for a draw that wants to be use mip map filter, we > will copy the texture into a new mipped texture. > > Clean up of unused code in the GPU backends for reallocating for mips will be done > in a follow up CL. > > Bug: skia: > Change-Id: Idab588c1abf4bbbf7eeceb3727d500e5df274188 > Reviewed-on: https://skia-review.googlesource.com/132830 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I49f0ace52f2586d61b451630b2e6aae84b420b81 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/133041 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Require mips to be allocated at texture creation time and disable late ↵Gravatar Greg Daniel2018-06-07
| | | | | | | | | | | | | | | | allocations. If we get a non-mipped texture for a draw that wants to be use mip map filter, we will copy the texture into a new mipped texture. Clean up of unused code in the GPU backends for reallocating for mips will be done in a follow up CL. Bug: skia: Change-Id: Idab588c1abf4bbbf7eeceb3727d500e5df274188 Reviewed-on: https://skia-review.googlesource.com/132830 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* require std::is_trivially_destructibleGravatar Mike Klein2018-06-07
| | | | | | | | Change-Id: I78cbaf420ad1e16f07eacb8b4c6c825fe849b08a Reviewed-on: https://skia-review.googlesource.com/132825 Auto-Submit: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* clean up some unused parts of SkArenaAllocGravatar Mike Klein2018-06-07
| | | | | | | | | | | | | | I'm looking at making SkArenaAlloc independent of Skia. Here's a bit of low-hanging fruit. Nothing is using makeSkSp(). Good... it seems real dangerous. Change-Id: Ib7154e7948a3c6d828376ef37935636b3b4695ff Reviewed-on: https://skia-review.googlesource.com/132824 Commit-Queue: Mike Klein <mtklein@chromium.org> Commit-Queue: Herb Derby <herb@google.com> Auto-Submit: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* simplify SK_FloatNaNGravatar Mike Klein2018-06-05
| | | | | | | | | | | math.h contains NAN, an expression that evaluates to a quiet float NaN While here, INFINITY is also a float, so the casts aren't needed. Change-Id: Ibdd8f5a2767651cd4382d700e9125b832473a304 Reviewed-on: https://skia-review.googlesource.com/132087 Auto-Submit: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Remove color space restrictions from image infosGravatar Brian Osman2018-06-04
| | | | | | | | | | | What makes an info valid (or invalid)? Nothing to do with color space. Bug: skia: Change-Id: I6795efa9aa74ab0d65935c5ddccc1058f8e0b112 Reviewed-on: https://skia-review.googlesource.com/131780 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Dest color space no longer impacts mipmaps or texture samplingGravatar Brian Osman2018-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PS5: Removes SkDestinationSurfaceColorMode, tracking of mipmap mode on GrTexture, sRGB decode state per-texture. Because we were often choosing sRGB configs for RGB color types, legacy rendering would then be incorrect (too dark). So... PS7: Stops ever using sRGB pixel configs when translating image info or color type. Also removes a bunch of GrCaps bits and a GrContextOption that are no longer relevant. PS9: Adjusts surface creation unit test expectations, and changes the raster rules accordingly. At this point, sRGB configs are (obviously) going to be broken. Locally, I ran 8888, gl, and the gbr- versions of both. Across all GMs x configs, there are 13 diffs. 12 are GMs that create surfaces with a color-space attached (and thus, the offscreen is no longer getting sRGB pixel config). The only remainder constructs an SkPictureImageGenerator, (with an attached color space) and renders it to the gbr-gl canvas, which triggers a a tagged surface inside the generator. Bug: skia: Change-Id: Ie5edfa157dd799f3121e8173fc4f97f6c8ed6789 Reviewed-on: https://skia-review.googlesource.com/131282 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Allow CCPR in DDL mode (take 2)Gravatar Robert Phillips2018-05-31
| | | | | | | | | | | | A lot of the changes to get this compiling on the win_chromium_compile_dbg_ng bot (i.e., moving a lot of header files to private) should be undone if that bot is ever "fixed". Bug: skia:7988 Change-Id: I704ff793d80b18e7312048538874498824803580 Reviewed-on: https://skia-review.googlesource.com/130920 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Allow CCPR in DDL mode"Gravatar Robert Phillips2018-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 93540dd15715057e00b4f136977f441720317b60. Reason for revert: Chrome! > Allow CCPR in DDL mode > > Bug: skia:7988 > Change-Id: If757f29e0156c0ef7045b437b04e17aebe4de851 > Reviewed-on: https://skia-review.googlesource.com/130509 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Chris Dalton <csmartdalton@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,robertphillips@google.com,csmartdalton@google.com Change-Id: Ibb5017d1bf307545969069b94987e0a51a22e333 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7988 Reviewed-on: https://skia-review.googlesource.com/130880 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Allow CCPR in DDL modeGravatar Robert Phillips2018-05-30
| | | | | | | | | Bug: skia:7988 Change-Id: If757f29e0156c0ef7045b437b04e17aebe4de851 Reviewed-on: https://skia-review.googlesource.com/130509 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Reland "Turn off domain in GrTextureOp when src rect contains entire proxy"Gravatar Brian Salomon2018-05-26
| | | | | | | | | | | | | | | | | | This is a reland of 869433fa113d1573d5d91fcafdca413b247ce1b0 Original change's description: > Turn off domain in GrTextureOp when src rect contains entire proxy > > Move check for turning off domain when nearest/no-aa to GrRenderTargetContext. > > Change-Id: I3c071b5f73fb3134218453204f30c3020c9dad9a > Reviewed-on: https://skia-review.googlesource.com/130143 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> Change-Id: I29a21e26de8a246a74bd40fd0cda044f8f18327e Reviewed-on: https://skia-review.googlesource.com/130307 Reviewed-by: Stephen White <senorblanco@chromium.org>
* Revert "Turn off domain in GrTextureOp when src rect contains entire proxy"Gravatar Stephen White2018-05-26
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 869433fa113d1573d5d91fcafdca413b247ce1b0. Reason for revert: possibly preventing Chromium roll (layout tests) Original change's description: > Turn off domain in GrTextureOp when src rect contains entire proxy > > Move check for turning off domain when nearest/no-aa to GrRenderTargetContext. > > Change-Id: I3c071b5f73fb3134218453204f30c3020c9dad9a > Reviewed-on: https://skia-review.googlesource.com/130143 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I8afc3c05b504ccde7d44e973d707f4cba1dc51b1 Reviewed-on: https://skia-review.googlesource.com/130302 Reviewed-by: Stephen White <senorblanco@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
* Turn off domain in GrTextureOp when src rect contains entire proxyGravatar Brian Salomon2018-05-25
| | | | | | | | | Move check for turning off domain when nearest/no-aa to GrRenderTargetContext. Change-Id: I3c071b5f73fb3134218453204f30c3020c9dad9a Reviewed-on: https://skia-review.googlesource.com/130143 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* fix 0.499999f rounding case for trianglesGravatar Mike Reed2018-05-23
| | | | | | | | Bug: skia:7994 Change-Id: I83bb309a2c8fb0bddaf78ba32c0a07537e483900 Reviewed-on: https://skia-review.googlesource.com/129648 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Remove include/gpu/vk from include paths.Gravatar Ben Wagner2018-05-22
| | | | | | | | | | | The public.bzl doesn't yet support vulkan, Chromium adds this include path but appears to do so for the one header fixed in this CL, and Android seems to be fine with this change. Change-Id: I3869776a7653c420b584129936c302b8c8e9e8fa Reviewed-on: https://skia-review.googlesource.com/129640 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Revert "Revert "implement SkScalar versions in terms of float versions""Gravatar Mike Reed2018-05-14
| | | | | | | | | | This reverts commit 0e6db75eebab430e7f6665c8cfa1e7dcd2fef123. Bug: skia: Change-Id: I015d01efc58dfe03dae6bcc57c4b1102276e7566 Reviewed-on: https://skia-review.googlesource.com/127967 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "implement SkScalar versions in terms of float versions"Gravatar Mike Reed2018-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4c3cb3767f5af3860998b932702dc18619ab3e1e. Reason for revert: investigate asan failures Original change's description: > implement SkScalar versions in terms of float versions > > Bug: skia: > Change-Id: I44ce228290f7fda5b7e3553c8543dcf581b1ca3b > Reviewed-on: https://skia-review.googlesource.com/127128 > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Mike Reed <reed@google.com> TBR=caryclark@google.com,reed@google.com Change-Id: Ic790b15130a67f46a0a99fdf991c5c08d682be5e No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/128060 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* implement SkScalar versions in terms of float versionsGravatar Mike Reed2018-05-14
| | | | | | | | Bug: skia: Change-Id: I44ce228290f7fda5b7e3553c8543dcf581b1ca3b Reviewed-on: https://skia-review.googlesource.com/127128 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
* non-linear blending first stepsGravatar Mike Klein2018-05-10
| | | | | | | | | | | | | | | | | | | | | | | Code: - Add a non-linear blending bit and makeNonlinearBlending() to SkColorSpace - remove enough F16=linear checks to make it possible to create surfaces and encode pngs with nonlinear F16 Testing: - add "esrgb" software config to DM, run it - add "srgbnl" software config, run it - deemphasize importance of "srgb" config on bots - update unit tests to reflect relaxed F16 constraints - add a new unit test file with _really_ basic tests, and a new unit test that's not working yet Bug: skia:7942 Change-Id: I8ac042bdf9f3d791765393b68fd9256375184d83 Reviewed-on: https://skia-review.googlesource.com/127325 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* use 64bit math in TArray reallocGravatar Mike Reed2018-05-10
| | | | | | | | Bug: oss-fuzz:8217 Change-Id: Idecd1867e7047744477c7dfbb6c9bc5654a36ade Reviewed-on: https://skia-review.googlesource.com/127324 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Add internal grsurface flag to track if using gl rectangle or external texture.Gravatar Greg Daniel2018-05-02
| | | | | | | | Bug: skia: Change-Id: I84963833bbc3ae957c919a19f6e78fce2c9de7ef Reviewed-on: https://skia-review.googlesource.com/125294 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Remove GrPrimitiveType::kTriangleFanGravatar Brian Salomon2018-04-30
| | | | | | | Change-Id: Ia121198ebcdc34e32a3ff99b0821047256df282d Reviewed-on: https://skia-review.googlesource.com/124503 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add InternalSurfaceFlag so we know if RenderTargetProxys and RenderTargets ↵Gravatar Greg Daniel2018-04-26
| | | | | | | | | | use GL FBO 0. Bug: skia:7748 Change-Id: I2fda3cde12ccdef19fe06ff287a8024b58d28ef0 Reviewed-on: https://skia-review.googlesource.com/124048 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove the MSAA path rendererGravatar Chris Dalton2018-04-25
| | | | | | | | Bug: skia: Change-Id: Ib18bede613c8d27fd6326f655dc2d638e35870ff Reviewed-on: https://skia-review.googlesource.com/123726 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* include/private/SkTemplates: SkInPlaceNewCheck uses ...Gravatar Hal Canary2018-04-24
| | | | | | | Change-Id: Ia9af6daec20bdd4bfa7f34c8bff7b400f5775dd9 Reviewed-on: https://skia-review.googlesource.com/123503 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* include/private/SkTemplates: Cleanup bare pointers.Gravatar Hal Canary2018-04-24
| | | | | | | | | | | | | | | | | include/private: - SkAutoTArray, SkAutoTMalloc no longer use bare pointers to owned memory, - SkTHash and SkAutoTArray are now std::move()able. - SkAutoTArray::swap no longer neccesary. - SkAutoTMalloc::operator=() defined. src/pdf: - SkPDFCanon and SkPDFObjectSerializer are now std::move()able. - `template <class T> static void renew(T* t) { t->~T(); new (t) T; }` is gone. Change-Id: I2f36a0780c47d1427a85da240121c898387fb4cf Reviewed-on: https://skia-review.googlesource.com/123401 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Update flag checks when validating surface being assigned to proxy.Gravatar Greg Daniel2018-04-24
| | | | | | | | Bug: skia:7748 Change-Id: Id87c0b1be2efbdefd96740e9591fd102e09b4d95 Reviewed-on: https://skia-review.googlesource.com/123423 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add ability to dump opList info at flush-timeGravatar Robert Phillips2018-04-20
| | | | | | | | | When debugging DDL it is useful to just see which ops are being drawn instead of the entire reordering history. Change-Id: I89708fecbd53c097b00e65b0da426bfb8046b0ee Reviewed-on: https://skia-review.googlesource.com/122780 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* crash rather than overflow in SkTDArrayGravatar Mike Klein2018-04-19
| | | | | | | | | | | | | | | This adds explicit overflow checks to the two likeliest places where non-buggy code could overflow SkTDArray. We have an #ifdef'd out PathMeasure_explosion GM that overflows before this CL and aborts with it. Bug: skia:7674 Change-Id: Ia0c430f4a8bb9bad687d13c875f604fd7da45aab Reviewed-on: https://skia-review.googlesource.com/122342 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* disallow negative setReserve() callsGravatar Mike Klein2018-04-19
| | | | | | | | | | | | | | | | We already assert that setCount()'s argument is non-negative. This does the same for setReserve(). There was one call site I could find that was actually sometimes passing negative values to setReserve(), guarded here. Already reviewed: https://skia-review.googlesource.com/c/skia/+/115982 Change-Id: Ia52a286732bf4056e9baf09555d27bab9abf2554 Reviewed-on: https://skia-review.googlesource.com/122305 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* rm SkTDArray::select()Gravatar Mike Klein2018-04-19
| | | | | | | | | | | | It's only used in one call site, which is clearer without it. Already reviewed: https://skia-review.googlesource.com/c/skia/+/115982 Change-Id: I3d0f8c1f0756e01e29cdb9f9328b0f557d3650d3 Reviewed-on: https://skia-review.googlesource.com/122302 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add paint flags to viewer GUI.Gravatar Ben Wagner2018-04-17
| | | | | | | | | | Overriding bits of the paint was added with keyboard bindings but without being reflected in the GUI. This adds these flags to the GUI. Change-Id: I633801fb776248952afe7cbe8857676ef8b57135 Reviewed-on: https://skia-review.googlesource.com/121796 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Don't allow ganesh to allocate mip maps for wrapped textures.Gravatar Greg Daniel2018-04-16
| | | | | | | | | | | | | | We will not allocate new mips on a wrapped texture but we will use mips if the wrapped texture already has one. If we need mips for a draw this will trigger a copy to occur. Also some cleanup up of our InternalSurfaceFlags in general. Bug: skia:7806 Change-Id: I7aa666478cc91bba6e0644b323825fcc9b49793a Reviewed-on: https://skia-review.googlesource.com/121348 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Update getBackendInfo calls on GrBackendTexture to support VkImageLayout better.Gravatar Greg Daniel2018-04-10
| | | | | | | | | | | | | | | The big api level change here is that the getBackendInfo calls now return by value instead of a pointer. These changes are being made in support of Vulkan so that the client can update the VkImageLayout on the GrBackendTexture and have that update get reflected in our internal tracking of the image. This is done by storing a ref counted GrVkImageLayout object on the GrBackendTexture and the GrVkImage. Bug: skia: Change-Id: I8c6158fd3a66eb61fef97ebf09ea5364bca3f1ae Reviewed-on: https://skia-review.googlesource.com/119101 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "implement SkTDArray with std::vector"Gravatar Mike Klein2018-04-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 80e1d56e198c5fd9fe6db0c945bd558053a8dc6a. Reason for revert: SkRTree.cpp:57 asserting, probably this? Original change's description: > implement SkTDArray with std::vector > > It's always worth seeing if we can get away with replacing custom data > structures with ones from the standard library. Our array-like types > are all good candidates to replace with std::vector, and it's especially > easy to start with SkTDArray. Unlike the others, it has no preallocated > S-variant, which is tricky to make work with std::vector. > > SkTDArray also has known integer overflow bugs, leading to out of range > writes. It'd be _very_ nice to ditch it for a better standard vector. > > I removed a bunch of unused or little-used methods, and updated a couple > call sites that used methods in unusual or dangerous ways. > > I've had to tweak GrAAConvexTessellator and SkBaseShadowTessellator just > a touch to work within the constraints of an std::vector impl. It's not > intended to be legal to write to the reserved-but-not-counted elements > of an SkTDArray, but you can get away with it in our old implementation. > This version now uses setCount() to actually reserve and count them, and > should have the same performance and use the same amount of memory. > > The PathMeasure_explosion GM I added recently to reproduce this bug now > draws without triggering undefined behavior or ASAN errors, provided you > have ~40GB of RAM. > > Bug: skia:7674 > > Change-Id: I4eacae18a976cd4a6d218102f8ca5d973d4d7d0e > Reviewed-on: https://skia-review.googlesource.com/115982 > Reviewed-by: Brian Osman <brianosman@google.com> > Commit-Queue: Mike Klein <mtklein@chromium.org> TBR=mtklein@chromium.org,bungeman@google.com,brianosman@google.com Change-Id: Icffd9f22fe89746a970ff598e1a05c774960bc0e No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7674 Reviewed-on: https://skia-review.googlesource.com/117901 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "In older STLs, std::vector::insert() returns void."Gravatar Mike Klein2018-04-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7dd8ee9c6091fe51c9d337c06d6243731a0aafb3. Reason for revert: going to revert primary CL Original change's description: > In older STLs, std::vector::insert() returns void. > > CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-arm-Debug-Chromebook_GLES > > Change-Id: I7bd15ecc7122965db16fbb51e51ee166b05dce2f > Reviewed-on: https://skia-review.googlesource.com/117722 > Reviewed-by: Brian Osman <brianosman@google.com> > Commit-Queue: Mike Klein <mtklein@chromium.org> TBR=mtklein@chromium.org,brianosman@google.com Change-Id: I9c126edbef74293d8e7a2b7e2365e464ba367ae5 No-Presubmit: true No-Tree-Checks: true No-Try: true Cq-Include-Trybots: skia.primary:Build-Debian9-Clang-arm-Debug-Chromebook_GLES Reviewed-on: https://skia-review.googlesource.com/117900 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* In older STLs, std::vector::insert() returns void.Gravatar Mike Klein2018-04-02
| | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-arm-Debug-Chromebook_GLES Change-Id: I7bd15ecc7122965db16fbb51e51ee166b05dce2f Reviewed-on: https://skia-review.googlesource.com/117722 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* implement SkTDArray with std::vectorGravatar Mike Klein2018-04-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's always worth seeing if we can get away with replacing custom data structures with ones from the standard library. Our array-like types are all good candidates to replace with std::vector, and it's especially easy to start with SkTDArray. Unlike the others, it has no preallocated S-variant, which is tricky to make work with std::vector. SkTDArray also has known integer overflow bugs, leading to out of range writes. It'd be _very_ nice to ditch it for a better standard vector. I removed a bunch of unused or little-used methods, and updated a couple call sites that used methods in unusual or dangerous ways. I've had to tweak GrAAConvexTessellator and SkBaseShadowTessellator just a touch to work within the constraints of an std::vector impl. It's not intended to be legal to write to the reserved-but-not-counted elements of an SkTDArray, but you can get away with it in our old implementation. This version now uses setCount() to actually reserve and count them, and should have the same performance and use the same amount of memory. The PathMeasure_explosion GM I added recently to reproduce this bug now draws without triggering undefined behavior or ASAN errors, provided you have ~40GB of RAM. Bug: skia:7674 Change-Id: I4eacae18a976cd4a6d218102f8ca5d973d4d7d0e Reviewed-on: https://skia-review.googlesource.com/115982 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Fixed warnings for casting large type to smaller one.Gravatar Kaloyan Donev2018-03-27
| | | | | | | Change-Id: Ib3e2661d0383bf154bc9178dac070dfd910a393c Reviewed-on: https://skia-review.googlesource.com/115200 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Move GrPixelConfig to GrTypesPrivGravatar Brian Salomon2018-03-23
| | | | | | | | | BUG= skia:6718 Change-Id: I254a5d289c1216e580b8f7fe613236c090d0e901 Reviewed-on: https://skia-review.googlesource.com/116196 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Move a bunch of internal types from GrTypes to GrTypesPrivGravatar Brian Salomon2018-03-23
| | | | | | | Change-Id: I9fe1297ae7d185957c76681305bcf22cc972e53b Reviewed-on: https://skia-review.googlesource.com/116189 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* rm SkTDArray::{Deleter,release()}Gravatar Mike Klein2018-03-22
| | | | | | | | | | These are unused, and would make it conceptually tricky to replace with something like std::vector that does not have a .release() method. Change-Id: Iaee913d6a513d078989166c6e97097eeec0100ba Reviewed-on: https://skia-review.googlesource.com/115921 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Support GL_RGB textures and render targets.Gravatar Brian Salomon2018-03-22
| | | | | | | | | Bug= skia:7533 Change-Id: Iba30e90dbf2574368b773bb5cf2ebd5219559717 Reviewed-on: https://skia-review.googlesource.com/108188 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add texture-specific flags for External & Rectangle texturesGravatar Robert Phillips2018-03-21
| | | | | | | | | | | | | | | | For DDLs, Ganesh needs to know about External & Rectangle textures prior to instantiation (or PromiseImage fulfillment). These new flags allow the client to provide this information when the lazyProxy is created. The new texture flags work analogously to the render target flags: GrSurface and GrSurfaceProxy get a new set of accessors for the new flags The new flags are set appropriately on a GrGLTexture when it is created For wrapped texture proxies the flags are just copied off of the GrSurface For lazy-proxies/promise-images the flags are computed up front and passed to the proxy The GrSurfaceProxy/GrSurface flags equivalence is verified in GrSurfaceProxy::assign Change-Id: Ia8e1998aa0a36ce4481bfd9e56be21f990e83148 Reviewed-on: https://skia-review.googlesource.com/114985 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Alter GrSurface/GrSurfaceProxy flags to prepare for GrTexture/GrTextureProxy ↵Gravatar Robert Phillips2018-03-19
| | | | | | | | | | | | | | | | -specific flags This CL: moves GrRenderTarget::fFlags to GrSurface::fSurfaceFlags adds a GrInternalSurfaceFlags type and uses it for GrSurfaceProxy::fSurfaceFlags The goal of this is to provide a location where GrTexture/GrTextureProxy-specific flags (i.e., isExternal & isRectangle) can be stored. Change-Id: I8df7b79036a6853dd378ff6cf10d4b37c60dd511 Reviewed-on: https://skia-review.googlesource.com/114796 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove SK_RASTER_RECORDER_IMPLEMENTATIONGravatar Robert Phillips2018-03-15
| | | | | | | | | TBR=bsalomon@google.com Change-Id: I9608ce5ce2b9d38c5e356d8428a8ff05df6ccda7 Reviewed-on: https://skia-review.googlesource.com/114490 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Provide promise images when rendering SKPs w/ DDLGravatar Robert Phillips2018-03-14
| | | | | | | Change-Id: I8014693eefb3c7811a1fc0354ee8441c90c97328 Reviewed-on: https://skia-review.googlesource.com/113213 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Add ability to uninstantiate lazy proxies after every flush.Gravatar Greg Daniel2018-03-08
| | | | | | | | | Bug: skia: Change-Id: Id32540cda54a9c5e3e6cb721776699be3cc8ac1a Reviewed-on: https://skia-review.googlesource.com/113263 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Initial texture data is never flipped when uploaded.Gravatar Brian Salomon2018-03-07
| | | | | | | | | The first bytes of the data always refer to the pixel accessed by texture coord (0, 0). Change-Id: I708702d90f35b3bc896a48c3c3fd6a0be73f505a Reviewed-on: https://skia-review.googlesource.com/112261 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>