aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/SkGr.cpp
Commit message (Collapse)AuthorAge
* Re-re-land "added GrSkSLFP and converted DitherEffect to use it"Gravatar Ethan Nicholas2018-07-31
| | | | | | | | | | This reverts commit 6c48e4d11ce80fa5cfef56e13b2d5847fe94a7cc. Bug: skia: Change-Id: I7ee78990fc30eec545d1856e59eb6e0573089426 Reviewed-on: https://skia-review.googlesource.com/144348 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Reland "Revert "added GrSkSLFP and converted DitherEffect to use it""Gravatar Ethan Nicholas2018-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 97ae0c89025dfd791047f5701e57d58da37c125c. Reason for revert: Breaking ANGLE. Original change's description: > Revert "Revert "added GrSkSLFP and converted DitherEffect to use it"" > > This reverts commit f2030783094e502fb74221077a5ee7cb41287fe4. > > Bug: skia: > Change-Id: Icaaa8b3ea652a8f126bfbcc788a360493a7ebe3e > Reviewed-on: https://skia-review.googlesource.com/137391 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com,ethannicholas@google.com Change-Id: I65d6d2707fceab0a99121c528d1b848d23e34bfa No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/142588 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "Revert "added GrSkSLFP and converted DitherEffect to use it""Gravatar Ethan Nicholas2018-07-19
| | | | | | | | | | This reverts commit f2030783094e502fb74221077a5ee7cb41287fe4. Bug: skia: Change-Id: Icaaa8b3ea652a8f126bfbcc788a360493a7ebe3e Reviewed-on: https://skia-review.googlesource.com/137391 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Reland "Make GPU cache invalidation SkMessageBus messages go to one GrContext."Gravatar Brian Salomon2018-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of f4c5bb9aba485aa47c27b15905d81992b7cf4707 Original change's description: > Make GPU cache invalidation SkMessageBus messages go to one GrContext. > > Makes it so the template param to SkMessageBus must implement: > bool shouldSend(uint32_t inboxID) const > > Updates all GPU backend message types to only go to the GrContext that > is adding a cache entry. > > Bug: skia: > Change-Id: I3e8a4eb90654b7b8ac57cac9fb508c0ef1d51058 > Reviewed-on: https://skia-review.googlesource.com/140220 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Reviewed-by: Jim Van Verth <jvanverth@google.com> Bug: skia: Change-Id: I8402bfe3ed0170c99936d47050458817030b473b Reviewed-on: https://skia-review.googlesource.com/140801 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Make GPU cache invalidation SkMessageBus messages go to one GrContext."Gravatar Brian Salomon2018-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f4c5bb9aba485aa47c27b15905d81992b7cf4707. Reason for revert: Accidentally submitted without CQ Original change's description: > Make GPU cache invalidation SkMessageBus messages go to one GrContext. > > Makes it so the template param to SkMessageBus must implement: > bool shouldSend(uint32_t inboxID) const > > Updates all GPU backend message types to only go to the GrContext that > is adding a cache entry. > > Bug: skia: > Change-Id: I3e8a4eb90654b7b8ac57cac9fb508c0ef1d51058 > Reviewed-on: https://skia-review.googlesource.com/140220 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Reviewed-by: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: Iadb667d8027341703d254325320ddaa528fb33a1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/140800 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make GPU cache invalidation SkMessageBus messages go to one GrContext.Gravatar Brian Salomon2018-07-11
| | | | | | | | | | | | | | Makes it so the template param to SkMessageBus must implement: bool shouldSend(uint32_t inboxID) const Updates all GPU backend message types to only go to the GrContext that is adding a cache entry. Bug: skia: Change-Id: I3e8a4eb90654b7b8ac57cac9fb508c0ef1d51058 Reviewed-on: https://skia-review.googlesource.com/140220 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Add color type to the image filter DAG's OutputPropertiesGravatar Brian Osman2018-07-06
| | | | | | | | | | | | Don't try to guess the pixel config to use for intermediates. Instead, just make the intermediates in the same color type (and space) as the final destination. This removes some no-longer-correct logic that was using sRGB configs, resulting in linear blending and precision loss. Change-Id: I627c47193a9f2889c3dc121170ff3e7d5d315fa0 Reviewed-on: https://skia-review.googlesource.com/139547 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Replace isGammaCorrect with isLinearlyBlendedGravatar Brian Osman2018-07-03
| | | | | | | | | | | | | | | | | | | | We were using isGammaCorrect (presence of a color space) to trigger rendering effects that should only apply when doing linear blending. Rename and redefine that function to fix many of those issues. In a few places, we really do care about the color space. The big win here is text rendering, which is now the same on legacy gl and glsrgb configs. Also left some comments about our desire to do something smarter for text in the future. Bug: skia: Change-Id: I94106e95f5f81aaa0a28dbaccd65f5d94cf0de67 Reviewed-on: https://skia-review.googlesource.com/139109 Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* basic first pass at RGBA F32 supportGravatar Mike Klein2018-06-26
| | | | | | | | | | | | | Draws basically the same as f16. The existing load_f32, load_f32_dst, and store_f32 stages all had the same bug that we'd never noticed because dy was always 0 until now. Change-Id: Ibbd393fa1acc5df414be4cdef0f5a9d11dcccdb3 Reviewed-on: https://skia-review.googlesource.com/137585 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert "added GrSkSLFP and converted DitherEffect to use it"Gravatar Kevin Lubick2018-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit dfbfc738a9edfff7a9804253175e380c230f3d21. Reason for revert: Seems to be breaking DDL/ASAN bots Original change's description: > added GrSkSLFP and converted DitherEffect to use it > > Bug: skia: > Change-Id: I84b71165eab1712355f3c7669cee2d33d259f3df > Reviewed-on: https://skia-review.googlesource.com/124504 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,ethannicholas@google.com Change-Id: Ic4c3978aaba0391f2f8bb1316a456e3821a3a2f2 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/135700 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
* added GrSkSLFP and converted DitherEffect to use itGravatar Ethan Nicholas2018-06-18
| | | | | | | | Bug: skia: Change-Id: I84b71165eab1712355f3c7669cee2d33d259f3df Reviewed-on: https://skia-review.googlesource.com/124504 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Implement nonlinear (as-encoded) blending in GrColorSpaceXformGravatar Brian Osman2018-06-18
| | | | | | | | | | | | | | | | | | Make GrColorSpaceXform a wrapper over SkColorSpaceXformSteps, and removed the xform cache. The shader code does up to five steps to correctly transform (unpremul, linearize, gamut, encode, premul). Remove all clamping, so we can support sRGB encoded F16. Most of https://skia-review.googlesource.com/c/skia/+/132090, except that GrNonlinearColorSpaceXformEffect is still used for SkColorSpaceXformCanvas and a few other places. As a result, this doesn't trigger any layout test failures. Change-Id: I789a5e327a419b5f7634c00d1b355912046c07b7 Reviewed-on: https://skia-review.googlesource.com/135326 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Include sRGB -> Linear in the cached "from sRGB" xformGravatar Brian Osman2018-06-15
| | | | | | | | | | | | | | | This simplifies the handling of paint color conversion, as well as GrDrawVerticesOp and the default geometry processor. We don't need to track "linearize" separate from the color space xform. We only supply an xform if needed. The linearize is now done automatically by the xform, though we aren't converting to destination gamma. https://skia-review.googlesource.com/c/skia/+/132090 will fix that. Change-Id: I0af3f29c123c3dadb818f87c5d295bc78e2ff079 Reviewed-on: https://skia-review.googlesource.com/135141 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Always use filterColor4f to filter paint colorsGravatar Brian Osman2018-06-05
| | | | | | | | | | | | | | | The rationale here wasn't even correct before - filterColor4f did not use a linearized version of the stored color (for mode color filter), so it's always safe and correct to call the 4f version. Change-Id: I7087342e531e1768c945f78fb2126954b2dc5a86 Reviewed-on: https://skia-review.googlesource.com/132088 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Brian Osman <brianosman@google.com>
* 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>
* Move SkColorTable to src/codecGravatar Leon Scroggins III2018-06-01
| | | | | | | | | | | | | | | It is no longer needed anywhere else, and simply happens to be an implementation detail of SkCodec (at least for now). Remove references to SkColorTable in other classes, and clean up some includes of SkConvertPixels I found along the way. Remove unused includes/methods on SkColorTable Change-Id: I46c8e46f5b77c37710b6cf595d48107d55871d52 Reviewed-on: https://skia-review.googlesource.com/130845 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Make GrCaps and GrShaderCaps private.Gravatar Brian Salomon2018-05-11
| | | | | | | | | Moves getCaps() from GrContext to GrContextPriv and removes unused refCaps(). Change-Id: Ic6a8951b656c0d1b2773eae73bff8e88af819866 Reviewed-on: https://skia-review.googlesource.com/127389 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@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>
* Reland "Fix handling of MaskFilter matrices"Gravatar Florin Malita2018-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c64ee20e135a336ed775ccb6dec8a87efd19ec02. Reason for revert: initial failures should be fixed in https://skia.googlesource.com/skia.git/+/8eaf64ae12696d4189d3cea9f023658494cf82b8 Original change's description: > Revert "Fix handling of MaskFilter matrices" > > This reverts commit 2097fd03ffea48bd904c48c93348b2350600870e. > > Reason for revert: This is breaking a lot of Windows bots (esp. on the shadermaskfilter_localmatrix) > > Original change's description: > > Fix handling of MaskFilter matrices > > > > 1) extend GrFPArgs to track pre/post local matrices, add helpers for > > creating pre/post wrapper args > > > > 2) add a SkShaderBase helper (totalLocalMatrix) to centralize the LM > > sandwich logic. > > > > 3) update call sites to use the above > > > > 4) rename SkMatrixFilter::makeWithLocalMatrix -> makeWithMatrix, to > > disambiguate vs. SkShader::makeWithLocalMatrix. > > > > BUG=skia:7744 > > > > Change-Id: Ib2b7b007e6924979b00649dde7c94ef4b34771f1 > > Reviewed-on: https://skia-review.googlesource.com/119330 > > Commit-Queue: Florin Malita <fmalita@chromium.org> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com > > Change-Id: I918dbb95bf00b3122e6699b84566ec82dbb5fc5c > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:7744 > Reviewed-on: https://skia-review.googlesource.com/120340 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com Change-Id: If194862a928d1abe22ed8fa968436c725d19a8fc No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7744 Reviewed-on: https://skia-review.googlesource.com/120480 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Revert "Fix handling of MaskFilter matrices"Gravatar Robert Phillips2018-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2097fd03ffea48bd904c48c93348b2350600870e. Reason for revert: This is breaking a lot of Windows bots (esp. on the shadermaskfilter_localmatrix) Original change's description: > Fix handling of MaskFilter matrices > > 1) extend GrFPArgs to track pre/post local matrices, add helpers for > creating pre/post wrapper args > > 2) add a SkShaderBase helper (totalLocalMatrix) to centralize the LM > sandwich logic. > > 3) update call sites to use the above > > 4) rename SkMatrixFilter::makeWithLocalMatrix -> makeWithMatrix, to > disambiguate vs. SkShader::makeWithLocalMatrix. > > BUG=skia:7744 > > Change-Id: Ib2b7b007e6924979b00649dde7c94ef4b34771f1 > Reviewed-on: https://skia-review.googlesource.com/119330 > Commit-Queue: Florin Malita <fmalita@chromium.org> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com Change-Id: I918dbb95bf00b3122e6699b84566ec82dbb5fc5c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7744 Reviewed-on: https://skia-review.googlesource.com/120340 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fix handling of MaskFilter matricesGravatar Florin Malita2018-04-11
| | | | | | | | | | | | | | | | | | | | 1) extend GrFPArgs to track pre/post local matrices, add helpers for creating pre/post wrapper args 2) add a SkShaderBase helper (totalLocalMatrix) to centralize the LM sandwich logic. 3) update call sites to use the above 4) rename SkMatrixFilter::makeWithLocalMatrix -> makeWithMatrix, to disambiguate vs. SkShader::makeWithLocalMatrix. BUG=skia:7744 Change-Id: Ib2b7b007e6924979b00649dde7c94ef4b34771f1 Reviewed-on: https://skia-review.googlesource.com/119330 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Dump additional details about the gpu resources.Gravatar Derek Sollenberger2018-03-29
| | | | | | | | | | | | | | | | | GpuResources now dump optional string values that describe the type and category of the resource. The type provides a description of the kind of resource it is (e.g. texture, buffer object, stencil, etc.) and the category describes what the resource is currently tasked to do (e.g. path masks, images, scratch, etc.) This CL also refactors the dump logic in an attempt to consolidate duplicated code into GrGpuResources.cpp. Bug: b/74435803 Change-Id: I83cae825f41e6450a21398ab3ecea349c7c61c15 Reviewed-on: https://skia-review.googlesource.com/115989 Commit-Queue: Derek Sollenberger <djsollen@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Fix TSAN race in SkPaintToGrPaintNoShaderGravatar Robert Phillips2018-03-27
| | | | | | | Change-Id: Id906e139db80e0c3b426a0e2318e77477989cf8d Reviewed-on: https://skia-review.googlesource.com/116545 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* 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>
* Don't add change listeners to pixelRefs in DDL modeGravatar Robert Phillips2018-03-20
| | | | | | | | Change-Id: I1ddfec1e0d697dd4ed183c304514b14c89aca11d Reviewed-on: https://skia-review.googlesource.com/115400 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Reland "Add back missing unique key checks when creating CachedBitmap/Image ↵Gravatar Greg Daniel2018-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Proxies" This reverts commit 4f57eb8002a0488cfbf08717b25af93fae37a39a. Reason for revert: Doesn't look to be cause of chrome roll failures Original change's description: > Revert "Add back missing unique key checks when creating CachedBitmap/Image Proxies" > > This reverts commit b78dd5d01eb16ae3cb9104ce8c0fa7e861431259. > > Reason for revert: possibly breaking chrome roll > > Original change's description: > > Add back missing unique key checks when creating CachedBitmap/Image Proxies > > > > Its possible that this could fix perf regression in Chrome. > > > > Bug: 811452 > > Change-Id: I2d4f7827092b361469586580f0c7c843ab2d5cec > > Reviewed-on: https://skia-review.googlesource.com/114280 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com > > Change-Id: I71646befd07bf28442ac3b9225c021cd141bf398 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: 811452 > Reviewed-on: https://skia-review.googlesource.com/114422 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I957d66123bce150387a1ce6a80bcfc06c82d5fa1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 811452 Reviewed-on: https://skia-review.googlesource.com/114426 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Add back missing unique key checks when creating CachedBitmap/Image ↵Gravatar Greg Daniel2018-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Proxies" This reverts commit b78dd5d01eb16ae3cb9104ce8c0fa7e861431259. Reason for revert: possibly breaking chrome roll Original change's description: > Add back missing unique key checks when creating CachedBitmap/Image Proxies > > Its possible that this could fix perf regression in Chrome. > > Bug: 811452 > Change-Id: I2d4f7827092b361469586580f0c7c843ab2d5cec > Reviewed-on: https://skia-review.googlesource.com/114280 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I71646befd07bf28442ac3b9225c021cd141bf398 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 811452 Reviewed-on: https://skia-review.googlesource.com/114422 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add back missing unique key checks when creating CachedBitmap/Image ProxiesGravatar Greg Daniel2018-03-14
| | | | | | | | | | | Its possible that this could fix perf regression in Chrome. Bug: 811452 Change-Id: I2d4f7827092b361469586580f0c7c843ab2d5cec Reviewed-on: https://skia-review.googlesource.com/114280 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>
* 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>
* Revert "Revert "Add 1010102 support to Ganesh""Gravatar Brian Osman2018-03-02
| | | | | | | | | | This reverts commit ded47a50143470d1acdafa03e878cc7da5608038. Bug: skia: Change-Id: I7d7552e6ccc8591cae91426407ab13b628b93b68 Reviewed-on: https://skia-review.googlesource.com/111760 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Revert "Add 1010102 support to Ganesh"Gravatar Brian Osman2018-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 44b61204d9f5681b9474db017577d56f42a32d66. Reason for revert: TSAN bot crashing Original change's description: > Add 1010102 support to Ganesh > > Adds gl1010102, gles1010102, vk1010102, and mtl1010102 > configs to DM. > > This uses the same saveLayer approach as CPU, switching > to 8888 so that we have enough alpha precision. > > Change-Id: I9f5b63747ec01031c8db97dadfc42f77e4863ccb > Reviewed-on: https://skia-review.googlesource.com/110500 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> TBR=mtklein@google.com,bsalomon@google.com,brianosman@google.com Change-Id: I782e740763044c1ae78fb219161e37eec7617c74 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/111580 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Add 1010102 support to GaneshGravatar Brian Osman2018-03-01
| | | | | | | | | | | | | Adds gl1010102, gles1010102, vk1010102, and mtl1010102 configs to DM. This uses the same saveLayer approach as CPU, switching to 8888 so that we have enough alpha precision. Change-Id: I9f5b63747ec01031c8db97dadfc42f77e4863ccb Reviewed-on: https://skia-review.googlesource.com/110500 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Do not return null paint if shaderFP is null"Gravatar Yuqian Li2018-02-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0d96175c97856d272d299c86577a34f825e810fc. Reason for revert: skia:7583 Also, LG probably doesn't really care about the original fix so we should be fine for reverting the CL. Original change's description: > Do not return null paint if shaderFP is null > > This fixes the ripple bug reported by LG: > https://b.corp.google.com/issues/68964656 > > In that bug, the button is so tall that our image shader returns > a null fragment processor because the height exceeds GL_MAX_TEXTURE_SIZE. > If we return null paint, the ripple is completely gone. This CL returns > a default paint so we can still see the ripple, and that matches HWUI's > behaviour. > > A GM will be added later after some other urgent Android ripple bug fixes. > > Bug: skia: > Change-Id: I9bcafc078916a6a15fbd84d2019f39ac88d2b2f8 > Reviewed-on: https://skia-review.googlesource.com/73200 > Commit-Queue: Yuqian Li <liyuqian@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=egdaniel@google.com,bsalomon@google.com,liyuqian@google.com Bug: skia:7583 Change-Id: I0c8fe994bf0ae07d9f52eafee79adcfcbd0c6445 Reviewed-on: https://skia-review.googlesource.com/110200 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Avoid creating MIPs until necessary when MIP bias is activeGravatar Brian Osman2018-02-16
| | | | | | | | | | | | With sharpened mips, the scale at which we begin to sample level 1 is (obviously) less than 1. This change avoids creation of mips for images that are only slightly downscaled (and for which we wouldn't have sampled those MIPs anyway). Change-Id: If8ffc79c2ce2ff1f3aae7f5732d8a50aca0e26be Reviewed-on: https://skia-review.googlesource.com/107801 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@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>
* Refactor GrUploadPixmap logic into MakeCrossContextFromPixmapGravatar Greg Daniel2018-02-12
| | | | | | | | | | | MakeCrossContextPixmap was the only place we were using the helper in SkGr, so this just shifts the logic into MakeCrosscontextFromPixmap. Bug: skia: Change-Id: I90126227ebacf889f9899ef7af9608a5664c582d Reviewed-on: https://skia-review.googlesource.com/106280 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Remove unused code resulted from deleting DeferredTextureImageGravatar Greg Daniel2018-02-10
| | | | | | | | Bug: skia: Change-Id: Iaedc09880bd6a2d8fda4ce52f1644a944dd72605 Reviewed-on: https://skia-review.googlesource.com/106266 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Make GrUploadBitmapToTexutreProxy to support lazy proxiesGravatar Greg Daniel2018-02-08
| | | | | | | | Bug: skia: Change-Id: I876646f104c2ad22d912a269beadd5c0cd9bfded Reviewed-on: https://skia-review.googlesource.com/105723 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Move GrMakeCachedBitmapProxy work in lazy modeGravatar Greg Daniel2018-02-08
| | | | | | | | | | | This basically wraps the bitmap in an SkImage and uses the GrMakeCachedImageProxy call to create the proxy. Bug: skia: Change-Id: I648a9cac3a316231bfb1bcedaae2009b7de0356c Reviewed-on: https://skia-review.googlesource.com/105360 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add function to GrProxyProvider to lazily upload mip map dataGravatar Greg Daniel2018-02-07
| | | | | | | | Bug: skia: Change-Id: I906207727242bed8a109bf3ca10b5a6e8e4b952e Reviewed-on: https://skia-review.googlesource.com/104581 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add param to GrMakeCachedImageProxy to specify the SkBackingFitGravatar Greg Daniel2018-02-05
| | | | | | | | Bug: skia: Change-Id: Ic103330eb9bab9ba7beb4d1449b559b32072530b Reviewed-on: https://skia-review.googlesource.com/103461 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: 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>
* Disable texture strip atlasing for DDLGravatar Robert Phillips2018-02-02
| | | | | | | | | | | | | Ultimately we will want to perform inline and ASAP uploads for the texture strip atlas. Unfortunately, that functionality relies on the existance of the flushState (which we don't have for the opList-based DDL implementation). For now we will punt and try storing the individual texture strips in their own image-based texture proxy for DDLs. Change-Id: Ic2ee0deb230172bda4a5d4b69cc802dbe84ad7ac Reviewed-on: https://skia-review.googlesource.com/102464 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: 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>
* 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>