This reverts commit 7712db9c24.
Reason for revert: blink unittests and maybe vulkan+skiarenderer masks appear broken. The blink unittests had actually failed with original CL, but was missed because of focus on Android. Not sure what's going on yet.
Original change's description:
> Reland "Draw image filters directly under non-axis-aligned transforms"
>
> This reverts commit 6cafdc069b.
>
> Reason for revert: Fixes unit test failure in Android
>
> In the original version, this internalSaveLayer() returned early if the
> strategy was kNoLayer. This diverged from the old code that updated the
> canvas' clip bounds and then returned before making the layer. A comment
> had suggested this was maybe okay to switch to this early out, but it
> turns out that's not the case.
>
> In Android's unit tests, it queries the clip bounds on a recording canvas
> which always uses a no-layer strategy. However, we do need to set the
> clip bounds of these types of canvas' (or virtual wrappers of a real
> canvas) so that they stay consistent with a real canvas.
>
> The unit tests had two failures, first the bounds and second a color
> mismatch after reading back. However, the bounds test was an ASSERT_EQ
> inside an SkDrawable function. ASSERT_EQ aborts the current function, so
> it never ran the drawRect that sets the color to green. The later
> readback is outside the drawable function, so that test still happened
> and failed. The only real issue to fix is the clip bounds tracking; once
> that unit test succeeds, the color readback will work properly.
>
> Original change's description:
> > Revert "Draw image filters directly under non-axis-aligned transforms"
> >
> > This reverts commit f8f23b2030.
> >
> > Reason for revert: b/172617382 is creating issues for Android's Webview
> >
> > Original change's description:
> > > Draw image filters directly under non-axis-aligned transforms
> > >
> > > This removes hacking the canvas CTM and wrapping the paint's image
> > > filter in a special MatrixTransform that computed a post-transform
> > > instead of its documented pre-transform effect. Performance-wise, the
> > > computed layer sizes should be about the same, but we avoid one less
> > > render target switch because we apply the transformation while drawing
> > > to the dst device, vs. transforming into another temporary layer and
> > > then drawing that to the dst device.
> > >
> > > Several important changes in behavior here:
> > > 1. The DeviceCM record no longer has a stashed matrix to restore and
> > > holds its restoration paint directly.
> > > 2. Devices for image filter inputs can now have device-to-global
> > > transforms that are not integer translates.
> > > 3. The MatrixTransform hack punted when there was perspective because it
> > > could produce excessively large temporary images, but the new version
> > > appears to work around that. We now impose a maximum layer size to
> > > protect against that and automatically scale the layer to prevent it.
> > > Perspective image filters otherwise now draw correctly.
> > > 6. Updated layer sizing code to use the new image filter APIs
> > > 7. Updated backdrop filter and restore filters to go through the same
> > > code paths, although restore filters skip the intermediate image
> > > transform.
> > > - layer bounds and transforms now go through the updated skif API
> > > and is hopefully more straight forward to understand.
> > > 8. Now we can optimize root color filter nodes of a filter DAG, even if
> > > the entire DAG can't be represented as a color filter. The last node
> > > is pulled off and composed with the restoration paint instead.
> > >
> > > Bug: skia:9074,skia:9283
> > > Change-Id: I1fa1d50135b9d6d453b02f89aa3cc3b54deab678
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328376
> > > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> >
> > TBR=bsalomon@google.com,robertphillips@google.com,fmalita@google.com,reed@google.com,michaelludwig@google.com
> >
> > Change-Id: I098d0e4b8ee067b436400eb9fea047e629544eec
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: skia:9074
> > Bug: skia:9283
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332737
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Derek Sollenberger <djsollen@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> TBR=djsollen@google.com,bsalomon@google.com,robertphillips@google.com,fmalita@google.com,reed@google.com,michaelludwig@google.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: skia:9074
> Bug: skia:9283
> Change-Id: Ifd5fed708d05a64ddccbd096fbf29896a44ef9f5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333123
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
TBR=djsollen@google.com,bsalomon@google.com,robertphillips@google.com,fmalita@google.com,reed@google.com,michaelludwig@google.com
Change-Id: I7758641e0279ab5af44794d70cd381bc0a69f956
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9074
Bug: skia:9283
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333756
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This reverts commit 6cafdc069b.
Reason for revert: Fixes unit test failure in Android
In the original version, this internalSaveLayer() returned early if the
strategy was kNoLayer. This diverged from the old code that updated the
canvas' clip bounds and then returned before making the layer. A comment
had suggested this was maybe okay to switch to this early out, but it
turns out that's not the case.
In Android's unit tests, it queries the clip bounds on a recording canvas
which always uses a no-layer strategy. However, we do need to set the
clip bounds of these types of canvas' (or virtual wrappers of a real
canvas) so that they stay consistent with a real canvas.
The unit tests had two failures, first the bounds and second a color
mismatch after reading back. However, the bounds test was an ASSERT_EQ
inside an SkDrawable function. ASSERT_EQ aborts the current function, so
it never ran the drawRect that sets the color to green. The later
readback is outside the drawable function, so that test still happened
and failed. The only real issue to fix is the clip bounds tracking; once
that unit test succeeds, the color readback will work properly.
Original change's description:
> Revert "Draw image filters directly under non-axis-aligned transforms"
>
> This reverts commit f8f23b2030.
>
> Reason for revert: b/172617382 is creating issues for Android's Webview
>
> Original change's description:
> > Draw image filters directly under non-axis-aligned transforms
> >
> > This removes hacking the canvas CTM and wrapping the paint's image
> > filter in a special MatrixTransform that computed a post-transform
> > instead of its documented pre-transform effect. Performance-wise, the
> > computed layer sizes should be about the same, but we avoid one less
> > render target switch because we apply the transformation while drawing
> > to the dst device, vs. transforming into another temporary layer and
> > then drawing that to the dst device.
> >
> > Several important changes in behavior here:
> > 1. The DeviceCM record no longer has a stashed matrix to restore and
> > holds its restoration paint directly.
> > 2. Devices for image filter inputs can now have device-to-global
> > transforms that are not integer translates.
> > 3. The MatrixTransform hack punted when there was perspective because it
> > could produce excessively large temporary images, but the new version
> > appears to work around that. We now impose a maximum layer size to
> > protect against that and automatically scale the layer to prevent it.
> > Perspective image filters otherwise now draw correctly.
> > 6. Updated layer sizing code to use the new image filter APIs
> > 7. Updated backdrop filter and restore filters to go through the same
> > code paths, although restore filters skip the intermediate image
> > transform.
> > - layer bounds and transforms now go through the updated skif API
> > and is hopefully more straight forward to understand.
> > 8. Now we can optimize root color filter nodes of a filter DAG, even if
> > the entire DAG can't be represented as a color filter. The last node
> > is pulled off and composed with the restoration paint instead.
> >
> > Bug: skia:9074,skia:9283
> > Change-Id: I1fa1d50135b9d6d453b02f89aa3cc3b54deab678
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328376
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,fmalita@google.com,reed@google.com,michaelludwig@google.com
>
> Change-Id: I098d0e4b8ee067b436400eb9fea047e629544eec
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:9074
> Bug: skia:9283
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332737
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
TBR=djsollen@google.com,bsalomon@google.com,robertphillips@google.com,fmalita@google.com,reed@google.com,michaelludwig@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:9074
Bug: skia:9283
Change-Id: Ifd5fed708d05a64ddccbd096fbf29896a44ef9f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333123
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Remove done and release distinction. Chrome is not using either as
it tracks texture access using other synchronization mechanisms
(semaphores, flush finish procs). Now there is just fulfill and release
where release is called when the texture can be deleted. Also,
release proc can be null.
Simplify texture idle mechanism as the "flushed" state was only used to
implement the old idea of a release proc. The "finished" idle state is
still used to implement the new release proc. Though, it could also be
removed if GrTexture were to be removed for textures returned by fulfill.
Not directly tied to this bug, but a new YUVA factory will be required
and it's good to clean things up first to avoid adding another
instance of the current complexity.
Bug: skia:10632
Change-Id: I4fe3c0af3f5a591506b1b3c736fd3284a38465a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331836
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This reverts commit 4cb5c5e172, and fixes
the Chromium issue by declaring sign(x) in sksl_public.sksl.
Original description:
This makes numerous internal and GLSL types or intrinsics hidden from
public (runtime effect) SkSL. In particular:
- Only core numeric types are visible to all program types. GLSL types
involving images, textures, and sampling are restricted to internal use.
- sk_Caps is no longer visible to runtime effects.
- The set of intrinsics available to runtime effects is now a separate,
curated list in sksl_public.sksl. It exactly matches the GLSL ES 1.00
spec order.
- The blend intrinsics are no longer visible, which also fixes a bug.
These are nice, but we're not going to offer them yet - they involve
enums, which creates complications.
Bug: skia:10680
Bug: skia:10709
Bug: skia:10913
Cq-Include-Trybots: luci.chromium.try:linux-chromeos-rel,linux-rel
Change-Id: I42deeeccd725a9fe18314d091ce253404e3572e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332750
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
No-Try: true
Change-Id: Ief2f5af2d7ea827f772c5ee1c32bae761fc8d60b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332748
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit bea0dc67f4.
No-Try: true
Change-Id: I7b000de199dc23bd3719a4ee835b2a8d3c93fefd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332747
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit f8f23b2030.
Reason for revert: b/172617382 is creating issues for Android's Webview
Original change's description:
> Draw image filters directly under non-axis-aligned transforms
>
> This removes hacking the canvas CTM and wrapping the paint's image
> filter in a special MatrixTransform that computed a post-transform
> instead of its documented pre-transform effect. Performance-wise, the
> computed layer sizes should be about the same, but we avoid one less
> render target switch because we apply the transformation while drawing
> to the dst device, vs. transforming into another temporary layer and
> then drawing that to the dst device.
>
> Several important changes in behavior here:
> 1. The DeviceCM record no longer has a stashed matrix to restore and
> holds its restoration paint directly.
> 2. Devices for image filter inputs can now have device-to-global
> transforms that are not integer translates.
> 3. The MatrixTransform hack punted when there was perspective because it
> could produce excessively large temporary images, but the new version
> appears to work around that. We now impose a maximum layer size to
> protect against that and automatically scale the layer to prevent it.
> Perspective image filters otherwise now draw correctly.
> 6. Updated layer sizing code to use the new image filter APIs
> 7. Updated backdrop filter and restore filters to go through the same
> code paths, although restore filters skip the intermediate image
> transform.
> - layer bounds and transforms now go through the updated skif API
> and is hopefully more straight forward to understand.
> 8. Now we can optimize root color filter nodes of a filter DAG, even if
> the entire DAG can't be represented as a color filter. The last node
> is pulled off and composed with the restoration paint instead.
>
> Bug: skia:9074,skia:9283
> Change-Id: I1fa1d50135b9d6d453b02f89aa3cc3b54deab678
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328376
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,fmalita@google.com,reed@google.com,michaelludwig@google.com
Change-Id: I098d0e4b8ee067b436400eb9fea047e629544eec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9074
Bug: skia:9283
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332737
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This makes numerous internal and GLSL types or intrinsics hidden from
public (runtime effect) SkSL. In particular:
- Only core numeric types are visible to all program types. GLSL types
involving images, textures, and sampling are restricted to internal use.
- sk_Caps is no longer visible to runtime effects.
- The set of intrinsics available to runtime effects is now a separate,
curated list in sksl_public.sksl. It exactly matches the GLSL ES 1.00
spec order.
- The blend intrinsics are no longer visible, which also fixes a bug.
These are nice, but we're not going to offer them yet - they involve
enums, which creates complications.
Bug: skia:10680
Bug: skia:10709
Bug: skia:10913
Change-Id: I8fa1c94f6e4899f38530bb9cff33d147f6983ab3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332597
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This removes hacking the canvas CTM and wrapping the paint's image
filter in a special MatrixTransform that computed a post-transform
instead of its documented pre-transform effect. Performance-wise, the
computed layer sizes should be about the same, but we avoid one less
render target switch because we apply the transformation while drawing
to the dst device, vs. transforming into another temporary layer and
then drawing that to the dst device.
Several important changes in behavior here:
1. The DeviceCM record no longer has a stashed matrix to restore and
holds its restoration paint directly.
2. Devices for image filter inputs can now have device-to-global
transforms that are not integer translates.
3. The MatrixTransform hack punted when there was perspective because it
could produce excessively large temporary images, but the new version
appears to work around that. We now impose a maximum layer size to
protect against that and automatically scale the layer to prevent it.
Perspective image filters otherwise now draw correctly.
6. Updated layer sizing code to use the new image filter APIs
7. Updated backdrop filter and restore filters to go through the same
code paths, although restore filters skip the intermediate image
transform.
- layer bounds and transforms now go through the updated skif API
and is hopefully more straight forward to understand.
8. Now we can optimize root color filter nodes of a filter DAG, even if
the entire DAG can't be represented as a color filter. The last node
is pulled off and composed with the restoration paint instead.
Bug: skia:9074,skia:9283
Change-Id: I1fa1d50135b9d6d453b02f89aa3cc3b54deab678
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328376
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
f01a9d9020
is the culprit
Revert "GrRefCntedCallback has Make function."
This reverts commit b2c42140ea.
Revert "Add SkImage::MakeFromYUVATexturesCopyToExternal"
This reverts commit f01a9d9020.
Bug: skia:10632
Change-Id: Ief076f168b63ff8ca15b607163a13d5f52a733d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331798
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit 28eb592735.
Reason for revert: std::optional use is breaking bots, e.g.:
https://ci.chromium.org/raw/build/logs.chromium.org/skia/4fa8175011a1c411/+/annotations
Original change's description:
> Reland "heif: Add AVIF type and AVIF sniffing"
>
> This is a reland of 3ab5b73649
>
> Fix: Chromium does not use the heif decoder. So hide it behind
> an ifdef.
>
> Original change's description:
> > heif: Add AVIF type and AVIF sniffing
> >
> > AVIF is the image format based on the AV1 video codec. The
> > container for AVIF is very similar to that of HEIF. Add type
> > definitions for AVIF and sniffing code for detecting AVIF images.
> >
> > The underlying android platform's HEIF decoder implementation will
> > also support AVIF decoding.
> >
> > Bug: b/141654151
> > Change-Id: I7e31f4cedf0bffb8920ddf880a26601e48d0e833
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330059
> > Reviewed-by: Leon Scroggins <scroggo@google.com>
> > Reviewed-by: Derek Sollenberger <djsollen@google.com>
> > Reviewed-by: Chong Zhang <chz@google.com>
> > Commit-Queue: Leon Scroggins <scroggo@google.com>
>
> Bug: b/141654151
> Change-Id: Ie6840d6fc97789be619924fc60df8683cd58430f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331496
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>
TBR=djsollen@google.com,scroggo@google.com,chz@google.com,vigneshv@google.com
Change-Id: I25df9f65b9d56d81be70a5fa650c3d841bd5a15e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/141654151
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331800
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This is a reland of 3ab5b73649
Fix: Chromium does not use the heif decoder. So hide it behind
an ifdef.
Original change's description:
> heif: Add AVIF type and AVIF sniffing
>
> AVIF is the image format based on the AV1 video codec. The
> container for AVIF is very similar to that of HEIF. Add type
> definitions for AVIF and sniffing code for detecting AVIF images.
>
> The underlying android platform's HEIF decoder implementation will
> also support AVIF decoding.
>
> Bug: b/141654151
> Change-Id: I7e31f4cedf0bffb8920ddf880a26601e48d0e833
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330059
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Reviewed-by: Chong Zhang <chz@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>
Bug: b/141654151
Change-Id: Ie6840d6fc97789be619924fc60df8683cd58430f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331496
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Updated API for creating a RGBA texture-backed image from RGBA texture
planes with user-provided backing store using GrYUVABackendTextures.
Ultimately we would like to remove all such APIs and have the client
make a SkSurface and draw a YUVA texture image to the surface but
a recent attempt to do that in Chrome caused a not yet understood
perf regression.
Add wacky_yuv_formats variation that tests new api.
Bug: skia:10632
Change-Id: I89411216948682f13281a91a7575d5f345badda7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329956
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This reverts commit 3ab5b73649.
Reason for revert: <optional> header is C++17 only
Original change's description:
> heif: Add AVIF type and AVIF sniffing
>
> AVIF is the image format based on the AV1 video codec. The
> container for AVIF is very similar to that of HEIF. Add type
> definitions for AVIF and sniffing code for detecting AVIF images.
>
> The underlying android platform's HEIF decoder implementation will
> also support AVIF decoding.
>
> Bug: b/141654151
> Change-Id: I7e31f4cedf0bffb8920ddf880a26601e48d0e833
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330059
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Reviewed-by: Chong Zhang <chz@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>
TBR=djsollen@google.com,scroggo@google.com,chz@google.com,vigneshv@google.com
Change-Id: I9c9cd00af1a41bffa37725f39afc9bc0e504d616
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/141654151
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331336
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
AVIF is the image format based on the AV1 video codec. The
container for AVIF is very similar to that of HEIF. Add type
definitions for AVIF and sniffing code for detecting AVIF images.
The underlying android platform's HEIF decoder implementation will
also support AVIF decoding.
Bug: b/141654151
Change-Id: I7e31f4cedf0bffb8920ddf880a26601e48d0e833
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330059
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Chong Zhang <chz@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
This removes the last of the SkFontHost LCD globals and the
SkSurfaceProps::kLegacyFontHost_InitType.
Bug: skia:3934
Change-Id: Ic2342a3ea3dbcd075d6817cbd3fc27274e376b8d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329364
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
This is desired for a short term memory improvement on low memory
devices.
Bug: chromium:1138979
Change-Id: I7df41a9c4d21b7a7f62b738e6358b36dd262f77d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327345
Commit-Queue: Kyle Charbonneau <kylechar@chromium.org>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This reverts commit fea12238ed.
Reason for revert: MSAN/SwiftShader failure
Original change's description:
> New variant of SkImage::MakeFromYUVATextures.
>
> Takes a new type GrYUVATextures. This a set of GrBackendTextures and
> SkYUVAInfo that have been pre-validated to be compatible.
>
> Bug: skia:10632
>
> Change-Id: Id252f8662ede0f268e88fd40dc1b0b8f4ab6345f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317762
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com
Change-Id: I5350d4f9b1eda0503fb0af9db8575a734bdc811f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10632
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327922
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Takes a new type GrYUVATextures. This a set of GrBackendTextures and
SkYUVAInfo that have been pre-validated to be compatible.
Bug: skia:10632
Change-Id: Id252f8662ede0f268e88fd40dc1b0b8f4ab6345f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317762
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
The original SkIRect* crop rect argument was a little too onerous.
First, as a pointer, it required you to declare your crop rect separately
just to take a pointer to it. Now, you can pass an SkIRect or SkRect in
directly when you are explicitly constructing a cropped filter.
Second, the crop rect is transformed by the same matrix as the other
filter parameters, so it can be scaled and translated. Allowing SkRect
instead of just SkIRect gives more precision and flexibility for local
coordinate systems. Now a crop rect could be defined to be from [-.5, .5]
and still map to real pixels after transformation (this was a request
from the skia-discuss mailing list, and also better matches the SVG spec).
The crop rect argument was always meant to be a convenience, since I
plan to refactor cropping into an indenendent image filter that will
give more explicit control over when the crop is applied in the DAG.
To maintain the convenience for the factories, the constructors of
the new CropRect type are not explicit so that callers don't ever need
to concern themselves with it.
Bug: skia:9296
Change-Id: I29a684cb925f1fca4dabc803114ab2b125660aaa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324622
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
SkImageFilters::Paint did not use every slot of the SkPaint, with only
its color, alpha, color filter, and shader having a meaningful effect on
the image filter result. It was always blended into a transparent dst,
so blend mode wasn't very relevant, and it was always filled to whatever
required geometry, so stroke style, path effect, and mask filters were
ignored or not well specified.
Color, alpha, and color filter can all be combined into an SkShader, so
a more constrained SkImageFilters::Shader provides the same useful
capabilities without as many surprises.
SkImageFilters::Paint still exists, but is deprecated to be removed
once I've confirmed clients aren't depending on it.
Bug: skia:9310
Change-Id: I11a82bda1a5d440726cf4e2b5bfaae4929568679
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323680
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Adds a new helper that creates a GrBackendRenderTarget using
GrGpu and then wraps it in a SkSurface. Uses the SkSurface
release proc to delete the BERT using GrGpu.
Upgrades GrGpu::createTestingOnlyBackendRenderTarget to create MSAA
buffers.
Updates many tests/tool to call sites to use the helper instead of
SkSurface::MakeFromBackendTextureAsRenderTarget.
Adds syncToCpu bool to SkSurface:: and GrContext::flushAndSubmit.
Bug: skia:9832
Change-Id: I73a8f0ce09dc6523729af0814464c6b6657fda06
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293683
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Bug: skia:10632
Change-Id: Icb27e44d234063ab049fef95587f474323d7ada9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321537
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This will allow us in a follow on change to put in a "fake" gl stencil
format for the wrapped FBO.
Bug: skia:10727
Change-Id: Iba1eca5114b34d25e6a220591d28a20f7b36b12b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321545
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Instead of being passed separately.
Check sample count in various onWrap methods in GrMtlGpu.
Bug: skia:9832
Cq-Include-Trybots: luci.skia.skia.primary:Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All-Metal,Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All-Metal,Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All-Metal,Test-iOS-Clang-iPhone11-GPU-AppleA13-arm64-Release-All-Metal,Test-iOS-Clang-iPhone6-GPU-PowerVRGX6450-arm64-Release-All-Metal,Test-Mac10.15-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-Metal
Change-Id: If5813db95b07f5d272e80920486f461cc5a587fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320956
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Remove separate constructor arg from GrBackendRenderTarget.
Add appropriate checks in onWrap functions in GrD3DGpu to limit to
previous functionality.
Bug: skia:9832
Cq-Include-Trybots: luci.skia.skia.primary:Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Direct3D,Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Direct3D
Change-Id: Ieba398d4bc00d18fdb0adffcda81f1a166db24b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320757
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Pre-req for allowing rendering to an externally created MSSA VkImage.
Bug: skia:9832
Cq-Include-Trybots: luci.skia.skia.primary:Test-Debian10-Clang-NUC7i5BNK-GPU-IntelIris640-x86_64-Release-All-Vulkan,Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Vulkan,Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Vulkan,Test-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android_Vulkan,Test-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android_Vulkan,Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan,Test-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan,Test-Android-Clang-P30-GPU-MaliG76-arm64-Release-All-Android_Vulkan
Change-Id: Ibf41944c6946dda7e27bdcd509ecd04976fc9ade
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320262
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Older versions of MacOS are unstable when compiling shaders, and we
don't have the testing support for older versions of iOS.
Bug: skia:10777
Change-Id: I95d9fe0f1007af6bec5c7525dacda565e32989f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320260
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Even when expanding clip ops were disabled, the max value allowed the
fuzzer to produce those disabled values. This should fix the fuzzer to
only produce valid intersect or difference clip ops.
Bug: chromium:1132687
Change-Id: I7368ff36a00e6b0e87ecbae5ba647d249299b9ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320064
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Adds base class GrD3DAlloc and GrD3DMemoryAllocator, and a reference
to a GrD3DMemoryAllocator in GrBackendContext and a reference to a
GrD3DAlloc in GrD3DTextureResourceInfo. Internally, we override this
base class to define the AMD memory allocator.
Change-Id: I033924b0247ea330969b1398f25985e7a84aec11
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317243
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This reverts commit b8ae7fa12a.
Reason for revert: Introduced a memory leak
Original change's description:
> Reland "Use Microsoft's ComPtr to wrap D3D12 objects."
>
> This is a reland of 0ef049177f
>
> Original change's description:
> > Use Microsoft's ComPtr to wrap D3D12 objects.
> >
> > Change-Id: I4bd173428a2b65f0bc1994fb794ef9d4d68d5ba0
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314957
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Jim Van Verth <jvanverth@google.com>
>
> Change-Id: Id0199db4061c67ed53da35e74dc31a004744be95
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315655
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I3f8744668558f6b8f4f367eeeeff2f6aa2c36992
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318209
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Now supports all plane configurations tested by WackyYUVFormatsGM.
Added WackyYUVFormatsGM that tests YUVA interface on SkImageGenerator.
Change-Id: I8326f098f1453b9702f04ff366431a516ca160c3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317097
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This reverts commit f6e0f58b2e.
Reason for revert: benches and tests updated here: https://skia-review.googlesource.com/c/skia/+/317380
Original change's description:
> Revert "Enable novel GrClipStack on bots, disable elsewhere"
>
> This reverts commit e1ade2ac4a.
>
> Reason for revert: Need to remove benchmarks that use deprecated SkClipOps first.
>
> Original change's description:
> > Enable novel GrClipStack on bots, disable elsewhere
> >
> > As a result of this change, the new GrClipStack will run on all of our
> > default bots. However, the SK_DISABLE_NEW_GR_CLICK_STACK define is used
> > to explicitly disable the clip stack when we build for the Android
> > Framework, Google3, Flutter, and Fuchsia. These projects can have staging
> > controlled from within the skia repo. This CL in chromium also disables
> > the new clip stack: https://chromium-review.googlesource.com/c/chromium/src/+/2412768
> > and must land before this CL does in Skia.
> >
> > When GrClipStack originally landed, I had it disabled by checking the
> > value of the define SK_USE_NEW_GR_CLICK_STACK for 0 or 1. To be a little
> > simpler, and work with the flutter and fuchsia gn defines, this CL
> > switches GrClipStack control over to SK_DISABLE_NEW_GR_CLICK_STACK and
> > it just checks for whether or not it's defined.
> >
> > Bug: skia:10205
> > Change-Id: I6b8bd18290844c02839fe99fdf629b48ffd86f27
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317209
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
>
> Change-Id: I14fddccfdea8e91ebad92e55193b0034f8bb28af
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:10205
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317377
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
# Not skipping CQ checks because this is a reland.
Bug: skia:10205
Change-Id: I1f26496437ed04a79e9c1058428cdc867ae3be39
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317385
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This reverts commit e1ade2ac4a.
Reason for revert: Need to remove benchmarks that use deprecated SkClipOps first.
Original change's description:
> Enable novel GrClipStack on bots, disable elsewhere
>
> As a result of this change, the new GrClipStack will run on all of our
> default bots. However, the SK_DISABLE_NEW_GR_CLICK_STACK define is used
> to explicitly disable the clip stack when we build for the Android
> Framework, Google3, Flutter, and Fuchsia. These projects can have staging
> controlled from within the skia repo. This CL in chromium also disables
> the new clip stack: https://chromium-review.googlesource.com/c/chromium/src/+/2412768
> and must land before this CL does in Skia.
>
> When GrClipStack originally landed, I had it disabled by checking the
> value of the define SK_USE_NEW_GR_CLICK_STACK for 0 or 1. To be a little
> simpler, and work with the flutter and fuchsia gn defines, this CL
> switches GrClipStack control over to SK_DISABLE_NEW_GR_CLICK_STACK and
> it just checks for whether or not it's defined.
>
> Bug: skia:10205
> Change-Id: I6b8bd18290844c02839fe99fdf629b48ffd86f27
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317209
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
Change-Id: I14fddccfdea8e91ebad92e55193b0034f8bb28af
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10205
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317377
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
As a result of this change, the new GrClipStack will run on all of our
default bots. However, the SK_DISABLE_NEW_GR_CLICK_STACK define is used
to explicitly disable the clip stack when we build for the Android
Framework, Google3, Flutter, and Fuchsia. These projects can have staging
controlled from within the skia repo. This CL in chromium also disables
the new clip stack: https://chromium-review.googlesource.com/c/chromium/src/+/2412768
and must land before this CL does in Skia.
When GrClipStack originally landed, I had it disabled by checking the
value of the define SK_USE_NEW_GR_CLICK_STACK for 0 or 1. To be a little
simpler, and work with the flutter and fuchsia gn defines, this CL
switches GrClipStack control over to SK_DISABLE_NEW_GR_CLICK_STACK and
it just checks for whether or not it's defined.
Bug: skia:10205
Change-Id: I6b8bd18290844c02839fe99fdf629b48ffd86f27
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317209
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Takes SkYUVAPixmaps. Still implemented in terms of SkYUVAIndex[4]
internally.
Replace all internal use cases except wacky_yuv_formats.
Takes GrRecordingContext rather than GrContext.
SkVideoDecoder updated to take GrRecordingContext.
Bug: skia:10632
Change-Id: I6e9b9b6a4f11333bce6f87c1ebff0acb297f6540
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316837
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This is a reland of 0ef049177f
Original change's description:
> Use Microsoft's ComPtr to wrap D3D12 objects.
>
> Change-Id: I4bd173428a2b65f0bc1994fb794ef9d4d68d5ba0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314957
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: Id0199db4061c67ed53da35e74dc31a004744be95
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315655
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This reverts commit 0ef049177f.
Reason for revert: Looks like this is introducing a memory leak.
Original change's description:
> Use Microsoft's ComPtr to wrap D3D12 objects.
>
> Change-Id: I4bd173428a2b65f0bc1994fb794ef9d4d68d5ba0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314957
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
Change-Id: Ib0333c00a7f8c3650bd2b077cbdfb6926c5870f4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315653
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>