We want:
DDLs to always be sorted
Live rendering to still be sorted w/in Skia
Live rendering to still not be sorted in Chrome and Android
Additionally, we want reduced-opList-splitting to only be enabled on some of Skia's bots.
Change-Id: I15e7d69c7e109749665a86a0169ad918c993dc77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199244
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
- Transforming a path in place wasn't updating the gen ID of the path
- Transforming a path into another (uniquely held) path wasn't calling
gen ID change listeners.
Bug: skia:
Change-Id: I9e244725d9bd5776d203ce6b12698cee09d0b714
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199003
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Bug: skia:
Change-Id: I86fd67a792ddfc456e8dd553d9012ed9bc9101f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198822
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>
This reverts commit 9ac0407006.
Reason for revert: Breaking DDL Win10 skpbench bot
Original change's description:
> Distinguish between "flushed" and "finished" idle state callbacks on GrTexture.
>
> This is necessary to convert the promise image API to call Release when all
> work is flushed and Done when all work is complete (future work).
>
> Change-Id: I9745952bb0978ca2aaa79aeed460730b2fea856e
> Bug: skia:8800
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197163
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:8800
Change-Id: I5e6c4ea072beb4fb67a53d2ea2b007a7d201799d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198603
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit c5e8e150c8.
Reason for revert: Reverting to revert 9ac0407006https://skia-review.googlesource.com/c/skia/+/197163
Original change's description:
> Change promise image contract to for when Release and Done are called.
>
> Now Release is called when all work related to the SkImage is flushed
> and Done is called when it is finished on the GPU in Vulkan. In GL they
> are still both called back-to-back after flushing.
>
> Bug: skia:8800
> Change-Id: I990be7b9ebef8411590afd860ef40511fb5fee32
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198165
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
Change-Id: I13e8211d89ed1b7694c2d7734eeaaf4ba9ad410a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8800
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198602
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Now Release is called when all work related to the SkImage is flushed
and Done is called when it is finished on the GPU in Vulkan. In GL they
are still both called back-to-back after flushing.
Bug: skia:8800
Change-Id: I990be7b9ebef8411590afd860ef40511fb5fee32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198165
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Drop setter, only keep the parameterized constructor.
Change-Id: I31517df23688b8bd7485bf70c9c055cd1c87edcf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198245
Auto-Submit: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
This will allow all the glyph drawing closures to live on the
GrTextBlob.
Other cleanup
* Rename glyphCache things to grStrikeCache.
Change-Id: I03e0353a1434230086a08184221272f1e5751ae6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197244
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This is necessary to convert the promise image API to call Release when all
work is flushed and Done when all work is complete (future work).
Change-Id: I9745952bb0978ca2aaa79aeed460730b2fea856e
Bug: skia:8800
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197163
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Now that we never re-fulfill a promise image we no longer need to deinstantiate
promise image proxies. They now can use kSingleUse callback semantics.
This was the only usage of the kDeinstantiate lazy callback type so it is
removed. The DeinstantiateProxyTracker is also no longer required and is
removed.
The GrTexture idle callback mechanism now uses GrReleaseProcHelper, which has
been extended to support chaining multiple callbacks together and an abandon()
method that aborts calling the callback in the destructor. It has been renamed
GrRefCntedCallback to reflect its more general usage.
Bug: skia:8800
Change-Id: I857c9eec57fdf706631a266ec8bea682d6657a7c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/196500
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
We had only used this extension in conjunction with
GL_NV_framebuffer_mixed_samples to draw directly to the framebuffer.
However, it's faster and higher quality to just use our own analytic
AA if we can draw directly to the framebuffer.
It might have been interesting to fake mixed samples using
GL_EXT_raster_multisample and PLS together, but those two extensions
don't appear to ever exist together.
Bug: skia:
Change-Id: Iea489cb0e03fc55aa64d3ea7fccc61b539cc461e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197082
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
For now this is distinct from kRGBA_F16_SkColorType but treated the
same. Next steps are to see if we can keep it clamped to [0,1].
Switched a few switches away from default to exhaustive.
Took away any explicit SW clamps for now except the one we definitely
want in append_gamut_clamp_if_normalized().
Skip F16Norm in the DDL test because we can't yet distinguish it from
F16.
Change-Id: I021a864fe078e4fa4e2b399982e6c38350e10d74
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/196371
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Bug: skia:
Change-Id: I5e664939a446616ef57acc79d26a10e6908cda10
Reviewed-on: https://skia-review.googlesource.com/c/196643
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Prior to this CL, we always used raster-pipeline if the device had a
colorspace. In this CL, we defer to individual shaders to decide if they can still
use the legacy path (onMakeContext).
The motivation is purely performance (and perhaps short-term backwards
compat): the legacy blits are usually faster, so staying in them
(as long as we still draw correctly) is preferable.
Causes some (mostly unimportant) rebaselines, esp. around bilerp, as the
rasterpipeline does a much better (but slower) job of it, and now we will
use the legacy bilerp more often.
Bug: skia:8793
Change-Id: I1e7e482a863a1a09ffef86a87e2aa9a4a8d1b9b5
Reviewed-on: https://skia-review.googlesource.com/c/195888
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Use SkDEBUGCODE(...;) instead of SkDEBUGCODE(...);
clang-format has trouble formatting the new spelling, but
it's already commonly used in skia, and if you have something
SkDEBUGCODE instead of just checking `#if SK_DEBUG` then
there isn't all that much you can do.
(You could make SkDEBUGCODE() insert a static_assert(true, "")
at the end to eat semicolons after it, but that's also
a bit gross. And many SkDEBUGCODE()s already put the ; inside
the parens.)
Bug: chromium:926235
Change-Id: I57bc800309283b7206082d8a7acc4b462a3b4cfa
Reviewed-on: https://skia-review.googlesource.com/c/196421
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Nico Weber <thakis@chromium.org>
This reverts commit 24adb3a356.
Reason for revert: fixes SkGpuDevice extraction when running gbr configs in dm.
Original change's description:
> Revert "Add general quad API to SkGpuDevice"
>
> This reverts commit 339e1cc8d4.
>
> Reason for revert: compositor GM breaks dm on windows
>
> Original change's description:
> > Add general quad API to SkGpuDevice
> >
> > Heavily refactors SkGpuDevice's internal texturing code in an attempt
> > to consolidate entry points for drawing an image. Helps lay the ground
> > work for eventually implementing bitmap tiling with per-edge AA.
> >
> > Bug: skia:
> > Change-Id: I9feb86d5315d73119deb21e954c45e45513a63f6
> > Reviewed-on: https://skia-review.googlesource.com/c/191571
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
>
> Change-Id: I74bc7eb08855dff5535cf809fc47ce6f16d2c15d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/c/195889
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
Change-Id: I667eb5b4d1253b050670a64de9f0aa70f4df3a5e
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/196160
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Bug: skia:
Change-Id: I9bab3ff73d3934786d7457c4b1bcf67d01c653f3
Reviewed-on: https://skia-review.googlesource.com/c/196060
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Since these are all already static, it doesn't have any real functional
impact in terms of linking or codegen. But it does supress unused
function warnings in compilation units that don't use everything.
Add a new SI boilerplate macro to go along with SINT and SIT.
Change-Id: If2c09951b7453338dd20a3a88e3abbee5eefcd27
Reviewed-on: https://skia-review.googlesource.com/c/195921
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Add SSE, SSE4.1, and NEON specializations.
The if_then_else() unit tests in SkVxTest.cpp should cover this.
I had to give up on my dream of not using Skia headers for now. There's
really no good way of knowing whether we've got SSE4.1 support in MSVC
except when we explicitly define SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE41.
This refactor to use SK_CPU_SSE_LEVEL let MSVC point out a slight
ordering problem that would cause an infinite loop calling any of
the specializions like sqrt(float2). I believe moving them after
the float4 specializations will fix that.
Change-Id: I83639f378a182716d1b37e92b6d725472698f874
Reviewed-on: https://skia-review.googlesource.com/c/195920
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit 339e1cc8d4.
Reason for revert: compositor GM breaks dm on windows
Original change's description:
> Add general quad API to SkGpuDevice
>
> Heavily refactors SkGpuDevice's internal texturing code in an attempt
> to consolidate entry points for drawing an image. Helps lay the ground
> work for eventually implementing bitmap tiling with per-edge AA.
>
> Bug: skia:
> Change-Id: I9feb86d5315d73119deb21e954c45e45513a63f6
> Reviewed-on: https://skia-review.googlesource.com/c/191571
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
Change-Id: I74bc7eb08855dff5535cf809fc47ce6f16d2c15d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/195889
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Heavily refactors SkGpuDevice's internal texturing code in an attempt
to consolidate entry points for drawing an image. Helps lay the ground
work for eventually implementing bitmap tiling with per-edge AA.
Bug: skia:
Change-Id: I9feb86d5315d73119deb21e954c45e45513a63f6
Reviewed-on: https://skia-review.googlesource.com/c/191571
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Change-Id: I7a9810e14734262ee608444bd9308bebfb788a8d
Reviewed-on: https://skia-review.googlesource.com/c/195364
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Test: Ran CTS
Bug: b/115613038
Change-Id: I9493de41e0bfaa53436676c8eed2a4f178b6e51e
Reviewed-on: https://skia-review.googlesource.com/c/186400
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This moves the smart pointer use up one more level in preparation for
changing SkTypeface::openStream to return unique_ptr as well.
Change-Id: Ib8173d59e03de38b06f6e1b4e6776f1961055ae7
Reviewed-on: https://skia-review.googlesource.com/c/195121
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This reverts commit 22170b3178.
It was reverted due to the test breaking Google3. This includes a
workaround.
Original change's description:
> Treat kWEBP encode with quality=100 as lossless
>
> In SkEncodeImage and friends, treat quality of 100 as a lossless encode
> when using kWEBP. This seems a good fit for the intent - which is
> presumably to save the highest quality image. This also matches
> Chromium's blink::ImageEncoder::ComputeWebpOptions, which treats a
> quality of 1 (on a float scale from 0 to 1) as a lossless encode.
>
> FWIW, Chromium has had this behavior since
> https://codereview.chromium.org/1937433002, in response to
> crbug.com/523098. The goal is to "maintain sharpness to
> match the JPEG encoder behavior (use WEBP lossless encoding)".
>
> Add a test to verify the new behavior. This requires making tests
> depend on libwebp to use WebPGetFeatures, since the Skia API does not
> provide a way to determine whether an encoded webp file was encoded
> lossless-ly or lossily.
>
> Bug: skia:8586
> Change-Id: Ie9e09c2f7414ab701d696c4ad9edf405868a716f
> Reviewed-on: https://skia-review.googlesource.com/c/175823
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
TBR=reed@google.com, based on prior approval
Bug: skia:8586
Change-Id: I09c73f71996422f797fd9456fef5dfad9af36839
Reviewed-on: https://skia-review.googlesource.com/c/194194
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Auto-Submit: Leon Scroggins <scroggo@google.com>
Add a new constructor which merges the SkISize scaledSize with the
SkImageInfo. This allows passing an SkColorSpace to the decode.
Update the test to call the new API.
Bug: b/123301872
Change-Id: I9fd89198e97ac9b8e6dc9fcfe89ed38913a0fe69
Reviewed-on: https://skia-review.googlesource.com/c/189303
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
This CL does make use of a new GrRecordingContextPriv backdoor to break CL deadlocks. This occurs when this CL tries to create GrContext-dependent objects outside its scope.
Change-Id: I278fe9d321f8e0a4f5e9b489b1a5cc01b8974521
Reviewed-on: https://skia-review.googlesource.com/c/191287
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This fixes an issue in Chrome where Skia is calling a promise SkImage
texture release proc from ~SkImage that in turn flushes a SkSurface.
Prior to this change this caused an assert because we had already
decremented the GrTexture's ref count priot to calling the release
proc. This made the GrTexture purgeable, but the cache had not yet
been notified that the texture was purgeable and still had it in its
array of non-purgeable resources. This triggered an assert in the
cache's self-validation checks during the flush.
Now we call the release proc just prior to decrementing the ref count.
This also makes it legal to re-ref the resources from the release proc.
Bug: chromium:933526
Change-Id: I8cd921b77ca3dfe112089f9a553c1a625160d16d
Reviewed-on: https://skia-review.googlesource.com/c/194000
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I8260d4c95d72f28b619145062f066fcd4e15589d
Reviewed-on: https://skia-review.googlesource.com/c/193960
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Bug: chromium:926235
Change-Id: Id0ead383e1bc11b9baeae61fa5fe94ad75d4e856
Reviewed-on: https://skia-review.googlesource.com/c/193691
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: Nico Weber <thakis@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
This CL does make use of a new GrRecordingContextPriv backdoor to break CL deadlocks. This occurs when this CL tries to create GrContext-dependent objects outside its scope.
Note that special images and surfaces are only created when drawing so they get GrRecordingContexts.
Change-Id: I1493c32604a2cbd8054c916334fa1186f3bfd918
Reviewed-on: https://skia-review.googlesource.com/c/192822
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This CL does make use of a new GrRecordingContextPriv backdoor to break CL deadlocks. This occurs when this CL tries to create GrContext-dependent objects outside its scope.
Change-Id: I925030c818f00559d4c953ae07af53667b44aab9
Reviewed-on: https://skia-review.googlesource.com/c/192032
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
With this formalization, the edge-AA APIs in GrRTC can distinguish
between tiling cases and regular drawing cases implemented using
kNone or kAll for the AA flags. This means fillRectToRect can be
implemented in terms of fillRectWithEdgeAA.
It also means the drawTexture cases will properly handle
isolated draws and tiled draws when drawing into MSAA.
Bug: skia:
Change-Id: I248dd001919228a958cf84b6bc91363b58b72c0b
Reviewed-on: https://skia-review.googlesource.com/c/192023
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This reverts commit e821d21e41.
Reason for revert: enh
Original change's description:
> Make asFragmentProcessor entry point only take a GrRecordingContext
>
> This is split out of: https://skia-review.googlesource.com/c/skia/+/192032 (Switch FP creation over to GrRecordingContext)
>
> TBR=bsalomon@google.com
> Change-Id: I48a5667b1ca31d5648571083fcda76564fae939b
> Reviewed-on: https://skia-review.googlesource.com/c/192687
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
Change-Id: I9041b3479ef5004f14eb5a97c0e25e60f8b8ba14
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/193039
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:8773
Change-Id: I82b1f22f300eadc93f79a35a1638b7eb6376169a
Reviewed-on: https://skia-review.googlesource.com/c/193031
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>