aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image
Commit message (Collapse)AuthorAge
* Make GrTextureProxy store a GrTextureType.Gravatar Brian Salomon2018-07-30
| | | | | | | | | | Removes flag indicating rectangle or external as its now redundant. Bug: skia: Change-Id: Ia475b557390e7a6b0f19f6e189cf8c27090e397c Reviewed-on: https://skia-review.googlesource.com/144346 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Reland "Go back to cleaning up MIP levels on texture export rather than ↵Gravatar Brian Salomon2018-07-27
| | | | | | | | | | | | | | | | | | | | | | | | assuming dirty on texture import." This is a reland of 01d6fc9d8415e400a7eac95518356ecf341aa5cb Chrome layout tests have been suppressed so this shouldn't block a Skia roll. Original change's description: > Go back to cleaning up MIP levels on texture export rather than assuming dirty > on texture import. > > Bug: skia:8155 > Change-Id: I23399f442d52c73906829132f798eda260b6d4ae > Reviewed-on: https://skia-review.googlesource.com/143291 > Auto-Submit: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Osman <brianosman@google.com> Bug: skia:8155 Change-Id: Ia3843b66c2453daf15e566b7ecf890c2ff4aed22 Reviewed-on: https://skia-review.googlesource.com/143960 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Go back to cleaning up MIP levels on texture export rather than ↵Gravatar Mike Klein2018-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | assuming dirty" This reverts commit 01d6fc9d8415e400a7eac95518356ecf341aa5cb. Reason for revert: layout tests. Original change's description: > Go back to cleaning up MIP levels on texture export rather than assuming dirty > on texture import. > > Bug: skia:8155 > Change-Id: I23399f442d52c73906829132f798eda260b6d4ae > Reviewed-on: https://skia-review.googlesource.com/143291 > Auto-Submit: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Osman <brianosman@google.com> TBR=bsalomon@google.com,brianosman@google.com Change-Id: Ice4cb4e253e52d67eb8bd6e2a12ccc844b7bfa8d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:8155 Reviewed-on: https://skia-review.googlesource.com/143380 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Fix GPU explicit resource allocation bugGravatar Robert Phillips2018-07-25
| | | | | | | | | | | The explicit resource allocator assumes that it has complete control over the resources it hands out thus, they can have no pre-existing pending IO. Change-Id: I59d8d079d8b8514688c458a54424329b86922cb6 Reviewed-on: https://skia-review.googlesource.com/143300 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Go back to cleaning up MIP levels on texture export rather than assuming dirtyGravatar Brian Salomon2018-07-25
| | | | | | | | | | | on texture import. Bug: skia:8155 Change-Id: I23399f442d52c73906829132f798eda260b6d4ae Reviewed-on: https://skia-review.googlesource.com/143291 Auto-Submit: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* share helper for flagging when added to raster cacheGravatar Mike Reed2018-07-19
| | | | | | | | | | | Rename to clarify that it is a "raster" cache we're talking about. clean up -- motivated by looking to make the purge of a staleID synchronous Bug: skia: Change-Id: I87493690dd5a4f2ebd002e2635ebd0e44fe27320 Reviewed-on: https://skia-review.googlesource.com/142325 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Fix validity check in SkSurface::MakeFromBackendTextureAsRenderTargetGravatar Justin Novosad2018-07-17
| | | | | | | | | | | | | | | | | Swaped the order of validate_backend_texture() and SkSurface_Gpu::Valid() so that the pixel config computed by validate_backend_texture() get used by SkSurface_Gpu::Valid(). This makes the behavior of this method consistent with the behavior of sister method MakeFromBackendTexture() BUG=788439 Change-Id: I132ea8da23430ea99bbeabce79b08edb6b4cae03 Reviewed-on: https://skia-review.googlesource.com/141837 Commit-Queue: Justin Novosad <junov@chromium.org> Reviewed-by: Justin Novosad <junov@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Auto-Submit: Justin Novosad <junov@chromium.org>
* Remove SkTransferFunctionBehaviorGravatar Brian Osman2018-07-17
| | | | | | | | Bug: skia: Change-Id: Iccbe609b2a8d4c9098ef36aa6530dbc3771e0c11 Reviewed-on: https://skia-review.googlesource.com/141055 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Add bullet proofing to image_subset GM for TSAN failuresGravatar Robert Phillips2018-07-13
| | | | | | | | | | | | | | | | | | | The most common TSAN failure is: glmsaa8 gm image_subset with this stack trace: 5.73m /b/s/w/ir/build/dm(_ZNK7SkImage10makeSubsetERK7SkIRect+0x96) [0x1a7c356] /b/s/w/ir/build/dm(_ZNK7SkImage10makeSubsetERK7SkIRect+0x96) [0x1a7c356] 5.73m /b/s/w/ir/build/dm() [0x12cf587] /b/s/w/ir/build/dm() [0x12cf587] 5.73m /b/s/w/ir/build/dm(_ZN6skiagm8SimpleGM6onDrawEP8SkCanvas+0x25) [0x12ba205] Change-Id: Ife1c27af935ef3f56073360e9781a89fe8206586 Reviewed-on: https://skia-review.googlesource.com/141280 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Replace nearly all kRespect with kIgnoreGravatar Brian Osman2018-07-12
| | | | | | | | | | | | | | | | | | | | | | | | | | - Encoders and decoders always assume kIgnore. - They are less opinionated about F16 and color space, we just trust the color space that's passed in, and put that directly in the image (no sRGB encoding). - SkBitmap and SkPixmap read/write pixels functions were defaulting to kResepct, those are now always kIgnore. - Many other bits of plumbing are simplified, and I added a default of kIgnore to SkImage::makeColorSpace, so we can phase out that argument entirely. - Still need to add defaults to other public APIs that take SkTransferFunctionBehavior. - This makes gold think that we've dramatically changed the contents of all F16 images, but that's because it doesn't understand the (now linear) color space that's embedded. Once we triage them all once, they will work fine (and they'll look perfect in the browser). Bug: skia: Change-Id: I62fa090f96cae1b67d181ce14bd91f34ff2ed747 Reviewed-on: https://skia-review.googlesource.com/140570 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Remove old lazy image decoding heuristic logicGravatar Brian Osman2018-07-11
| | | | | | | | | | | This led to removing a lot of transfer function behavior code. There is more that could be done, and we need to add in decoding to dst color space, but this CL is almost entirely mechanical. Change-Id: I91b2169f95aadcfaacdd2b9821bb1a01ce53f9a6 Reviewed-on: https://skia-review.googlesource.com/140349 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@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>
* Use TextureProxy size directly in GrYUVToRGBEffect FragmentProcessorGravatar Weiliang Chen2018-07-03
| | | | | | | | | | | Instead of take extra input to indicate size for texture proxies of different planes, directly use texture proxy's size. Bug: skia:7903 Change-Id: I5d6c859510f7390948c6dcfbdd17343faa786aca Reviewed-on: https://skia-review.googlesource.com/130964 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Weiliang Chen <weiliangc@chromium.org>
* Reland "Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors."Gravatar Greg Daniel2018-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 34aa059c1502d67c9a5f4db449667a8709b69fb9. Reason for revert: <INSERT REASONING HERE> Original change's description: > Revert "Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors." > > This reverts commit ff2181e62e79ffd2ce628fc8c05b5457d4f54163. > > Reason for revert: suspect it's behind Chrome roll failure > > Original change's description: > > Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors. > > > > Bug: skia: > > Change-Id: I1466668e3502cd1e6e1f6aed4105e0f626d293dd > > Reviewed-on: https://skia-review.googlesource.com/138987 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com > > Change-Id: I4cba44858aafffbadc45e18349b93c741d7cfc66 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/139220 > Reviewed-by: Ethan Nicholas <ethannicholas@google.com> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Bug: skia: Change-Id: Ib1fd10c126862824f3e31c420c697ac749c637f5 Reviewed-on: https://skia-review.googlesource.com/139221 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove sRGB config checks based on color spaceGravatar Brian Osman2018-07-02
| | | | | | | | | | | | | | | | All of the restrictions/assumptions that led to this code are gone, so we can always use appropriate color space. For the YUV provider, if/when we re-introduce 8888 sRGB, the color space will have a linear transfer function, so the color space xform will automatically do what was happening here. That removes the last usage of framebuffer sRGB control, so we can remove all kinds of GrPaint and GrPipeline plumbing for that feature. Change-Id: I24af1d498dbc75210f92f8c61b10aa31eec022f6 Reviewed-on: https://skia-review.googlesource.com/138986 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Revert "Temporary fix for SkImage_Lazy handling of color spaces""Gravatar Brian Osman2018-06-28
| | | | | | | | | | | | This reverts commit e269310a09646c7df63039392782a078cc5256c6. Now guarded to avoid breaking Chrome. Bug: skia: Change-Id: I5d98b227c0388a730ad9b5e2e77adbb27dd445b8 Reviewed-on: https://skia-review.googlesource.com/137894 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* gpu: Expose GrContextPriv::abandoned in the public API.Gravatar Khushal2018-06-27
| | | | | | | | | | TBR=bsalomon@google.com Bug: 854416 Change-Id: Iab71ca6e4724a925b0b9791267aac5ddc34f5b15 Reviewed-on: https://skia-review.googlesource.com/137692 Reviewed-by: Khusal Sagar <khushalsagar@chromium.org> Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
* Handle F32 in lazy imageGravatar Brian Osman2018-06-26
| | | | | | | | | Bug: skia: Change-Id: Idec8259b48733830790a3957b41d204835d7be02 Reviewed-on: https://skia-review.googlesource.com/137705 Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Temporary fix for SkImage_Lazy handling of color spaces"Gravatar Brian Osman2018-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 439b99451445a9d61f0670bbe3f588f5b08f59fa. Reason for revert: Chrome tests failing. Original change's description: > Temporary fix for SkImage_Lazy handling of color spaces > > The aim is to always decode in the generator's color space, > with nonlinear blending. Eventually, we want to decode into > the destination color space, but that requires changing API > and caching flow. For now, this prevents linear premul when > decoding, and stops decoding to formats like F16 and sBGRA. > > Bug: skia: > Change-Id: I9efd909fa6a56df2547ad5955f109e113527f815 > Reviewed-on: https://skia-review.googlesource.com/136791 > Commit-Queue: Mike Klein <mtklein@google.com> > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,brianosman@google.com Change-Id: Ie15c585b69e4309c090c8aafbe3c2d20191caa4d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/137720 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@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>
* Temporary fix for SkImage_Lazy handling of color spacesGravatar Brian Osman2018-06-26
| | | | | | | | | | | | | | The aim is to always decode in the generator's color space, with nonlinear blending. Eventually, we want to decode into the destination color space, but that requires changing API and caching flow. For now, this prevents linear premul when decoding, and stops decoding to formats like F16 and sBGRA. Bug: skia: Change-Id: I9efd909fa6a56df2547ad5955f109e113527f815 Reviewed-on: https://skia-review.googlesource.com/136791 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Alternative fix for stale MIP maps on texture export/import.Gravatar Brian Salomon2018-06-21
| | | | | | | | | | | | | | | | | This change assumes imported textures in SkImages have dirty mip levels and disables regenerating the MIP levels on export (added in https://skia.googlesource.com/skia/+/930f939c48af1be6005af12bb6f709ca5da9d118). This is being done temporarily because it is a simpler change to cherry pick to earlier branches than https://skia.googlesource.com/skia/+/930f939c48af1be6005af12bb6f709ca5da9d118 Bug: chromium:850617 Change-Id: I7c90da782a0ed9014acd6a54ffdee1a0b34fa00c Reviewed-on: https://skia-review.googlesource.com/136788 Commit-Queue: Brian Salomon <bsalomon@google.com> Auto-Submit: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Remove GrNonlinearColorSpaceXformEffectGravatar Brian Osman2018-06-18
| | | | | | | | | | | Convert all uses to GrColorSpaceXformEffect Change-Id: Icc9d093a00450001c1b915db7a8676c9c66073b1 Reviewed-on: https://skia-review.googlesource.com/132090 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Remove const from (immutable) SkColorSpace args to some functionsGravatar Brian Osman2018-06-14
| | | | | | | | | | | | Another piece of https://skia-review.googlesource.com/c/skia/+/132090 that I'd like to land separately. Change-Id: I64d8968cf7e0fb0d288eca71c79d361410c924b8 Reviewed-on: https://skia-review.googlesource.com/134782 Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Allow caller to specify if the want mip maps in makeTextureImage call.Gravatar Greg Daniel2018-06-13
| | | | | | | | | | | | | | | Since Ganesh no longer will allocate mips late, this gives the clients a way to tell skia that they want the texture they will be using to have mips. It also supports allowing a client to take a non mipped texture backed image and turn it into a new image which is mipped and texture backed. Bug: chromium:834837 Change-Id: I1781ce618c22023b6309f248e7ee49e69bd3c6df Reviewed-on: https://skia-review.googlesource.com/134323 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Eric Karl <ericrk@chromium.org> Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Fall back to bilerp if we are undable to do a copy for mips.Gravatar Greg Daniel2018-06-08
| | | | | | | | Bug: skia: Change-Id: I52b86d83aaec1fa245be2ee17bbd56defcb5881f Reviewed-on: https://skia-review.googlesource.com/133587 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Reland "Reland "Require mips to be allocated at texture creation time and ↵Gravatar Greg Daniel2018-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | disable late allocations."" This reverts commit 01422bc8eff0c317b9c234b3b4f5a82f1011dfce. Reason for revert: follow on change may be ready Original change's description: > Revert "Reland "Require mips to be allocated at texture creation time and disable late allocations."" > > This reverts commit 9eb36b9eb8e81e970e02fa985ae82fe64de0a8f0. > > Reason for revert: Alpha8 isn't renderable on es2 so we end up dropping draws on certain A8 mip requests > > Original change's description: > > Reland "Require mips to be allocated at texture creation time and disable late allocations." > > > > This reverts commit 0c78238e2991c95b6fb3c945d4ad2b5d941ae21b. > > > > Reason for revert: <INSERT REASONING HERE> > > > > Original change's description: > > > Revert "Require mips to be allocated at texture creation time and disable late allocations." > > > > > > This reverts commit cd2c3f9055452d413d6be7ea6dc63fd1922fe994. > > > > > > Reason for revert: Looks to be causing angle failures on initial clear test > > > > > > Original change's description: > > > > Require mips to be allocated at texture creation time and disable late allocations. > > > > > > > > If we get a non-mipped texture for a draw that wants to be use mip map filter, we > > > > will copy the texture into a new mipped texture. > > > > > > > > Clean up of unused code in the GPU backends for reallocating for mips will be done > > > > in a follow up CL. > > > > > > > > Bug: skia: > > > > Change-Id: Idab588c1abf4bbbf7eeceb3727d500e5df274188 > > > > Reviewed-on: https://skia-review.googlesource.com/132830 > > > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > > > > > > > > > > > Change-Id: I49f0ace52f2586d61b451630b2e6aae84b420b81 > > > No-Presubmit: true > > > No-Tree-Checks: true > > > No-Try: true > > > Bug: skia: > > > Reviewed-on: https://skia-review.googlesource.com/133041 > > > Reviewed-by: Greg Daniel <egdaniel@google.com> > > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > > > Bug: skia: > > Change-Id: I004447a5f1ec72c3be2318ddea803f57efb12ea4 > > Reviewed-on: https://skia-review.googlesource.com/133340 > > 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: I9e9718d380c4d9927ec39e46008750ab7396391f > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/133680 > 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: Ic3df69f65a89962b21cdb50ee436a29fd121ab1f No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/133740 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Reland "Require mips to be allocated at texture creation time and ↵Gravatar Greg Daniel2018-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | disable late allocations."" This reverts commit 9eb36b9eb8e81e970e02fa985ae82fe64de0a8f0. Reason for revert: Alpha8 isn't renderable on es2 so we end up dropping draws on certain A8 mip requests Original change's description: > Reland "Require mips to be allocated at texture creation time and disable late allocations." > > This reverts commit 0c78238e2991c95b6fb3c945d4ad2b5d941ae21b. > > Reason for revert: <INSERT REASONING HERE> > > Original change's description: > > Revert "Require mips to be allocated at texture creation time and disable late allocations." > > > > This reverts commit cd2c3f9055452d413d6be7ea6dc63fd1922fe994. > > > > Reason for revert: Looks to be causing angle failures on initial clear test > > > > Original change's description: > > > Require mips to be allocated at texture creation time and disable late allocations. > > > > > > If we get a non-mipped texture for a draw that wants to be use mip map filter, we > > > will copy the texture into a new mipped texture. > > > > > > Clean up of unused code in the GPU backends for reallocating for mips will be done > > > in a follow up CL. > > > > > > Bug: skia: > > > Change-Id: Idab588c1abf4bbbf7eeceb3727d500e5df274188 > > > Reviewed-on: https://skia-review.googlesource.com/132830 > > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > > > > > > > Change-Id: I49f0ace52f2586d61b451630b2e6aae84b420b81 > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: skia: > > Reviewed-on: https://skia-review.googlesource.com/133041 > > Reviewed-by: Greg Daniel <egdaniel@google.com> > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Bug: skia: > Change-Id: I004447a5f1ec72c3be2318ddea803f57efb12ea4 > Reviewed-on: https://skia-review.googlesource.com/133340 > 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: I9e9718d380c4d9927ec39e46008750ab7396391f No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/133680 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* rebaseGravatar Cary Clark2018-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 32a4910e57b1fdd3c8671de1ee85e05ca21d079f. Reason for revert: SkMatrix::toString use has been removed from flutter and has been picked up in fuchsia Additionally some bookmaker changes take into account recent additions of typedef comments and the generated header comment. Original change's description: > Revert "remove toString" > > This reverts commit 5191880cbf3ee4d122b0d11b4945fbab0784fda7. > > Reason for revert: broke flutter > > Original change's description: > > remove toString > > > > toString may have been used by obsolete debugger only > > find out if that is so > > > > R=​brianosman@google.com,bsalomon@google.com > > > > Docs-Preview: https://skia.org/?cl=119894 > > Bug:830651 > > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd > > Reviewed-on: https://skia-review.googlesource.com/119894 > > Commit-Queue: Cary Clark <caryclark@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org > > Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c TBR=bsalomon@google.com,brianosman@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Reviewed-on: https://skia-review.googlesource.com/129623 Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@google.com> Docs-Preview: https://skia.org/?cl=133583 Bug: 830651 Change-Id: If8499e796be63580ad419e150e94d43e8b89de1b Reviewed-on: https://skia-review.googlesource.com/133583 Commit-Queue: Cary Clark <caryclark@skia.org> Auto-Submit: Cary Clark <caryclark@skia.org>
* Fix A2B JPEG images on GPU backed xform or color-managed canvasGravatar Brian Osman2018-06-08
| | | | | | | | | | | | | | | | | | | | | | | | A2B images can't be transformed on the GPU, so ensure that they're "converted" before being uploaded. (This may just create a new lazy image with an updated color space). Then, when we're converting JPEG images (YUV) to textures, don't allow GPU decode if the result needs to go through A2B conversion (again, we can't do this). In that case, we just ask the generator (codec) for RGB data, which will trigger correct CPU conversion before the upload. Eventually this will be rewritten further, because we won't allow A2B data in SkColorSpace, but for now this fixes a problem that's not actually affecting any clients, but is blocking a GrColorSpaceXform refactor. Change-Id: I1ebef4a90773d21ec4011ed1ac16aed486ba5539 Reviewed-on: https://skia-review.googlesource.com/133447 Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Reland "Require mips to be allocated at texture creation time and disable ↵Gravatar Greg Daniel2018-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | late allocations." This reverts commit 0c78238e2991c95b6fb3c945d4ad2b5d941ae21b. Reason for revert: <INSERT REASONING HERE> Original change's description: > Revert "Require mips to be allocated at texture creation time and disable late allocations." > > This reverts commit cd2c3f9055452d413d6be7ea6dc63fd1922fe994. > > Reason for revert: Looks to be causing angle failures on initial clear test > > Original change's description: > > Require mips to be allocated at texture creation time and disable late allocations. > > > > If we get a non-mipped texture for a draw that wants to be use mip map filter, we > > will copy the texture into a new mipped texture. > > > > Clean up of unused code in the GPU backends for reallocating for mips will be done > > in a follow up CL. > > > > Bug: skia: > > Change-Id: Idab588c1abf4bbbf7eeceb3727d500e5df274188 > > Reviewed-on: https://skia-review.googlesource.com/132830 > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > > > Change-Id: I49f0ace52f2586d61b451630b2e6aae84b420b81 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/133041 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> Bug: skia: Change-Id: I004447a5f1ec72c3be2318ddea803f57efb12ea4 Reviewed-on: https://skia-review.googlesource.com/133340 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Require mips to be allocated at texture creation time and disable ↵Gravatar Greg Daniel2018-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | late allocations." This reverts commit cd2c3f9055452d413d6be7ea6dc63fd1922fe994. Reason for revert: Looks to be causing angle failures on initial clear test Original change's description: > Require mips to be allocated at texture creation time and disable late allocations. > > If we get a non-mipped texture for a draw that wants to be use mip map filter, we > will copy the texture into a new mipped texture. > > Clean up of unused code in the GPU backends for reallocating for mips will be done > in a follow up CL. > > Bug: skia: > Change-Id: Idab588c1abf4bbbf7eeceb3727d500e5df274188 > Reviewed-on: https://skia-review.googlesource.com/132830 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I49f0ace52f2586d61b451630b2e6aae84b420b81 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/133041 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Require mips to be allocated at texture creation time and disable late ↵Gravatar Greg Daniel2018-06-07
| | | | | | | | | | | | | | | | allocations. If we get a non-mipped texture for a draw that wants to be use mip map filter, we will copy the texture into a new mipped texture. Clean up of unused code in the GPU backends for reallocating for mips will be done in a follow up CL. Bug: skia: Change-Id: Idab588c1abf4bbbf7eeceb3727d500e5df274188 Reviewed-on: https://skia-review.googlesource.com/132830 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Remove color space restrictions from image infosGravatar Brian Osman2018-06-04
| | | | | | | | | | | What makes an info valid (or invalid)? Nothing to do with color space. Bug: skia: Change-Id: I6795efa9aa74ab0d65935c5ddccc1058f8e0b112 Reviewed-on: https://skia-review.googlesource.com/131780 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Dest color space no longer impacts mipmaps or texture samplingGravatar Brian Osman2018-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PS5: Removes SkDestinationSurfaceColorMode, tracking of mipmap mode on GrTexture, sRGB decode state per-texture. Because we were often choosing sRGB configs for RGB color types, legacy rendering would then be incorrect (too dark). So... PS7: Stops ever using sRGB pixel configs when translating image info or color type. Also removes a bunch of GrCaps bits and a GrContextOption that are no longer relevant. PS9: Adjusts surface creation unit test expectations, and changes the raster rules accordingly. At this point, sRGB configs are (obviously) going to be broken. Locally, I ran 8888, gl, and the gbr- versions of both. Across all GMs x configs, there are 13 diffs. 12 are GMs that create surfaces with a color-space attached (and thus, the offscreen is no longer getting sRGB pixel config). The only remainder constructs an SkPictureImageGenerator, (with an attached color space) and renders it to the gbr-gl canvas, which triggers a a tagged surface inside the generator. Bug: skia: Change-Id: Ie5edfa157dd799f3121e8173fc4f97f6c8ed6789 Reviewed-on: https://skia-review.googlesource.com/131282 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Reland "remove toString""Gravatar Cary Clark2018-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 92e37b6d79f12ccfaaf7671413316952d182267d. Reason for revert: toString still used by flutter Original change's description: > Reland "remove toString" > > This reverts commit 32a4910e57b1fdd3c8671de1ee85e05ca21d079f. > > Reason for revert: SkMatrix::toString use has been removed from flutter and has been picked up in fuchsia > > Original change's description: > > Revert "remove toString" > > > > This reverts commit 5191880cbf3ee4d122b0d11b4945fbab0784fda7. > > > > Reason for revert: broke flutter > > > > Original change's description: > > > remove toString > > > > > > toString may have been used by obsolete debugger only > > > find out if that is so > > > > > > R=​brianosman@google.com,bsalomon@google.com > > > > > > Docs-Preview: https://skia.org/?cl=119894 > > > Bug:830651 > > > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd > > > Reviewed-on: https://skia-review.googlesource.com/119894 > > > Commit-Queue: Cary Clark <caryclark@google.com> > > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > > TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org > > > > Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: 830651 > > Reviewed-on: https://skia-review.googlesource.com/129340 > > Reviewed-by: Cary Clark <caryclark@google.com> > > Commit-Queue: Cary Clark <caryclark@google.com> > > TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org > > # Not skipping CQ checks because original CL landed > 1 day ago. > > Bug: 830651 > Change-Id: Ida8725b6051132d8c46faf99358a8fcc1bcabf34 > Reviewed-on: https://skia-review.googlesource.com/129623 > Reviewed-by: Cary Clark <caryclark@skia.org> > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Cary Clark <caryclark@google.com> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org Change-Id: Iafc59ffc1b3db67c520ba31bf12d68e1b46c0ea2 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 830651 Reviewed-on: https://skia-review.googlesource.com/131082 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Reland "remove toString"Gravatar Cary Clark2018-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 32a4910e57b1fdd3c8671de1ee85e05ca21d079f. Reason for revert: SkMatrix::toString use has been removed from flutter and has been picked up in fuchsia Original change's description: > Revert "remove toString" > > This reverts commit 5191880cbf3ee4d122b0d11b4945fbab0784fda7. > > Reason for revert: broke flutter > > Original change's description: > > remove toString > > > > toString may have been used by obsolete debugger only > > find out if that is so > > > > R=​brianosman@google.com,bsalomon@google.com > > > > Docs-Preview: https://skia.org/?cl=119894 > > Bug:830651 > > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd > > Reviewed-on: https://skia-review.googlesource.com/119894 > > Commit-Queue: Cary Clark <caryclark@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org > > Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: 830651 > Reviewed-on: https://skia-review.googlesource.com/129340 > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Cary Clark <caryclark@google.com> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 830651 Change-Id: Ida8725b6051132d8c46faf99358a8fcc1bcabf34 Reviewed-on: https://skia-review.googlesource.com/129623 Reviewed-by: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Add DDL to SKPBenchGravatar Robert Phillips2018-05-30
| | | | | | | | | | | Most of this CL is just repackaging the promise image and tile code from ViaDDL for reuse by SKPBench. Change-Id: Ie5003c36fe85cc5be9639552f9488b8e92dcdbbf Reviewed-on: https://skia-review.googlesource.com/129805 Reviewed-by: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* support image-subsets in serializationGravatar Mike Reed2018-05-29
| | | | | | | | | | | A follow-on API change *could* be to extend the SerialProcs to pass subset information up to the client, in case they want to handle the subsetting step themselves. Bug: skia:7983 Change-Id: I36d3f1ce439886384495485c3be3c591d611a135 Reviewed-on: https://skia-review.googlesource.com/130543 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Make SkImage own its GrContext.Gravatar Brian Salomon2018-05-24
| | | | | | | Change-Id: I86577fab5406ae9ad89d87fa971b0db6e0283cb4 Reviewed-on: https://skia-review.googlesource.com/130020 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add usage of SkYUVAIndex as pre-step to transfer to new YUVA APIGravatar Weiliang Chen2018-05-23
| | | | | | | | | | | | | | The plan foward is to have a new API on SkImage to make from YUVA textures which a combination of array of textures and array of SkYUVAIndex struct indicating which texture and channel to read for each plane. This is a pre-step to let the old API use these ideas. Bug: skia: 7903 Change-Id: I6a696db31a574247eb2abff60f2186a74b640142 Reviewed-on: https://skia-review.googlesource.com/128601 Commit-Queue: Weiliang Chen <weiliangc@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Reland "Remove GrBackendObject and all related functions from Skia."Gravatar Greg Daniel2018-05-21
| | | | | | | | | | | | | | | | | | | This is a reland of ccd4cfc23ebbbecbc6b292359352aad335ad7b73 Original change's description: > Remove GrBackendObject and all related functions from Skia. > > Bug: skia: > Change-Id: I59434b7477c0bc26fd982bd81eb97ab94bbba073 > Reviewed-on: https://skia-review.googlesource.com/125822 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> Bug: skia: Change-Id: Ibd1b9bd04b36840d9d872e2f0970dd6bac378bc9 Reviewed-on: https://skia-review.googlesource.com/129380 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "remove toString"Gravatar Cary Clark2018-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5191880cbf3ee4d122b0d11b4945fbab0784fda7. Reason for revert: broke flutter Original change's description: > remove toString > > toString may have been used by obsolete debugger only > find out if that is so > > R=​brianosman@google.com,bsalomon@google.com > > Docs-Preview: https://skia.org/?cl=119894 > Bug:830651 > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd > Reviewed-on: https://skia-review.googlesource.com/119894 > Commit-Queue: Cary Clark <caryclark@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 830651 Reviewed-on: https://skia-review.googlesource.com/129340 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* remove toStringGravatar Cary Clark2018-05-20
| | | | | | | | | | | | | | toString may have been used by obsolete debugger only find out if that is so R=brianosman@google.com,bsalomon@google.com Docs-Preview: https://skia.org/?cl=119894 Bug:830651 Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd Reviewed-on: https://skia-review.googlesource.com/119894 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove SK_IGNORE_SKIMAGE_ONREFENCODED_CHANGE.Gravatar Ben Wagner2018-05-17
| | | | | | | | | All implementers have been updated, so remove the flag and old code. Change-Id: Ie9747f37dd0ea3f1db682891bcae2496a470bc3a Reviewed-on: https://skia-review.googlesource.com/128883 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* SkImage::onRefEncoded to return sk_sp.Gravatar Ben Wagner2018-05-16
| | | | | | | | | | | | This changes SkImage::onRefEncoded and downstack calls to return sk_sp. All of the values returned are already sk_sp, so this just updates the API. This change is currently behind the new flag SK_IGNORE_SKIMAGE_ONREFENCODED_CHANGE so that Chromium can be updated. Change-Id: Ic53a88ae23fa8b3b41b84c4abdc4b74e9879da38 Reviewed-on: https://skia-review.googlesource.com/128311 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* remove typedef InfoGravatar Cary Clark2018-05-15
| | | | | | | | | | | | | | | | | | typedef SkImageInfo Info saves a little typing at the cost of obfuscating the parameter type. It's only used in a couple of places so remove it. The documentation catalog has gotten a bit stale, so update that as well. Docs-Preview: https://skia.org/?cl=128400 Bug: skia:6898 Change-Id: I621743a2b2d9a78d5f62742501eebf5f4327efa0 Reviewed-on: https://skia-review.googlesource.com/128400 Commit-Queue: Cary Clark <caryclark@skia.org> Commit-Queue: Brian Salomon <bsalomon@google.com> Auto-Submit: Cary Clark <caryclark@skia.org> Reviewed-by: Brian Salomon <bsalomon@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>
* Revert "Remove GrBackendObject and all related functions from Skia."Gravatar Brian Osman2018-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ccd4cfc23ebbbecbc6b292359352aad335ad7b73. Reason for revert: Fuchsia not building again. (Flutter roll may have been reverted?) Original change's description: > Remove GrBackendObject and all related functions from Skia. > > Bug: skia: > Change-Id: I59434b7477c0bc26fd982bd81eb97ab94bbba073 > Reviewed-on: https://skia-review.googlesource.com/125822 > 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: Ie2c518b84b0c9513c0c622082de2831088b1ad8d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/127480 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@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>