Bug: skia:6880
Change-Id: Ia8b94e52eec3feb5104d2351bf7a7e6f99101deb
Reviewed-on: https://skia-review.googlesource.com/26370
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Also adds testing of copying ImageStorageAccess and ref counts of proxies held by cloned FPs.
Change-Id: Ia23220bf65b4df83d1c874b46d8525cc3540f716
Reviewed-on: https://skia-review.googlesource.com/28004
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
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>
Change-Id: I71cf04b12be95a54b7fb47d048ba1f8672ed9a8f
Reviewed-on: https://skia-review.googlesource.com/27760
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
This reverts commit a4ce4b1f6b.
Fix SkPathRef deserialization malloc crash
If the path says it has more points/verbs/etc than the buffer could
be holding, then resetToSize could try to allocate something huge
and crash.
Bug: skia:
Change-Id: I23b8870e9f74386aca89fb8f9a60d3b452044094
Reviewed-on: https://skia-review.googlesource.com/26805
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
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>
This reverts commit df6660f64e.
Reason for revert: crashing dm on android and windows
Original change's description:
> Fix SkPathRef deserialization malloc crash
>
> If the path says it has more points/verbs/etc than the buffer could
> be holding, then resetToSize could try to allocate something huge
> and crash.
>
> Change-Id: I40e8db87e4f61abb23217281ab0365c6af222fa3
> Reviewed-on: https://skia-review.googlesource.com/24802
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
TBR=bungeman@google.com,reed@google.com,enne@chromium.org
Change-Id: I06fa89c05b785652b097ae04e7ebc001a7c176b2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/26944
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
If the path says it has more points/verbs/etc than the buffer could
be holding, then resetToSize could try to allocate something huge
and crash.
Change-Id: I40e8db87e4f61abb23217281ab0365c6af222fa3
Reviewed-on: https://skia-review.googlesource.com/24802
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
- 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>
I was going to be clever here and only clamp when we
know the inputs are out of range, but this filter is
rare and slow enough that I think I'd rather it just
be super paranoid safe.
The test crashes without this fix and passes with it.
Change-Id: I4e17aad2b5c1e96180ce8d73b97bee746cf985c2
Reviewed-on: https://skia-review.googlesource.com/26702
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:
Change-Id: I8c0abf16d5eb366cdc5296f8df9f33cc0e8f4cc4
Reviewed-on: https://skia-review.googlesource.com/26662
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Improve GrGLNonlinearColorSpaceXformEffect to correctly implement
scRGB transfer function and allow for negative colors.
Relax SkSurface_Gpu::Valid to allow kRGBA_half_GrPixelConfig
render target without a color space needed for legacy blending on
Android.
Bug: b/62347704
Change-Id: Ibc6144e69c26cdbdcbf29348c4f612fb6b639e01
Reviewed-on: https://skia-review.googlesource.com/26143
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Will need guards for android (at least)
Bug: skia:
Change-Id: I2bb8e656997984489ef1f2e41cd3d301c4e7b947
Reviewed-on: https://skia-review.googlesource.com/26040
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
We occasionally make copies of GrPaints. clone() fill facilitate this case when GrFragmentProcessors are non-shareable..
Change-Id: I004e34f6ce8c293f9e0664d26532e44bd6b9fdff
Reviewed-on: https://skia-review.googlesource.com/26360
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Change-Id: I562d438bd65e9fd900cfc6831f971b4af25c8ae6
Reviewed-on: https://skia-review.googlesource.com/26361
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This is part of setting the stage for moving GrFragmentProcessor to unique_ptr ownership.
Change-Id: I2dfb4977319605d56c4debe05ff0b3dc970bb4c5
Reviewed-on: https://skia-review.googlesource.com/26141
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit cd1416efbc.
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>
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>
This reverts commit 467022b186.
Reason for revert: GrAHardwareBufferImageGenerator.cpp
Original change's description:
> Reduce dependence on GrSurface's origin field
>
> Unfortunately, GrGPU and its ilk are still using the GrSurface's origin a lot. I will clean that up in a second CL.
>
> Change-Id: Iba729440ce8ea8d24bb7f4e5de55ed576a0f176d
> Reviewed-on: https://skia-review.googlesource.com/24700
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com
Change-Id: I1b3f5c3b82d250ac164beb1d5c83abb6c3c6ab3b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/25620
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Unfortunately, GrGPU and its ilk are still using the GrSurface's origin a lot. I will clean that up in a second CL.
Change-Id: Iba729440ce8ea8d24bb7f4e5de55ed576a0f176d
Reviewed-on: https://skia-review.googlesource.com/24700
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
[√] convert all stages to use SkJumper_MemoryCtx / be 2d-compatible
[√] convert compile to 2d also, remove 1d run/compile
[√] convert all call sites
[√] no diffs
Change-Id: I3b806eb8fe0c3ec043359616409f7cd1211a1e43
Reviewed-on: https://skia-review.googlesource.com/24263
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
This is mostly dead code.
In order to make it truly dead, we need to opt drawing unpremul images
into SkRasterPipelineBlitter. They had been handled by
SkLinearBitmapPipeline, but can't be draw by SkBitmapProcLegacyShader.
Drawing unpremul images is tested by the GM all_variants_8888, which
gave us trouble last time around (serialize-8888 drew right, 8888 wrong)
but now draws fine. I think this was probably also the root of the
revert, drawing some unpremul image in Chrome's tests somewhere.
Change-Id: I453f9df44ade807316935921cbae82961e2f08aa
Reviewed-on: https://skia-review.googlesource.com/24862
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
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>
Previously, we reported the first image as soon as it was available. As
a result, in crrev.com/2565323003, InitializeNewFrame might be called
before the metadata is known, meaning it would read the wrong metadata.
Instead of looking at the imagesCount(), SkGifCodec::NewFromStream looks
at frameContext(0), which may still exist even if it's not yet counted
in imagesCount().
Add a test that confirms the desired behavior.
Change-Id: Ib392721ecd2218ba0fcd35aaa64117c0ba3e4ea6
Reviewed-on: https://skia-review.googlesource.com/24405
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
gather_i8 is now unused, so we can remove it.
That in turn makes the ctable field of SkJumper_GatherCtx unused.
After removing ctable, SkJumper_GatherCtx and SkJumper_PtrStride look
identical, so I've now fused them into SkJumper_MemoryCtx, which will
eventually be used by everything loading from, gathering from, or
storing to memory.
Change-Id: Ia882d2dbd54c9fcf9a8250a1ce83304389dd284a
Reviewed-on: https://skia-review.googlesource.com/24085
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
- Add run_2d(x,y,w,h) and start_pipeline_2d().
- Add and test a 2d-compatible store_8888_2d stage.
Change-Id: Ib9c225d1b8cb40471ae4333df1d06eec4d506f8a
Reviewed-on: https://skia-review.googlesource.com/24401
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Needs google3 to be updated before this can land.
Bug: skia:6828
Change-Id: I2c16be13c6937ffa48768cc24f9f980171c824d6
Reviewed-on: https://skia-review.googlesource.com/23940
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>