aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl
Commit message (Collapse)AuthorAge
* Guard against D3D NaN/Infinity literals bugGravatar Brian Osman2017-08-01
| | | | | | | | | Bug: angle:2098 skia:6857 Change-Id: I502f05cdeb56514db4e144fdbb6d6f5a6f476b2e Reviewed-on: https://skia-review.googlesource.com/29520 Reviewed-by: Yuqian Li <liyuqian@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Revert "Revert "Add support for semaphores to be inserted on ↵Gravatar Yuqian Li2017-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GrContext flush""" This reverts commit 876aed8758b7109574999ffac43b1ea47f359bd7. Reason for revert: the bots seem to be unhappily red with this CL Original change's description: > Revert "Revert "Add support for semaphores to be inserted on GrContext flush"" > > This reverts commit 8724b4609996eb6369b454611e31b065f3d8d2cf. > > Reason for revert: Creating a test CL to see what happens on the bots > > Original change's description: > > Revert "Add support for semaphores to be inserted on GrContext flush" > > > > This reverts commit cd1416efbc7af6f115dbaa09dce48e075d1d96ca. > > > > Reason for revert: speculative, to try to fix roll see gpu_tests.pixel_integration_test.PixelIntegrationTest.Pixel_GpuRasterization_ConcavePaths > > > > Original change's description: > > > Add support for semaphores to be inserted on GrContext flush > > > > > > This also moves the logic of inserting semaphores down into GrDrawingManager > > > and finishFlush on GrGpu. With it being on finishFlush, there should be no > > > issues when the DrawingManager starts respecting the proxy passed in assuming > > > it always calls finishFlush at the end (which it should). > > > > > > Bug: skia: > > > Change-Id: I925c2a289dcbbb9159b9120878af1d34f21a2dc7 > > > Reviewed-on: https://skia-review.googlesource.com/25641 > > > 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: I9c5b9cf8c060193e1861dbb8f0c10fb11dfb5249 > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: skia: > > Reviewed-on: https://skia-review.googlesource.com/25980 > > Reviewed-by: Mike Reed <reed@google.com> > > Commit-Queue: Mike Reed <reed@google.com> > > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reed@google.com > > # Not skipping CQ checks because original CL landed > 1 day ago. > > Bug: skia: > Change-Id: I5edbeaa0769670ee58f362f0ccaa78319410aa6c > Reviewed-on: https://skia-review.googlesource.com/26160 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reed@google.com Change-Id: I22fd6febafe70489a5fdb695c6f4263368eb423d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/29422 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Revert "Revert "Add support for semaphores to be inserted on GrContext flush""Gravatar Greg Daniel2017-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8724b4609996eb6369b454611e31b065f3d8d2cf. Reason for revert: Creating a test CL to see what happens on the bots Original change's description: > Revert "Add support for semaphores to be inserted on GrContext flush" > > This reverts commit cd1416efbc7af6f115dbaa09dce48e075d1d96ca. > > Reason for revert: speculative, to try to fix roll see gpu_tests.pixel_integration_test.PixelIntegrationTest.Pixel_GpuRasterization_ConcavePaths > > Original change's description: > > Add support for semaphores to be inserted on GrContext flush > > > > This also moves the logic of inserting semaphores down into GrDrawingManager > > and finishFlush on GrGpu. With it being on finishFlush, there should be no > > issues when the DrawingManager starts respecting the proxy passed in assuming > > it always calls finishFlush at the end (which it should). > > > > Bug: skia: > > Change-Id: I925c2a289dcbbb9159b9120878af1d34f21a2dc7 > > Reviewed-on: https://skia-review.googlesource.com/25641 > > 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: I9c5b9cf8c060193e1861dbb8f0c10fb11dfb5249 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/25980 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reed@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia: Change-Id: I5edbeaa0769670ee58f362f0ccaa78319410aa6c Reviewed-on: https://skia-review.googlesource.com/26160 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Remove origin field from GrSurface"Gravatar Robert Phillips2017-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit df0e09feacb29290fe94d37f921731b18f2edae0. Reason for revert: Experimental revert to see if this is blocking the roll Original change's description: > Remove origin field from GrSurface > > This mainly consists of rm origin from GrSurface and the wrapBackEnd* > methods and then re-adding an explicit origin parameter to all the > GrGpu methods that need it. > > Change-Id: Iabd79ae98b227b5b9409f3ab5bbcc48af9613c18 > Reviewed-on: https://skia-review.googlesource.com/26363 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: Id606aa01e84e2b83be71d833eefca477c1ad0d01 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/29220 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove origin field from GrSurfaceGravatar Robert Phillips2017-07-31
| | | | | | | | | | | This mainly consists of rm origin from GrSurface and the wrapBackEnd* methods and then re-adding an explicit origin parameter to all the GrGpu methods that need it. Change-Id: Iabd79ae98b227b5b9409f3ab5bbcc48af9613c18 Reviewed-on: https://skia-review.googlesource.com/26363 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Uncomment glinterface asserts not that chrome has functionsGravatar Greg Daniel2017-07-31
| | | | | | | | Bug: skia: Change-Id: I4c90f8e6eb10389340155fcf7c76c7cb3a5163b3 Reviewed-on: https://skia-review.googlesource.com/28600 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* renamed SkSL types in preparation for killing precision modifiersGravatar Ethan Nicholas2017-07-28
| | | | | | | | Bug: skia: Change-Id: Iff0289e25355a89cdc289a0892ed755dd1b1c900 Reviewed-on: https://skia-review.googlesource.com/27703 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Make GrGpuCommandBuffer's methods take a GrRenderTargetProxy (rather than a ↵Gravatar Robert Phillips2017-07-28
| | | | | | | | | | | | | | | | | | | | GrRenderTarget) In https://skia-review.googlesource.com/c/26363/ (Remove origin field from GrSurface) I just passed an extra GrSurfaceOrigin parameter to all these methods. Besides being verbose this also led to the "discard" method having an origin (to support the GrVkGpuCommandBuffer). It think this approach is better and is plausible if the GrGpuCommandBuffer is viewed as an intermediary between the GrProxy-based Ops and the Gpu. In isolation this CL doesn't really show why we want to percolate the Proxy down. Once GrSurface no longer has an origin a lot of the GrGpu methods need it passed in explicitly. By having the GrGpuCommandBuffer get the proxy it can then pass the origin to GrGpu and removes a layer of functions with an extra origin parameter. Change-Id: Ie223fdee930171a32a5923155a0322e9a9c2aaa9 Reviewed-on: https://skia-review.googlesource.com/27980 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Pull non-substantive changes out of omnibus GrSurface CLGravatar Robert Phillips2017-07-27
| | | | | | | | | https://skia-review.googlesource.com/c/26363 (Remove origin field from GrSurface) is already too large. This pulls some of the cosmetic changes out for separate review. Change-Id: I1d8b95522144b2f4cbd916ef38faa3dde6f78087 Reviewed-on: https://skia-review.googlesource.com/27840 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Make StencilPathArgs hold a GrRenderTargetProxy (rather than a GrRenderTarget)Gravatar Robert Phillips2017-07-27
| | | | | | | | | Again, this will be useful when GrSurface does not have a origin field. Change-Id: I0c4ef5b441eaf38f3489e8631aced11b11fdb6ac Reviewed-on: https://skia-review.googlesource.com/27540 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Expose srgbDecodeDisableSupport in GrCapsGravatar Brian Osman2017-07-27
| | | | | | | | | | | This will allow Flutter to workaround the lack of this extension on a small number of devices. Bug: skia: Change-Id: I46e54aaffc0551a7a17758ebc2016b39bda19abf Reviewed-on: https://skia-review.googlesource.com/27440 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Make GrPipeline hold a GrRenderTargetProxy (instead of a GrRenderTarget)Gravatar Robert Phillips2017-07-26
| | | | | | | | | | | In a future world where GrSurface no longer has an origin it will be useful for the GrPipeline to be holding the GrRenderTargetProxy (which will still have an origin). Change-Id: I743a8cc07b6b92f8116227fb77b7c37da43cde8a Reviewed-on: https://skia-review.googlesource.com/26804 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Automatically prepend "disabled-by-default-" to TRACE categoriesGravatar Brian Osman2017-07-26
| | | | | | | | | | | Ensures that all Skia events are disabled by default in Chrome, and eliminates redundant typing. Bug: skia: Change-Id: I289c5e5a01084fcf4cccf512da65a4727f4aeca2 Reviewed-on: https://skia-review.googlesource.com/26880 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Tracing macro cleanup continuedGravatar Brian Osman2017-07-26
| | | | | | | | | | | - Remove one especially chatty event, and one pointless test - Use TRACE_FUNC everywhere, rather than manual strings Bug: skia: Change-Id: Icb795294009150ca9a260436738d79546a733337 Reviewed-on: https://skia-review.googlesource.com/26701 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* Add Make[backend] calls for creating GrContextsGravatar Greg Daniel2017-07-25
| | | | | | | | | Docs-Preview: https://skia.org/?cl=26369 Bug: skia: Change-Id: I460ee63e466f85b05918479f068a2e5ca2d70550 Reviewed-on: https://skia-review.googlesource.com/26369 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Add support for semaphores to be inserted on GrContext flush"Gravatar Mike Reed2017-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cd1416efbc7af6f115dbaa09dce48e075d1d96ca. Reason for revert: speculative, to try to fix roll see gpu_tests.pixel_integration_test.PixelIntegrationTest.Pixel_GpuRasterization_ConcavePaths Original change's description: > Add support for semaphores to be inserted on GrContext flush > > This also moves the logic of inserting semaphores down into GrDrawingManager > and finishFlush on GrGpu. With it being on finishFlush, there should be no > issues when the DrawingManager starts respecting the proxy passed in assuming > it always calls finishFlush at the end (which it should). > > Bug: skia: > Change-Id: I925c2a289dcbbb9159b9120878af1d34f21a2dc7 > Reviewed-on: https://skia-review.googlesource.com/25641 > 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: I9c5b9cf8c060193e1861dbb8f0c10fb11dfb5249 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/25980 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Add support for semaphores to be inserted on GrContext flushGravatar Greg Daniel2017-07-22
| | | | | | | | | | | | | This also moves the logic of inserting semaphores down into GrDrawingManager and finishFlush on GrGpu. With it being on finishFlush, there should be no issues when the DrawingManager starts respecting the proxy passed in assuming it always calls finishFlush at the end (which it should). Bug: skia: Change-Id: I925c2a289dcbbb9159b9120878af1d34f21a2dc7 Reviewed-on: https://skia-review.googlesource.com/25641 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* reduce code size in GrGLTestInterface.o and GrGLAssembleInterface.oGravatar Mike Klein2017-07-21
| | | | | | | | | | | | | | All these std::function instantiations fill the object files up with almost 1MB of boilerplate generated code. I think we can do better by implementing GrGLFunction as its own std::function-like type with much less overhead, bringing the total object file size down to about 200K. This reduces DM from 28780344 to 27726144 on my Mac, a touch above 1MB. Change-Id: I219a86737d1dfb8b68e4eb47b51a8a98b18ff282 Reviewed-on: https://skia-review.googlesource.com/20551 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add test for flushing empty surface with semaphoresGravatar Greg Daniel2017-07-20
| | | | | | | | Bug: skia: Change-Id: I8d7dcb29c5b4c460aa5137842caf6563448ba5d3 Reviewed-on: https://skia-review.googlesource.com/25181 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Revert "Fixes from sample count change""Gravatar Greg Daniel2017-07-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 914b285d45717bf8da8f141b41cec098749a6d0e. Reason for revert: Already have fix for bug, which is quicker than fixing merge conflict Original change's description: > Revert "Fixes from sample count change" > > This reverts commit f3316224b95e4d3325972552df0d1c046ae73225. > > Reason for revert: <INSERT REASONING HERE> > > Original change's description: > > Fixes from sample count change > > > > Re blacklist imagination msaa on Vulkan and fix i->1 bug in GL > > > > Bug: skia: > > Change-Id: I8045565b2064d2ee037ab43b167e6d5d3a59268e > > Reviewed-on: https://skia-review.googlesource.com/24780 > > Reviewed-by: Cary Clark <caryclark@google.com> > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > TBR=egdaniel@google.com,bsalomon@google.com,caryclark@google.com > > Change-Id: I8e3c95621eb0bc6ea2be24cc4ee67f88239263ed > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/24863 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com,caryclark@google.com Change-Id: I43cb50691885cae8fe8bab1f034eb6a00b77de81 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/24900 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Fixes from sample count change"Gravatar Greg Daniel2017-07-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f3316224b95e4d3325972552df0d1c046ae73225. Reason for revert: <INSERT REASONING HERE> Original change's description: > Fixes from sample count change > > Re blacklist imagination msaa on Vulkan and fix i->1 bug in GL > > Bug: skia: > Change-Id: I8045565b2064d2ee037ab43b167e6d5d3a59268e > Reviewed-on: https://skia-review.googlesource.com/24780 > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com,caryclark@google.com Change-Id: I8e3c95621eb0bc6ea2be24cc4ee67f88239263ed No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/24863 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Revert "Fixes from sample count change""Gravatar Cary Clark2017-07-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 390aaaf403f2e2487c44613e22c4d931c44315fb. Reason for revert: could not revert breaking change automatically because of conflict during merge Original change's description: > Revert "Fixes from sample count change" > > This reverts commit f3316224b95e4d3325972552df0d1c046ae73225. > > Reason for revert: android vulkan build broken > > Original change's description: > > Fixes from sample count change > > > > Re blacklist imagination msaa on Vulkan and fix i->1 bug in GL > > > > Bug: skia: > > Change-Id: I8045565b2064d2ee037ab43b167e6d5d3a59268e > > Reviewed-on: https://skia-review.googlesource.com/24780 > > Reviewed-by: Cary Clark <caryclark@google.com> > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > TBR=egdaniel@google.com,bsalomon@google.com,caryclark@google.com > > Change-Id: I076a4226f5725b3d48592402772ca39b64cae478 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/24840 > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Cary Clark <caryclark@google.com> TBR=egdaniel@google.com,bsalomon@google.com,caryclark@google.com Change-Id: I890540a68c18ed390773e97066ed92fea370d083 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/24842 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Revert "Fixes from sample count change"Gravatar Cary Clark2017-07-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f3316224b95e4d3325972552df0d1c046ae73225. Reason for revert: android vulkan build broken Original change's description: > Fixes from sample count change > > Re blacklist imagination msaa on Vulkan and fix i->1 bug in GL > > Bug: skia: > Change-Id: I8045565b2064d2ee037ab43b167e6d5d3a59268e > Reviewed-on: https://skia-review.googlesource.com/24780 > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com,caryclark@google.com Change-Id: I076a4226f5725b3d48592402772ca39b64cae478 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/24840 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Remove GrBackendTextureDescGravatar Brian Salomon2017-07-20
| | | | | | | Change-Id: I2b123d1782400e97ab2ce2f11e3e3d325a13e6c8 Reviewed-on: https://skia-review.googlesource.com/24748 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Fixes from sample count changeGravatar Greg Daniel2017-07-19
| | | | | | | | | | Re blacklist imagination msaa on Vulkan and fix i->1 bug in GL Bug: skia: Change-Id: I8045565b2064d2ee037ab43b167e6d5d3a59268e Reviewed-on: https://skia-review.googlesource.com/24780 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Update gpu caps for valid sample counts.Gravatar Greg Daniel2017-07-19
| | | | | | | | | | | | Instead of query and maxSampleCount and using that to cap, we now have each config store its supported values and when requested returns either the next highest or equal supported value, or if non the max config supported. Bug: skia: Change-Id: I8802d44c13b3b1703ee54a7e69b82102d4b8dc2d Reviewed-on: https://skia-review.googlesource.com/24302 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* gl: print shader sources one line at a timeGravatar Chris Dalton2017-07-18
| | | | | | | | | | This ensures they don't get truncated by the ADB log. Bug: skia: Change-Id: I5ad0222e54f667c0dd3a5b1174d43588d90ca231 Reviewed-on: https://skia-review.googlesource.com/24421 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Add trace events for shader generation.Gravatar Ryan Macnak2017-07-13
| | | | | | | | | This helps explain why some frames are slow in Flutter. Change-Id: Ic8b36186f1c8c262950e5ff9e0da3b808cff8d0c Reviewed-on: https://skia-review.googlesource.com/22087 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Address ASAN complaintGravatar Robert Phillips2017-07-12
| | | | | | | | TBR=bsalomon@google.com Change-Id: Ic3b1f328a84d58939ff55b38cbc1fd4bd29ad5c6 Reviewed-on: https://skia-review.googlesource.com/22482 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Plumb raw GrMipLevel* down instead of SkTArray<GrMipLevel> in GrGpuGravatar Robert Phillips2017-07-12
| | | | | | | Change-Id: I34033b6ecb469458eb820cbc01aad8c7bb876312 Reviewed-on: https://skia-review.googlesource.com/22212 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Ensure FB sRGB conversion is on during copy-as-drawGravatar Brian Osman2017-07-11
| | | | | | | | | | | | | | | | | A recent change up-stack tickled the cross context image test, exposing this bug. I have no idea how it didn't manifest sooner. In that test, we're takng a subset of a lazy image, which implements onGenerateTexture via a surface copy. In this case, we were in legacy mode, but the textures were all created with sRGB configs. In normal drawing, we disable sRGB decode. For the copy draw, we were explicitly enabling sRGB decode, but not setting the FB setting, so if it was still off (it was), the image would get decoded but not re-encoded, coming out too dark. Bug: skia: Change-Id: I4a480b11315cc308ea016b7082aff17920764214 Reviewed-on: https://skia-review.googlesource.com/22211 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Fix missing height check found by /analyzeGravatar Bruce Dawson2017-07-06
| | | | | | | | | | | | | | | | | | | | | A recent run of the experimental VC++ /analyze builder gave this warning: skia\src\gpu\gl\grglgpu.cpp(851) : warning C6287: Redundant code: the left and right sub-expressions are identical. The code it complained about was this: if (width < 0 || width < 0) { which was introduced in https://skia-review.googlesource.com/c/20445/ This change makes the obvious fix. Change-Id: I9d1743293fac9dd15ed82cf85efef907d727921e Reviewed-on: https://skia-review.googlesource.com/21620 Reviewed-by: Jim Van Verth <jvanverth@google.com> Reviewed-by: Bruce Dawson <brucedawson@google.com> Commit-Queue: Jim Van Verth <jvanverth@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>
* Add shading language version to GL dumpGravatar Jim Van Verth2017-06-27
| | | | | | | | Bug: skia:6759 Change-Id: I021a8487ccb1d127b2005285e439be34d644f333 Reviewed-on: https://skia-review.googlesource.com/20905 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Restrict acceptable bounds for uploading data to mip levels on GPUGravatar Greg Daniel2017-06-26
| | | | | | | | | | | | | | The help simplify the code (and currect a current bug) inside the uploadPixel functions in GL and Vulkan, we not restrict the bounds upload/write bounds on a higher level. For non mipped uploads, we requiring the bounds to be within the bounds on the texture, and for mipped uploads we require the bounds to be the full texture. Bug: skia:6780 Change-Id: Ia1cff3ee48edd3676afce6265d60e81ccea6ca6a Reviewed-on: https://skia-review.googlesource.com/20825 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Revert "Clean up onTransferPixels""Gravatar Jim Van Verth2017-06-22
| | | | | | | | Bug: skia:5126 Change-Id: Ia1eaef56cca266ad4c413e711e63646e913222be Reviewed-on: https://skia-review.googlesource.com/20445 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Add GL_APPLE_sync supportGravatar Brian Osman2017-06-21
| | | | | | | | | | | While debugging Flutter iOS issues, I realized that they weren't getting cross context images (we were just passing around codec backed images). Bug: skia: Change-Id: I6190b24eb281e839659d28767f9a0b31c05f13e0 Reviewed-on: https://skia-review.googlesource.com/20450 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* When flushing a surface with semaphores, have last semaphore op call glFlushGravatar Greg Daniel2017-06-21
| | | | | | | | | Bug: skia:6770 Change-Id: Ia321b3826da87bd0d25ca2b13b7360baa8caf597 Reviewed-on: https://skia-review.googlesource.com/20453 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Clean up onTransferPixels"Gravatar Jim Van Verth2017-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f7037d003c936f59e4d02244821e223c2e7af8e8. Reason for revert: Issues on test bots. Original change's description: > Clean up onTransferPixels > > Bug: skia:5126 > Change-Id: I323c50e7854744302007b4ae7bd25e5742c14cbc > Reviewed-on: https://skia-review.googlesource.com/19055 > Commit-Queue: Jim Van Verth <jvanverth@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com Change-Id: I923fda4d5cd8c2896fb347f9b2695b7f83d9137b No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:5126 Reviewed-on: https://skia-review.googlesource.com/20444 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Clean up onTransferPixelsGravatar Jim Van Verth2017-06-21
| | | | | | | | Bug: skia:5126 Change-Id: I323c50e7854744302007b4ae7bd25e5742c14cbc Reviewed-on: https://skia-review.googlesource.com/19055 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Add return to surface semaphore calls to indicate when we don't support themGravatar Greg Daniel2017-06-19
| | | | | | | | Bug: skia: Change-Id: I00118637bf6555278ca61707275ed60372de581d Reviewed-on: https://skia-review.googlesource.com/20061 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Revert "Remove Gr*Gpu includes from header files.""Gravatar Greg Daniel2017-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 56af45b03c542ef0bc198e42687bf685aafaae81. Reason for revert: Relanding now that pre CL has relanded Original change's description: > Revert "Remove Gr*Gpu includes from header files." > > This reverts commit 2bd381bffd36cdcffacf606d952547ce66fed7e9. > > Reason for revert: Need to revert change this landed on top of > > Original change's description: > > Remove Gr*Gpu includes from header files. > > > > Some general cleanup to try to keep use of the backend gpu class in cpps. > > > > Bug: skia: > > Change-Id: I1a28e0e5c2e55562b3fff56c284c3405b5b6d8bc > > Reviewed-on: https://skia-review.googlesource.com/20057 > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > TBR=egdaniel@google.com,robertphillips@google.com > > Change-Id: I5b27d50654a17502c056d59b2d4f9609376d189e > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/20064 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,robertphillips@google.com Change-Id: Id1656a7708223bc4dcc8eb4444ef41ada61be5d0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/20148 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Revert "Add API for flushing surfaces with gpu semaphores""Gravatar Greg Daniel2017-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7292231905c34ed290ba479338f26b56ae2a7792. This change relands the original plus the follow on change: https://skia-review.googlesource.com/20059. Additionally it adds a blacklist for the mac intel bots which don't see to respect the added fences on the GPU. Original change's description: > Revert "Add API for flushing surfaces with gpu semaphores" > > This reverts commit 66366c697853e906d961ae691e2bc5209cdcfa62. > > Reason for revert: Failing test on mac bots > > Original change's description: > > Add API for flushing surfaces with gpu semaphores > > > > BUG=skia: > > > > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1 > > Reviewed-on: https://skia-review.googlesource.com/11488 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Forrest Reiling <freiling@google.com> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com > > Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/20063 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com Change-Id: I4dc6c0e1deb0398eeb165a34f0a26af7a58259f1 Reviewed-on: https://skia-review.googlesource.com/20141 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Add API for flushing surfaces with gpu semaphores"Gravatar Greg Daniel2017-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 66366c697853e906d961ae691e2bc5209cdcfa62. Reason for revert: Failing test on mac bots Original change's description: > Add API for flushing surfaces with gpu semaphores > > BUG=skia: > > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1 > Reviewed-on: https://skia-review.googlesource.com/11488 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Reviewed-by: Forrest Reiling <freiling@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/20063 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Remove Gr*Gpu includes from header files."Gravatar Greg Daniel2017-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2bd381bffd36cdcffacf606d952547ce66fed7e9. Reason for revert: Need to revert change this landed on top of Original change's description: > Remove Gr*Gpu includes from header files. > > Some general cleanup to try to keep use of the backend gpu class in cpps. > > Bug: skia: > Change-Id: I1a28e0e5c2e55562b3fff56c284c3405b5b6d8bc > Reviewed-on: https://skia-review.googlesource.com/20057 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,robertphillips@google.com Change-Id: I5b27d50654a17502c056d59b2d4f9609376d189e No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/20064 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Remove Gr*Gpu includes from header files.Gravatar Greg Daniel2017-06-15
| | | | | | | | | | Some general cleanup to try to keep use of the backend gpu class in cpps. Bug: skia: Change-Id: I1a28e0e5c2e55562b3fff56c284c3405b5b6d8bc Reviewed-on: https://skia-review.googlesource.com/20057 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add API for flushing surfaces with gpu semaphoresGravatar Greg Daniel2017-06-15
| | | | | | | | | | BUG=skia: Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1 Reviewed-on: https://skia-review.googlesource.com/11488 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Forrest Reiling <freiling@google.com>
* Remove GrGpu.h from GrResourceProvider.hGravatar Robert Phillips2017-06-15
| | | | | | | | | Noticed this while cleaning up GrResourceProvider.h's usage. It seems like a powerful header to just be splashing around. Change-Id: I686fea61354a7e3c1c759627ffe4a560f7945f83 Reviewed-on: https://skia-review.googlesource.com/20040 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Clean up GrResourceProvider usageGravatar Robert Phillips2017-06-15
| | | | | | | | | | | | | The only substantive changes are the removal of GrProxy instantiation in: SkGpuBlurUtils::GaussianBlur GrSimpleTextureEffect::Make* Change-Id: I10970609693bd6ff5b3a3c21b41d82642bb277bc Reviewed-on: https://skia-review.googlesource.com/19965 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* use statically linked glGetShaderPrecisionFormat on AndroidGravatar Brian Salomon2017-06-13
| | | | | | | | Bug: skia:6731 Change-Id: I896d77d8c850f6a36d294fb5d44b5aae1b192629 Reviewed-on: https://skia-review.googlesource.com/19525 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>