This will allow a subclass to rewrite a Statement or Expression when
visiting it.
Change-Id: Ia8b3121dd0558f2fbbd035d38f7caec9414fe8c3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382756
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I30e4b37a43d1301d9e8011c9952874f3ba8d4f8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383702
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Replaces it with GrAA. This op always uses analytic coverage,
regardless of MSAA state.
Bug: skia:11396
Change-Id: I75174a00bdb3b1f62319de5970aac7f1bbae8e10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383418
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:11730
Change-Id: Icbb1f6acf31e3f130cb48338a1c44ca14f40e587
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383697
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
This is conceptually the same thing, but we have various places in the
code which expect a unique_ptr<Statement>, and they don't allow a
unique_ptr<SwitchCase> to be passed in, since the types don't match.
This change is particularly relevant to the ProgramWriter, which will be
updated in a followup CL to pass the unique_ptr to visit methods.
Change-Id: I012669fa429a13658ac2be31342c92750fe84b92
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382723
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Dead-function-removal and dead-global-removal was implemented directly
inside of Compiler::optimize(). This code has been broken out into
separate helper functions for clarity.
Additionally, dead-function elimination was guarded by a ProgramSetting,
but dead-variable elimination was only guarded by fOptimize. A new flag
for dead-variable elimination was added for consistency.
Change-Id: I783501362762dad08262ffb92602d02ec079ed9b
Bug: skia:11319
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382917
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Confirmed that this fixes the linked fuzzer bug.
I opted to leave the the backend implementations of
onGetDefaultBackendFormat unchanged, since they technically check
for unknown backend-specific formats before returning an invalid
GrBackendFormat object. It just so happens that this mapping always
ensures GrColorType::kUnknown has an unknown backend-specific format.
Presumably there are other known GrColorTypes that may be unknown
for a specific backend, so those low-level checks are still needed.
Now, we just check the GrColorType in GrCaps before calling the
virtual. This avoids trying to create an invalid format for
GrMockCaps and allows GrBitmapTextureMaker to convert unsupported
color types ot rgba8 even with the mock backend.
Bug: chromium:1185960
Change-Id: I043eb6730efe30884b4180768229b94d35d32047
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383036
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
We are seeing a crash in a flutter desktop linux application with the
the issue pointing to a sized delete mismatch:
debugallocation.cc:788] RAW: delete size mismatch: passed size 160 !=
requested / available size 192 / 192
This patch fixes the issue. The crash started after the roll that
brought in https://skia-review.googlesource.com/c/skia/+/382701
See fxbug.dev/71987 for more info
Change-Id: I635ce5190d82ea96e1070e0509e543934379b776
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383456
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
We no longer derive a performance benefit from this pass in practice,
and it is a very expensive compilation step. It is also prone to fuzz-
related errors.
Doc: http://go/optimization-in-sksl
Change-Id: Ief08ffac659a8fe7fe92c92b9a5da14c9f713bc2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/381261
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Previously even if we release/abanoned a resource we would still return
GrBackendSurfaces from these queries even if the actual backend api
objects are no longer valid.
This hopefully fixes the attached chrome bug, but can't know for sure.
Bug: chromium:1186623
Change-Id: Ib1c03699c2c7d81f6d305428dfbf39d647d28373
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382918
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
c054008f9e..44b9579cf7
2021-03-10 m.maiya@samsung.com Vulkan: Treat varyings in a separable program as active
2021-03-10 ianelliott@google.com Revert "Roll vulkan-deps from 6691fcec0bce to 32692e5de307 (12 revisions)"
2021-03-10 jonahr@google.com Mtl: Add Apple vendor ID
2021-03-10 ianelliott@google.com Revert "Roll vulkan-deps from 32692e5de307 to 28d8c3478e4c (6 revisions)"
2021-03-10 m.maiya@samsung.com Vulkan: Pass in the correct size to acquireBufferHelper
2021-03-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 32692e5de307 to 28d8c3478e4c (6 revisions)
2021-03-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 031d7b5c5879 to 075d29b4983b (268 revisions)
2021-03-10 lubosz.sarnecki@collabora.com capture_replay_tests: Change status to crashing.
2021-03-10 lubosz.sarnecki@collabora.com capture_gles_ext_params: Implement glGetIntegervRobustANGLE.
2021-03-10 syoussefi@chromium.org Vulkan: Fix MemoryBarrier function name typos
2021-03-10 syoussefi@chromium.org Vulkan: Move SpirvBlob definition to common/
2021-03-10 syoussefi@chromium.org Vulkan: Create unresolve shader directly in SPIR-V
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC kjlubick@google.com on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md
Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: kjlubick@google.com
Test: Test: ProgramPipelineTest31.VaryingIOBlockSeparableProgram*
Change-Id: Ice60be3d3cbb768e0ab5861cb72d46262431dfef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383476
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
This declutters the atlas generation code so there are fewer variables.
Next we will delete all the lower level rendering code and render the
atlas with stencilPath/stencilRect instead.
Bug: chromium:1158093
Change-Id: I36cff285d0f7de6f8ece4b027e62ae84aa01adc8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/380656
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Previously, a declared then never-read variable was not present at all.
This also adds an `fDeclared` field to VariableCounts, which tracks the
presence of a VarDeclaration for a variable. `fDeclared` allows us to
distinguish between the cases of a declared but completely inert
local variable, and a variable whose declaration has actually been
eliminated.
Change-Id: I1d7238a257997814e0d978d76b98005541b8a6bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383156
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Hopefully this is only temporary until we start using the default path
renderers to draw the atlas.
Change-Id: Ife2c5bccd0cd7a980bde8faa5178f9fb151fbdff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383017
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This allows us to try skvm blitter, which might succeed with
the clipshader.
Change-Id: I771d4d389ae59ffd76e742cd223798f17582fedc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383096
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Abandoning would cause us to unref all the command buffer usages, but
then in notifyARefIsZero we would delete the abandoned resources even
though we still had a real ref. Then when that ref went away we would
crash.
Change-Id: I05dc2ba9a67c35c36a36704f4b81d6eef4e860e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382916
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This is a reland of dc3d678712
All previous attempts tried to use variants of
thread_local std::unique_ptr<char> gCache;
This did not work on Android or Flutter because thread_local
variables with dtors failed in various ways.
This CL keep the cache from leaking bytes by clearing the
cache in the GrRecordingContext's destructor.
Original change's description:
> Reland "cache the creation of one GrAtlasTextOp"
>
> This is a reland of 4b1fb7ca90
>
> Original change's description:
> > cache the creation of one GrAtlasTextOp
> >
> > GrAtlasTextOp has a high probability of being merged with the
> > previous op. This cache keeps using the same op to merge with
> > keeping memory warm.
> >
> > This show about 5.75% improvement in skpbench on desk_nytimes.
> >
> > When compiling for ios 9 or earlier, this optimization is
> > disabled.
> >
> > Change-Id: I13ccbef6dcd4b9d82103bf20bba7d94f3e4fb6f4
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376718
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Herb Derby <herb@google.com>
>
> Change-Id: I935a2965062b1fddb28806e85eb0fe055ba46ec2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/380320
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Change-Id: I62f572583524c506488ba982f5047a8f0126f3dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382701
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Herb Derby <herb@google.com>
It was copying strings back and forth for no benefit.
Change-Id: I5ee2c0a6d1d0f96fb7449d1e540e4d9db0d97dc2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382776
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Only text string + size for now, we can surface more if needed.
Change-Id: I4b40c1bb5e27ea5fc4ed20a1214c4eeb04bf1ca8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382279
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Change-Id: Ide8d7d0f91748fc1e2235cf94f310f6d51084ee3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382759
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This needed to be updated to match changes in
http://review.skia.org/382476. It is not tested on any of the normal
CQ trybots.
Change-Id: I3c0843d8e77958192c0db9ad8f6b797aec887fe4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382757
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
SkRRectPriv::IsSimpleCircular does a tolerance-based check for the
rrect radii but not for determining if the rrect is simple. This adds
IsNearlySimpleCircular as a looser check, since we don't care in this
case that the rrect is perfectly simple.
Bug: skia:11717
Change-Id: Ibbd53ff8c120287339fa29f87f064e6fb633ee7c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382703
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This crossed in the mail with http://review.skia.org/382476
Change-Id: I09ca2ff20bb2dc0846b591893d06823577faea29
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382758
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Change-Id: I3edc1812f74319abeb13d94cf7e2426bd68b57a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382282
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
For things like path rendering we can (and should) do better than an
atlas. But for use cases like "many small paths clipped by many small
paths," an atlas is probably still the best solution we have.
Change-Id: Iff5d250d0d6ccba9235f3fe652891554e3fdfc24
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/380856
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This is useful because it allows the variables to be declared as `const`
when they are trivial values like `half4(1)`. This enables the constant
folder to simplify or eliminate them. In most cases, this is only a
small benefit, as you'd expect a competent GPU driver to do the same.
However, Mali-400 can benefit significantly from optimizing away the
multiplication against a constant half4(1) coverage in Porter-Duff.
Mali-400 performance is back to normal: http://screen/3cDxdaGkYE8oBcS
Change-Id: I21fd23f91f747079cd05b082f7b3444aeabafb93
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382476
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This block no longer appears to provide any benefit; we mangle variable
names to prevent name collisions already.
Change-Id: I970a9d55ed5a77b93ff611e6a58e9424db78f6db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382396
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
When optimization is disabled, I did not expect to see arithmetic like
`color * ONE` disappear (even though it's just a constant fold):
const vec4 ONE = half4(1);
vec4 x = color * ONE;
Change-Id: Id24a632712591c73a904b90e5efdba092d846c0e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382477
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
As you might expect, a function tagged with `noinline` will never be
considered as a candidate for inlining.
Change-Id: Ia098f8974e6de251d78bb2a76cd71db8a86bc19c
Bug: skia:11362
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382337
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
9bc9ac8df8..c054008f9e
2021-03-09 m.maiya@samsung.com Vulkan: Check buffer usage before unmapping
2021-03-09 cnorthrop@google.com Tests: Add Extreme Car Driving Simulator trace
2021-03-09 cnorthrop@google.com Capture/Replay: Fix compressed cube textures
2021-03-09 m.maiya@samsung.com Vulkan: Collect inactive varyings by block name for I/O blocks
2021-03-09 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 76f6150ffdeb to 031d7b5c5879 (832 revisions)
2021-03-09 m.maiya@samsung.com Call resolveLink in Program::attachShader and Program::detachShader
2021-03-09 ynovikov@chromium.org Update Xcode used by standalone Mac builders to 12.4
2021-03-09 ianelliott@google.com Work-around eglSwapBuffersWithDamageKHR() bug
2021-03-09 jmadill@chromium.org Allow graceful no-error failure in CastStateValues.
2021-03-09 penghuang@chromium.org Reland "Fix bindFramebuffer problem with GLES2 devices"
2021-03-09 penghuang@chromium.org Reland "Fix two issues with GLES2 devices"
2021-03-09 penghuang@chromium.org Revert "Vulkan: Support EXT_sRGB_write_control"
2021-03-09 penghuang@chromium.org Revert "Fix bindFramebuffer problem with GLES2 devices"
2021-03-09 penghuang@chromium.org Revert "Fix two issues with GLES2 devices"
2021-03-09 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from de7d5775ab25 to 023914a27b63 (2 revisions)
2021-03-09 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 6691fcec0bce to 32692e5de307 (12 revisions)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC kjlubick@google.com on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md
Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: kjlubick@google.com
Test: Test: Black Desert MobileTest: Test: GLSLTest_ES31.VaryingIOBlockNotDeclaredIn*Shader*Test: Test: Grand Theft Auto: San AndreasTest: Test: MEC for Extreme Car Driving SimulatorTest: Test: angle_perftests --gtest_filter="*extreme_car_driving_simulator*"
Change-Id: I2ad7a6ee32d4a6331d0a1bd225b52684a2bc21a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382516
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
This reverts commit dc3d678712.
Reason for revert: Crashing on exit thread handler
Original change's description:
> Reland "cache the creation of one GrAtlasTextOp"
>
> This is a reland of 4b1fb7ca90
>
> Original change's description:
> > cache the creation of one GrAtlasTextOp
> >
> > GrAtlasTextOp has a high probability of being merged with the
> > previous op. This cache keeps using the same op to merge with
> > keeping memory warm.
> >
> > This show about 5.75% improvement in skpbench on desk_nytimes.
> >
> > When compiling for ios 9 or earlier, this optimization is
> > disabled.
> >
> > Change-Id: I13ccbef6dcd4b9d82103bf20bba7d94f3e4fb6f4
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376718
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Herb Derby <herb@google.com>
>
> Change-Id: I935a2965062b1fddb28806e85eb0fe055ba46ec2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/380320
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
TBR=bsalomon@google.com,herb@google.com,michaelludwig@google.com
Change-Id: I3bc3329580460fcf8c0b49f655a88cb902da3d58
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382556
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This is a reland of 4b1fb7ca90
Original change's description:
> cache the creation of one GrAtlasTextOp
>
> GrAtlasTextOp has a high probability of being merged with the
> previous op. This cache keeps using the same op to merge with
> keeping memory warm.
>
> This show about 5.75% improvement in skpbench on desk_nytimes.
>
> When compiling for ios 9 or earlier, this optimization is
> disabled.
>
> Change-Id: I13ccbef6dcd4b9d82103bf20bba7d94f3e4fb6f4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376718
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
Change-Id: I935a2965062b1fddb28806e85eb0fe055ba46ec2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/380320
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Currently, only one of three uses (local variables) does this correctly.
Bug: skia:11716
Change-Id: Iad11e8e5998fcc7caee4d438e0558c5d4e2b1821
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382277
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
With skia-review.googlesource.com/c/skia/+/363782, both cpu and gpu
backends would gracefully fail readPixel requests where dst row bytes
wasn't a multiple of dst bpp. It also updated the cpu backend's
writePixels behavior to gracefully reject writePixels requests where
the src row bytes wasn't a multiple of src bpp.
GPU writePixels would not detect this and later trigger an assert
in debug builds in GrConvertPixels (caught by the linked fuzzer bug).
This adds tests to mirror the read pixels bad-row-bytes tests and
updates GrSurfaceContext::writePixels to check src row bytes vs. bpp.
I confirmed it fixes the fuzzer crash.
Bug: chromium:1185266
Change-Id: I7cd8406c65a9ba35a55d695b2f65410a1edd2a19
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382276
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Acts similarly to the GL precompiled shaders, in that it will cache
preliminary data (in this case, the MTLLibraries) in the PipelineState
cache, and then when the pipeline is built will extract that. Once
the pipeline is built the MTLLibraries are discarded.
Bug: skia:11392
Change-Id: I701e2e857d105c9149a2f69fe7b60bf4599195bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/380457
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: Ic2d1240ab785101365b0fd934562505fb5a3e599
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/381816
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
It turned out that everywhere we were using or testing DSL code either
directly or indirectly imported big chunks of the SkSL library. These
imports turned out to be necessary; code written using just DSL.h would
fail with various template instantiation errors.
Change-Id: Iae72d15b0d6ef14614ac1a4ff08c36bc1876cd4d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/381638
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>