aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrResourceProvider.cpp
Commit message (Collapse)AuthorAge
* Remove most of the remaining conflation of colorSpace and sRGB in GaneshGravatar Brian Osman2018-06-01
| | | | | | | Change-Id: I22cd838f15c548b459da925cd7e7d228f95fb2e2 Reviewed-on: https://skia-review.googlesource.com/131583 Reviewed-by: Mike Klein <mtklein@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>
* Fix extra texture creation in GrResourceProvider::createTexture() with SRGB ↵Gravatar Brian Salomon2018-05-09
| | | | | | | | | | | | | | | | | | | | data. We would make a temporary surface context around a scratch texture with a SRGB color space and then attempt writePixels with a src SkImageInfo with no color space. Then we'd fall back to creating a texture with initial data. Now we will make the src SkImageInfo have a SRGB color space and then assume success. Bug: b/78866720 Change-Id: I541a3b73c72f610533cfbc6892b2782c90e5121d Reviewed-on: https://skia-review.googlesource.com/127130 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Use a cached index buffer for triangle fans in GrDefaultPathRenderer."Gravatar Brian Salomon2018-05-01
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ddff425b0a9cd4b178c74d7feee2c5c22e37c8d1. Reason for revert: bad gms Original change's description: > Use a cached index buffer for triangle fans in GrDefaultPathRenderer. > > Change-Id: I3c3c8db6506c71e4b273c8bc7adcc68d3d768626 > Reviewed-on: https://skia-review.googlesource.com/124841 > Reviewed-by: Brian Osman <brianosman@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,brianosman@google.com Change-Id: I701b55f188c949c2ee39b39f9bbf5b233f80f174 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/125040 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Use a cached index buffer for triangle fans in GrDefaultPathRenderer.Gravatar Brian Salomon2018-05-01
| | | | | | | Change-Id: I3c3c8db6506c71e4b273c8bc7adcc68d3d768626 Reviewed-on: https://skia-review.googlesource.com/124841 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Fix many return-std-move-in-c++11 warningsGravatar Kevin Lubick2018-04-16
| | | | | | | | | Change-Id: Ib0042cf412fe3c5fa600b7ae644d16740457535e Reviewed-on: https://skia-review.googlesource.com/121354 Commit-Queue: Kevin Lubick <kjlubick@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Auto-Submit: Kevin Lubick <kjlubick@google.com> Reviewed-by: Mike Klein <mtklein@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>
* Remove routines no longer needed since stripping NVPRGravatar Herb Derby2018-03-05
| | | | | | | | Change-Id: Ia1a545cc5c52d9af654f980083803ece39a92614 Reviewed-on: https://skia-review.googlesource.com/112260 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Remove GrSurfaceOrigin from GrSurfaceDesc.Gravatar Brian Salomon2018-03-05
| | | | | | | | | | | | This field has no interpretation at the GrTexture/GrGpu as the orientation is handled at the GrSurfaceProxy level. This change requires GrGpu to accept a GrSurfaceOrigin when creating a texture with initial data. The origin refers to the texel data to be uploaded. Longer term the plan is to remove this and require the data to be kTopLeft. Additionally, kBottomLeft will only be allowed for wrapped texture/RTs as this evolves. Change-Id: I7d25b0199aafd9bf3b74c39b2cae451acadcd772 Reviewed-on: https://skia-review.googlesource.com/111806 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make it so that GrSurfaceContext with a sRGB GrPixelConfig must have aGravatar Brian Salomon2018-02-13
| | | | | | | | | color space with a sRGB-like gamma. Change-Id: I99b80a9846caacd6848b0f9f55ed0f7f23e69b90 Reviewed-on: https://skia-review.googlesource.com/106640 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Re-enable explicit GPU resource allocationGravatar Robert Phillips2018-02-09
| | | | | | | | | This relies on https://skia-review.googlesource.com/c/skia/+/106000 (Make atlases instantiate themselves at flush time) landing first Change-Id: I28be311c80e112d038594cb4fa9679ea7f9fea9a Reviewed-on: https://skia-review.googlesource.com/106060 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Switch MDB GrContextOptions over to Enable styleGravatar Robert Phillips2018-02-08
| | | | | | | Change-Id: Id6541c346a13649c89ca3b9ccb13972976f9b973 Reviewed-on: https://skia-review.googlesource.com/105603 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Move control of explicit GPU resource allocation to GrContextOptionsGravatar Robert Phillips2018-02-08
| | | | | | | | Change-Id: Ic284acc79bab5936f0007d5ae5fb1e7a9929e2af Reviewed-on: https://skia-review.googlesource.com/104880 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Revert "Revert "Revert "Revert "Revert "Redefine the meaning of ↵Gravatar Brian Salomon2018-02-03
| | | | | | | | | | | | | sample counts in GPU backend."""""" This reverts commit 3a2cc2c2ec124de36d2544b2a523ef1dd317ca32. Fix code with samplecnt=0 that slipped in between trybots/CQ and landing of previous version Change-Id: Iab19f2e8d1e9901601c8c76244d7a88c5d707fab Reviewed-on: https://skia-review.googlesource.com/103181 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Revert "Revert "Revert "Redefine the meaning of sample ↵Gravatar Brian Salomon2018-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | counts in GPU backend.""""" This reverts commit 5bb82cbecd740d21b92e8d2944280ab6eb6af7a6. Reason for revert: <INSERT REASONING HERE> Original change's description: > Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""" > > This reverts commit 18c52a7b52211de5d0dcd86dc048adef758c6c75. > > Also relands "More sample count cleanup:" and "Add new GrContext queries for imagability, surfacability, and max sample count of color types" > > > Bug: skia: > Change-Id: I4028105a3a1f16ce3944e134619eb6245af6b947 > Reviewed-on: https://skia-review.googlesource.com/102940 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=egdaniel@google.com,bsalomon@google.com Change-Id: Idee23be2f1719f0bdc9305043e95a2d589bee8d1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/103220 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU ↵Gravatar Brian Salomon2018-02-02
| | | | | | | | | | | | | | | backend."""" This reverts commit 18c52a7b52211de5d0dcd86dc048adef758c6c75. Also relands "More sample count cleanup:" and "Add new GrContext queries for imagability, surfacability, and max sample count of color types" Bug: skia: Change-Id: I4028105a3a1f16ce3944e134619eb6245af6b947 Reviewed-on: https://skia-review.googlesource.com/102940 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Update GrYUVGenerator to upload to texture vs use writePixelsGravatar Greg Daniel2018-02-02
| | | | | | | | Bug: skia: Change-Id: I891ba25d2018008a32ef01608da9209cf2642b2e Reviewed-on: https://skia-review.googlesource.com/102902 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""Gravatar Brian Salomon2018-02-02
| | | | | | | | | | | | | | | | | | | | This reverts commit d0d7270fcc32546005b8e847df516cb11592cd30. Revert "More sample count cleanup:" This reverts commit d653cac70ed17983125ceed053138c09f1401846. Revert "Add new GrContext queries for imagability, surfacability, and max sample count of color types" This reverts commit 85ae7159c9c8a9186a4c7e74304eabb35bca9a79. Need to understand NVPR perf changes before relanding Change-Id: I0db075fb42438ef2a1f9885df184dce52892ac4b Reviewed-on: https://skia-review.googlesource.com/102780 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* More sample count cleanup:Gravatar Brian Salomon2018-02-01
| | | | | | | | | | | | | | | | | | | rename getSampleCount -> getRenderTargetSampleCount because it will return 0 when a config is not renderable but *is* supported as a texture format. (Old name kept around until Chrome stops calling it) Add virtual GrCaps::maxRenderTargetSampleCount(GrPixelConfig). Devirtualize isConfigRenderable() and implement as maxRTSC != 0. Separate implementation for version with bool withMSAA param to be removed after Flutter is updated to no longer call. Consolidate various file static GrSurfaceDesc validators fns into GrCaps::validateSurfaceDesc(). Bug: skia: Change-Id: Ie30a291aa027e910df3bd90fac8518ccdb39e53f Reviewed-on: https://skia-review.googlesource.com/102141 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Revert "Redefine the meaning of sample counts in GPU backend.""Gravatar Brian Salomon2018-02-01
| | | | | | | | | | | | Fixes gpu config default samples to be 1 and updates config parsing test accordingly. This reverts commit c1ce2f7966babaae0deb150f93f1227ee5af9285. Bug: skia: Change-Id: I456973b1f52ced85a2011ea10fc49449bfc5846f Reviewed-on: https://skia-review.googlesource.com/102147 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Redefine the meaning of sample counts in GPU backend."Gravatar Brian Salomon2018-02-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 48825b11ad25c98b9a4884d5cc0edd4e290c4409. Reason for revert: nanobench Original change's description: > Redefine the meaning of sample counts in GPU backend. > > Old: 0 -> nonMSAA > 1+ -> MSAA > > New: > 0 -> error/unsupported > 1 -> nonMSAA > 2+ -> MSAA > > We still allow 0 to mean nonMSAA in three sets of public APIs for backwards compatibility: > > 1) SkSurface factories > 2) GrBackendRenderTarget constructors > 3) GrCaps::getSampleCnt()'s requestedCount parameter > > However, we immediately clamp to 1 and treat 0 as invalid/non-renderable internally. > > This also changes the behavior when using a large sample count. We now fail in that case rather than using the largest sample available sample count. GrCaps::getSampleCount() will return 0 in this case. > > > Bug: skia: > Change-Id: Ida22c6b22c1365e563c9046b611e88bf5eb3ff33 > Reviewed-on: https://skia-review.googlesource.com/101560 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=egdaniel@google.com,bsalomon@google.com Change-Id: Ic257619a8a5ee9ac15419ecf10259e42daed7f82 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/102662 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Redefine the meaning of sample counts in GPU backend.Gravatar Brian Salomon2018-02-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | Old: 0 -> nonMSAA 1+ -> MSAA New: 0 -> error/unsupported 1 -> nonMSAA 2+ -> MSAA We still allow 0 to mean nonMSAA in three sets of public APIs for backwards compatibility: 1) SkSurface factories 2) GrBackendRenderTarget constructors 3) GrCaps::getSampleCnt()'s requestedCount parameter However, we immediately clamp to 1 and treat 0 as invalid/non-renderable internally. This also changes the behavior when using a large sample count. We now fail in that case rather than using the largest sample available sample count. GrCaps::getSampleCount() will return 0 in this case. Bug: skia: Change-Id: Ida22c6b22c1365e563c9046b611e88bf5eb3ff33 Reviewed-on: https://skia-review.googlesource.com/101560 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add SkSurface_Gpu::MakeWrappedRenderTarget methodGravatar Robert Phillips2018-01-31
| | | | | | | | | This is pulled out of https://skia-review.googlesource.com/c/skia/+/101480 (Implement GPU/OpList DDLs) Change-Id: I12b1ac346c7c1fa10f2120bc92bee63c93fc2249 Reviewed-on: https://skia-review.googlesource.com/102101 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Funnel most proxy creation through GrProxyProviderGravatar Robert Phillips2018-01-16
| | | | | | | | | This is to provide a choke point for DDL to create Lazy Proxies. Change-Id: If178da13bc6447b31b7601810236d34502d9efbd Reviewed-on: https://skia-review.googlesource.com/93303 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Update GrSemaphore to allow it to only be used once for signaling and once ↵Gravatar Greg Daniel2018-01-09
| | | | | | | | | | | | | for waiting. This is required for Vulkan which doesn't allow a semaphore to be waited on by multiple things at once or signaled from multiple places. Bug: skia: Change-Id: Iac0cb782a6662167c2cab1fd6a2c80378834a480 Reviewed-on: https://skia-review.googlesource.com/92601 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Add GrProxyProviderGravatar Robert Phillips2018-01-08
| | | | | | | | | This pulls all the proxy tracking & creation functionality out of the GrResourceCache and GrResourceProvider and consolidates it in the GrProxyProvider. Change-Id: I7256f7c544319a70c1bd93dd5a9ccbe5fa0a544f Reviewed-on: https://skia-review.googlesource.com/91501 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Add findOrMakeStaticBuffer method to GrResourceProviderGravatar Chris Dalton2017-12-19
| | | | | | | | | Bug: skia: Change-Id: Ie47f00bf8542462d719df0d08972794861ec4a2b Reviewed-on: https://skia-review.googlesource.com/86283 Reviewed-by: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Fix issues related to backend texture/rendertarget creationGravatar Robert Phillips2017-11-28
| | | | | | | Change-Id: I640ea5f316e9e4aba778f450655e74636199e0b1 Reviewed-on: https://skia-review.googlesource.com/76440 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Revert "Make GPU backend triangulate rects such that they are ↵Gravatar Brian Salomon2017-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rendered as tri strips rather than tri fans."" This reverts commit 62563deb6b4dbb0b1db7f29f35e07dcef043af31. Reason for revert: change that affected similar set of GMs reverted, relanding now that this is more easily triagable. Original change's description: > Revert "Make GPU backend triangulate rects such that they are rendered as tri strips rather than tri fans." > > This reverts commit fa2d604a7ded95a3ace905519b476129cd0fffcb. > > Reason for revert: <INSERT REASONING HERE> > > Original change's description: > > Make GPU backend triangulate rects such that they are rendered as tri strips rather than tri fans. > > > > Right now when we turn rects into quads we use a vertex order compatible with a tri fan rather than a tri strip. > > > > I wanted it to be the case that the same code could be used to generate a non-indexed mesh for a single rect or indexed using the quad index buffer when batching. Triangle fanning is not available in all APIS (e.g. is emulated in ANGLE and not supported in Metal) so it seems better to use a triangle strip over a fan in the single rect case. > > > > > > Change-Id: I31eebd794e7328f4b39e3ec3377bf2ec556360ca > > Reviewed-on: https://skia-review.googlesource.com/60081 > > Commit-Queue: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > TBR=bsalomon@google.com,robertphillips@google.com > > Change-Id: I7c4c23aa418da09c9708b28cce64ab58e282dd3a > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/60683 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: Iefcd16676a7617d32e89fc84206cd4e88e9a06e1 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/61160 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Make GPU backend triangulate rects such that they are rendered as ↵Gravatar Brian Salomon2017-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tri strips rather than tri fans." This reverts commit fa2d604a7ded95a3ace905519b476129cd0fffcb. Reason for revert: <INSERT REASONING HERE> Original change's description: > Make GPU backend triangulate rects such that they are rendered as tri strips rather than tri fans. > > Right now when we turn rects into quads we use a vertex order compatible with a tri fan rather than a tri strip. > > I wanted it to be the case that the same code could be used to generate a non-indexed mesh for a single rect or indexed using the quad index buffer when batching. Triangle fanning is not available in all APIS (e.g. is emulated in ANGLE and not supported in Metal) so it seems better to use a triangle strip over a fan in the single rect case. > > > Change-Id: I31eebd794e7328f4b39e3ec3377bf2ec556360ca > Reviewed-on: https://skia-review.googlesource.com/60081 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: I7c4c23aa418da09c9708b28cce64ab58e282dd3a No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/60683 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make GPU backend triangulate rects such that they are rendered as tri strips ↵Gravatar Brian Salomon2017-10-17
| | | | | | | | | | | | | | rather than tri fans. Right now when we turn rects into quads we use a vertex order compatible with a tri fan rather than a tri strip. I wanted it to be the case that the same code could be used to generate a non-indexed mesh for a single rect or indexed using the quad index buffer when batching. Triangle fanning is not available in all APIS (e.g. is emulated in ANGLE and not supported in Metal) so it seems better to use a triangle strip over a fan in the single rect case. Change-Id: I31eebd794e7328f4b39e3ec3377bf2ec556360ca Reviewed-on: https://skia-review.googlesource.com/60081 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Make GrResourceProvider more sk_spifiedGravatar Brian Salomon2017-10-16
| | | | | | | Change-Id: If191553093031705756358f4551a5b1e96439742 Reviewed-on: https://skia-review.googlesource.com/60000 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Revert "Disable GL buffer mapping on TSAN/Mac.""Gravatar Brian Salomon2017-10-09
| | | | | | | | | | This reverts commit 4e7cdd5a0052aa76bed6f80ec325be19e09e6ab1. Bug: skia:7058 Change-Id: I3b92c35835cf7a8c04e9218194bf293b790413e0 Reviewed-on: https://skia-review.googlesource.com/57222 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Disable GL buffer mapping on TSAN/Mac."Gravatar Brian Salomon2017-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c203e65265ccf0dcf426eafa4fae97b2b99cba7d. Reason for revert: <INSERT REASONING HERE> Original change's description: > Disable GL buffer mapping on TSAN/Mac. > > Also reverts 65e706379657d64371012c2e95ccf1354d741145 which disabled buffer mapping in GrResourceProvider::createPatternedIndexBuffer. > > Bug: skia:7058 > Change-Id: I6816abe53251e1cd8e92eae41b8cdbe45218a341 > Reviewed-on: https://skia-review.googlesource.com/50100 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=mtklein@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: Icf0cf40ba4d6e7081971eee2eea0a41033790df7 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7058 Reviewed-on: https://skia-review.googlesource.com/57220 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Disable GL buffer mapping on TSAN/Mac.Gravatar Brian Salomon2017-10-09
| | | | | | | | | | Also reverts 65e706379657d64371012c2e95ccf1354d741145 which disabled buffer mapping in GrResourceProvider::createPatternedIndexBuffer. Bug: skia:7058 Change-Id: I6816abe53251e1cd8e92eae41b8cdbe45218a341 Reviewed-on: https://skia-review.googlesource.com/50100 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Try finding exact scratch texture in cache before approx, take 2Gravatar Greg Daniel2017-09-27
| | | | | | | | | | | | This is a reland of https://skia-review.googlesource.com/c/skia/+/42940 which was reverted since its parent CL had to be reverted. The parent has since relanded. Bug: skia: Change-Id: Ibf4bf7ce0332e4faea9a6e95a40d1c1f07fb0e75 Reviewed-on: https://skia-review.googlesource.com/51244 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Remove old, unused codeGravatar Brian Osman2017-09-26
| | | | | | | | Bug: skia: Change-Id: I815464931bf2c156a7d974d6c2e2c85e46409ec6 Reviewed-on: https://skia-review.googlesource.com/51241 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove fIsMipMapped from GrSurfaceDescGravatar Greg Daniel2017-09-26
| | | | | | | | | | | Part 3 of 3 for relanding of https://skia-review.googlesource.com/c/skia/+/42083 Bug: skia: Change-Id: I98c5406015213df5d11a0101df8722da6845157e Reviewed-on: https://skia-review.googlesource.com/44464 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add ability to remove unique key from proxy and underlying surface.Gravatar Greg Daniel2017-09-26
| | | | | | | | Bug: skia: Change-Id: I66b891ce9ca35906fdbddb36f565b35b25825112 Reviewed-on: https://skia-review.googlesource.com/51240 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add some asserts and explict setting of fIsMipMappedGravatar Greg Daniel2017-09-26
| | | | | | | | | | Part 2 of 3 for relanding of https://skia-review.googlesource.com/c/skia/+/42083 Bug: skia: Change-Id: Iddc2571d88486531c76ab47432c2a51f2ac79043 Reviewed-on: https://skia-review.googlesource.com/44463 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove unneeded kExact and kNoCreate Flags from GrResouceProviderGravatar Greg Daniel2017-09-25
| | | | | | | | | | This is change 1 of 3 to reland, https://skia-review.googlesource.com/c/skia/+/42083 Bug: skia: Change-Id: Ia0369fc67807e369c2e90220f5824da7164a230a Reviewed-on: https://skia-review.googlesource.com/44461 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Guard resource provider path creation methods against abandoned contextGravatar Robert Phillips2017-09-21
| | | | | | | Change-Id: Idb447352d1c39b14137e8bb5af4f3c8fd7378750 Reviewed-on: https://skia-review.googlesource.com/49767 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Don't call GrBuffer::map() in createPatternedIndexBuffer.Gravatar Mike Klein2017-09-21
| | | | | | | | | | | | | | | TSAN doesn't seem to be understanding that the memory coming back from GrBuffer::map() is a new allocation. Using AnnotateNewMemory() to tell TSAN didn't seem to help. This also appears to fix a memory leak if buffer->updateData() fails when useTempData was true. Not sure if that ever really happens? Bug: skia:7058 Change-Id: I0a2786fa2c59e14c322ec5acc8cd26436c5a9477 Reviewed-on: https://skia-review.googlesource.com/49743 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove pre-attachment of stencil buffersGravatar Robert Phillips2017-09-21
| | | | | | | Change-Id: I4ef555a2b36cf3a0ec74e0ecf7e8ab4f8779df3e Reviewed-on: https://skia-review.googlesource.com/49740 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add native caching of uniquely keyed GrTextureProxies (take 2)Gravatar Robert Phillips2017-09-21
| | | | | | | | | TBR=bsalomon@google.com Change-Id: I590dcdc85fb60706c7eb06277694791dc04c9141 Reviewed-on: https://skia-review.googlesource.com/49543 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Add native caching of uniquely keyed GrTextureProxies"Gravatar Robert Phillips2017-09-20
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d4f100dad90ed5beb1b614464d8c4fcb22c0a993. Reason for revert: ASAN Original change's description: > Add native caching of uniquely keyed GrTextureProxies > > Change-Id: I303fe025b7856b8d681a2d35b416c015bd468e1d > Reviewed-on: https://skia-review.googlesource.com/48300 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com Change-Id: I7bbf549d4855ce6d985867c3880eef80080bd3d1 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/49442 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add native caching of uniquely keyed GrTextureProxiesGravatar Robert Phillips2017-09-20
| | | | | | | Change-Id: I303fe025b7856b8d681a2d35b416c015bd468e1d Reviewed-on: https://skia-review.googlesource.com/48300 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Remove isMipMapped from GrSurfaceDesc" and follow up find exact ↵Gravatar Greg Daniel2017-09-08
| | | | | | | | | | | | | | | scratch CL This reverts commit 52cb5fe23b8f960bb3248620c8f4e2f2957b6685. This reverts commit e1fbf170580a4b932d0abcb11593fb1ef0cac60b. TBR:bsalomon@googole.com Bug: chromium:763333 Change-Id: Ie94e00c3c7231e32f009b9dc7bb51ebb53baf7b1 Reviewed-on: https://skia-review.googlesource.com/44400 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Try finding exact scratch texture in cache before approxGravatar Greg Daniel2017-09-06
| | | | | | | | Bug: skia: Change-Id: Ia65b94bde7aa52e951ba94a0012e794f02c3177e Reviewed-on: https://skia-review.googlesource.com/42940 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove isMipMapped from GrSurfaceDescGravatar Greg Daniel2017-09-06
| | | | | | | | Bug: skia: Change-Id: Id3864aad7ff9636362c9c54ef411a02af9c83fbf Reviewed-on: https://skia-review.googlesource.com/42083 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>