This allows devices (gpu, pdf) which are themselves always dynamically allocated
(since they are reference counted) to provide storage to clipstack, allowing it
to avoid calls to malloc.
Previously this was attempted by embedding the storage directly in clipstack,
but that increased the size of clipstack in all instances, even those where
it might be on the stack. This can be problematic for small-stack environments
like servers.
See previous (reverted) CL: https://skia-review.googlesource.com/c/9522/
BUG=skia:
Change-Id: Ifc7f5ef411303f33513195b1502ea9f281e995c5
Reviewed-on: https://skia-review.googlesource.com/9508
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This rolls the engine past the bad revision which was the cause of the
mentioned bug (22e413ad35481ecd49d232620e7794ce6f544958).
No expectation changes.
BUG=chromium:699379
R=borenet@google.com
Change-Id: I3b44ae54ddec3b2053af59117074b5c1332d0cdf
Reviewed-on: https://skia-review.googlesource.com/9503
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
This reverts commit 94cbbba96f.
Reason for revert: exceeded stack-size on g3 (in SkPDFDevice.cpp:1552
Original change's description:
> prealloc room for some number of Elements to avoid malloc
>
> I chose 16, as in my test case from android, the depth was
> at least 9. Possibly we could make it even smaller if our
> underlying impl (SkDeque) would never prune its allocations,
> so that we don't malloc repeatedly if we save/restore/save/restore
> across the boundary of the first/nth chunk...
>
> BUG=skia:
>
> Change-Id: Id3f0b900b1931f713f80a664f2b4b142f264be8d
> Reviewed-on: https://skia-review.googlesource.com/9522
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>
TBR=bsalomon@google.com,robertphillips@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: I22c45970b1e3f585087ed22f75c300df00c8124d
Reviewed-on: https://skia-review.googlesource.com/9505
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
I chose 16, as in my test case from android, the depth was
at least 9. Possibly we could make it even smaller if our
underlying impl (SkDeque) would never prune its allocations,
so that we don't malloc repeatedly if we save/restore/save/restore
across the boundary of the first/nth chunk...
BUG=skia:
Change-Id: Id3f0b900b1931f713f80a664f2b4b142f264be8d
Reviewed-on: https://skia-review.googlesource.com/9522
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This avoids taking the (more expensive) copy case when we don't need to.
The old behavior only took this fast case if we were "actively" using
a dynamically allocated array.
BUG=skia:
Change-Id: I0f606ba83ff4aff3a8fc282db7a3ce1b0191fb1a
Reviewed-on: https://skia-review.googlesource.com/9521
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
VC++19.10.2517 does not support the C++11 change to allow the address of
internal linkage objects to be used as non-type template arguments.
BUG=skia:6351
Change-Id: I7e1f628db794f950dfba7d043cf6d2fbf0a8c453
Reviewed-on: https://skia-review.googlesource.com/9496
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Technically, we only ever pass kAdopt along one specific code path, but
the remaining functions that have it are at least all similar. This was
another outlier that seems unlikely to ever benefit.
BUG=skia:
Change-Id: If9a1275a2a0b83417225660f5e18c2133681830a
Reviewed-on: https://skia-review.googlesource.com/9494
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
The first phase of deferring GrPipeline creation until flush will apply only to GrDrawOp subclasses that do not derive from GrMeshDrawOp. This change prepares for that by creating separate draw functions on GrRenderTargetContext for GrMeshDrawOp-derived ops. This is temporary and will incrementally be undone as pipeline-creation deferral rolls out to the GrMeshDrawOps in a later phase of this work.
Change-Id: I0f5b71fe913f3273cfe9e965f7d8bbe7f01ad0ef
Reviewed-on: https://skia-review.googlesource.com/9481
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This is the last public reference to GrWrapOwnership, so removal paves
the way for moving it to somewhere internal.
BUG=skia:
Change-Id: I876298642ff812452a644c1d2b9519691eac44b9
Reviewed-on: https://skia-review.googlesource.com/9492
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
We can't use memcpy for copy construction, even when MEM_COPY == true.
Change-Id: I50eb369f0fbf77e8f0ad5a148c67d46df0d3ab0e
Reviewed-on: https://skia-review.googlesource.com/9487
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
Otherwise these can be misclassified as cusps since there is already
tolerance in the discriminant test.
BUG=skia:
Change-Id: Id02c12f671714cebf799953ebed5335ee4c4d52a
Reviewed-on: https://skia-review.googlesource.com/9355
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This is a precursor to adding support for external drawable ops.
BUG=skia:
Change-Id: I3e8b06b4cbe2b5728b7911c22ee74a93d0813f98
Reviewed-on: https://skia-review.googlesource.com/9452
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
BUG=skia:
Change-Id: I4aa3c2707811ece3a63d161035e316c3bbc1cd15
Reviewed-on: https://skia-review.googlesource.com/9482
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Prevent addEndMoveSpans from looping
forever and abort with an error
if the loop count is crazy big.
R=kjlubick@google.com
BUG=684553
Change-Id: I16c250c0b2f88534f809aba17a18081aea4e1f44
Reviewed-on: https://skia-review.googlesource.com/9458
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
Reland of:
https://skia-review.googlesource.com/c/9386/
Desktop (HP z620)
Before:
mipmap_build_2048x2048_0_gamma 10.5 ms
mipmap_build_2048x2048_1_gamma 77.1 ms
After:
mipmap_build_2048x2048_0_gamma 10.5 ms
mipmap_build_2048x2048_1_gamma 41.0 ms
Pixel XL
Before:
mipmap_build_2048x2048_0_gamma 160 ms
mipmap_build_2048x2048_1_gamma 1.5 s
After:
mipmap_build_2048x2048_0_gamma 160 ms
mipmap_build_2048x2048_1_gamma 570 ms
Also provides marginal performance improvements
for other sRGB downsamples.
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind_PreAbandonGpuContext
BUG=skia:
Change-Id: Ia82fc2ef795e1bb63a4a9deac5e38f5fde39f651
Reviewed-on: https://skia-review.googlesource.com/9455
Reviewed-by: Matt Sarett <msarett@google.com>
On Windows, we need to reconstruct the window to allow setting a new
pixel format with a different sample count.
Added some code that maintains window size/position across these changes.
Previously, just cycling through backends would cause the window to move,
as the "default" position would cycle across the screen. Now it's pinned.
BUG=skia:
Change-Id: Iecbe7a490577382043ffe5a88c910b4c0be2ed5c
Reviewed-on: https://skia-review.googlesource.com/9085
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This is split out of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors)
Change-Id: I302e6b4c1ffed449a990288ec06f2dfdcdadf1f8
Reviewed-on: https://skia-review.googlesource.com/9448
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
BUG=skia:
Change-Id: I103ea172a4874bc2a9f644caa406da7afe94aa1c
Reviewed-on: https://skia-review.googlesource.com/9451
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
This reverts commit 91b961d33d.
Reason for revert: need to update caller in android
Original change's description:
> remove SkClipVisitor
>
> With new device clipping, this is unsupported on SkCanvas
>
> BUG=skia:
>
> Change-Id: I39443f213be1005b8b9208d604e4bfb31cbda424
> Reviewed-on: https://skia-review.googlesource.com/9349
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
>
TBR=bsalomon@google.com,robertphillips@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: I22df0c66ec564ca32355179d2ee5ea14bff7b1d5
Reviewed-on: https://skia-review.googlesource.com/9456
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Eliminates a UI oddity on Windows when cycling through backends.
BUG=skia:
Change-Id: I83f0325054def80bb9b6e5a9886461f8aad215ae
Reviewed-on: https://skia-review.googlesource.com/9453
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
BUG=skia:
Change-Id: I6699d00c5412ed9d9bf14b032a08b06b1c766bce
Reviewed-on: https://skia-review.googlesource.com/9398
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Previously this could only be turned on at runtime.
Change-Id: I1b626584fba17fcf8ff64135dd93f98c7f40821d
Reviewed-on: https://skia-review.googlesource.com/9445
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Chrome on android showed an increase of 5% memory use when 2^n block
growth was introduced. Use Fibonacci instead.
BUG=chromium:699130
Change-Id: I228d66385c63d487e72db46356f44e9efb5fa0f3
Reviewed-on: https://skia-review.googlesource.com/9447
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
With new device clipping, this is unsupported on SkCanvas
BUG=skia:
Change-Id: I39443f213be1005b8b9208d604e4bfb31cbda424
Reviewed-on: https://skia-review.googlesource.com/9349
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
BUG=skia:6345
Change-Id: Iaf09eb7f57ae71687c6804221837a8cc8ef04931
Reviewed-on: https://skia-review.googlesource.com/9419
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
allows us to remove SkCanvas::replayClips in future CL
BUG=skia:
Change-Id: I20c3700c8a331b4988fc1332702ff0e0565e94bc
Reviewed-on: https://skia-review.googlesource.com/9417
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This reverts commit 135555101c.
Reason for revert: forgot g3, seems to break Chrome NaCl builders?
https://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Win/builds/15969/steps/compile/logs/stdio
Original change's description:
> Turn on SkJumper all the time.
>
> If the previous CL sticks, it's now easy to turn on SkJumper everywhere:
> I was mostly holding back because of build system complexity.
>
> This has the main effect of turning on SkJumper in Chromium.
> It's already been on on our local test bots and on Android framework.
>
> Change-Id: I7fbfc6aaaa7dace9c3f2cb509583c69b10997dbf
> Reviewed-on: https://skia-review.googlesource.com/9380
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
>
TBR=mtklein@chromium.org,herb@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I69747e9e75b2a8e3d78f6c150c9b6d6453e00632
Reviewed-on: https://skia-review.googlesource.com/9444
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Nonlinear blending mode is going to (sometimes) require additional
uniforms and shader code for color space transformation.
This change just alters the usage of the helper struct so that we can
hide any new logic (without having to change all the FPs that use it).
BUG=skia:
Change-Id: I913478a387973f5bad5aa09a29f85d21daacab94
Reviewed-on: https://skia-review.googlesource.com/9414
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This is to support the preFlush callbacks
Change-Id: I8513ea08b6516681566eceafa789b2ee7925ebce
Reviewed-on: https://skia-review.googlesource.com/9199
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
BUG=skia:
Change-Id: I36755f4bbc405a8af12990573e1f554df012b30a
Reviewed-on: https://skia-review.googlesource.com/9402
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>