Possible next iterations:
- remove another allocation use the SkData trick to share
the object and its (trailing) data
- store a bit that tells use to free each pointer, allowing
the builder to "adopt" some allocations instead of copy.
Larger idea:
- merge with drawPoints to have a single object for both.
BUG=skia:6366
Change-Id: Iec33239aa2ad5d00b36469ca0b88934ddf6f22eb
Reviewed-on: https://skia-review.googlesource.com/9604
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Also adds tolerance to checks against zero
BUG=skia:
Change-Id: I2ad5737c6eef7e3ed52a685dceb347a434607336
Reviewed-on: https://skia-review.googlesource.com/9643
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
BUG=skia:
Change-Id: I643c486066a0cd48e9c985ab5f3ee453c2a533c5
Reviewed-on: https://skia-review.googlesource.com/9644
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The mailbox uses SkTArray internally, so swapping is optimal when dest
has no preallocated storage.
Change-Id: Ic295f3707d07c97b1881e775cac3a23a6b2fef71
Reviewed-on: https://skia-review.googlesource.com/9641
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
BUG=skia:
Change-Id: Idf946faa64dad32a28070a430926a8225dbf6e5a
Reviewed-on: https://skia-review.googlesource.com/9622
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
* Don't rely on '#!', since it doesn't work for Windows cmd shell.
* Consistantly use `tools/git-sync-deps` rather than `bin/sync`.
* Always call `bin/gn` ranther than `gn` in case depot_tools is
missing from the path.
NOTRY=true
Change-Id: I27909f2610d1bb3241874399d7d2f7286f99f43b
Reviewed-on: https://skia-review.googlesource.com/9640
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This doesn't implement the GrSurfaceProxy-based caching but just carves out a space for it.
Split out of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors)
Change-Id: Iec87b45e3264b349d7804f63e361e970b925e335
Reviewed-on: https://skia-review.googlesource.com/9626
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Similar to the SkImage purge mechanism.
Change-Id: I0b7fb1bad507a3c7f30a4f7514bedd894d1748ac
Reviewed-on: https://skia-review.googlesource.com/9631
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
This is pulled out of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors)
Change-Id: I93e233cd80d98c848d79272423cb58505d72ff3e
Reviewed-on: https://skia-review.googlesource.com/9559
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
BUG=skia:
Change-Id: I7b921d34539c071e63a47fb7151dc1dcdaa08cb3
Reviewed-on: https://skia-review.googlesource.com/9636
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
BUG=skia:6364
NOTRY=true
Change-Id: I4fda45c902eb95780c91a9c9a5d38740ec6f9137
Reviewed-on: https://skia-review.googlesource.com/9558
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Using no compression can save up to a minute of overhead on the RPIs, for
a ~10% increase in file size to download, a great tradeoff.
This commit also regenerates svg and skimage to use no compression.
The next time RecreateSKPs is run, it will pick up the no-compression.
BUG=skia:
Change-Id: I7887e0f8152548185fe095c1f05b08696ab055ec
Reviewed-on: https://skia-review.googlesource.com/9630
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
In the common case, there are no intersections in the inner or outer
meshes generated for edge-AA. In that case, we don't have to build
connector edges, and we don't need to run the full simplify and
tessellate path on the full combined mesh. In order to maintain the
correspondence between inner and outer meshes, we can keep partner
pointers between inner and outer vertices instead.
So the new flow is:
- stroke the original boundaries to generate inner & outer meshes
- assign partner pointers to join inner & outer vertices
- build Edges only for Inner and Outer contours
- sort the two meshes independently
- do a complexity check on both meshes (simplified Bentley-Ottmann that
just aborts on the first found intersection)
- if neither mesh is complex, use the fast path:
- tessellate only the inner mesh
- return the outer mesh, and use the partner pointers to generate
the outer geometry triangles
- otherwise, use the complex path (as before):
- connect the inner & outer partners with Connector Edges
- merge the inner & outer meshes via sorted_merge()
- simplify and tessellate the resulting complete mesh
On a 2012 Retina MBP (Intel), this yields:
Canvas Arcs +6%
Stroke Shapes +6%
Fill Shapes +15%
On a Z620 Ubuntu w/NVidia GTX 650:
Canvas Arcs: +5.0%
Stroke Shapes: +1.8%
Fill Shapes: +17.6%
Other changes:
- implemented VertexList::append(VertexList), for use by sorted_merge()
- renamed boundary_to_aa_mesh() to stroke_boundary(), and made it append
inner & outer contours to inner & outer meshes
- the connect() loop at the bottom of stroke_boundary() now uses open
VertexLists, since it can then append them easily to the inner & outer meshes
- sort_and_simplify() changed to sort_mesh(), with merging and simplification
done explicitly by the callers
- sorted_merge() factored out of merge_sort(), for use when zipping together
the inner and outer meshes
Change-Id: Ib00f9f12a375412eff35dd2bb78ccd787d9c37ce
Reviewed-on: https://skia-review.googlesource.com/9600
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
- handle color arrays in drawPatch(), drawVertices(), drawAtlas()
- color filters
Color filter support is a one-off for SkModeColorFilter. I don't know
any other color filters that are parameterized by a color. If there are
any/many, we may want to wire up something more comprehensive here.
Change-Id: Ibc89574e3a32d38af3bc2443a7d4bac0bb52d493
Reviewed-on: https://skia-review.googlesource.com/9601
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This builds fine on my laptop, but fails to link on the bots,
so I'm leaving out a new Build bot for now.
BUG=skia:6329
Change-Id: I4b33770f13ab9dec914d090b45d9921b19ee2c9d
Reviewed-on: https://skia-review.googlesource.com/9519
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
This will be needed to have GrDrawOps that haven't yet built pipelines.
Change-Id: If5292aaa5dc9f98dccbe27be98960b630332158d
Reviewed-on: https://skia-review.googlesource.com/9480
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
TODO:
images
shaders
color filters
image filters
a couple stray color arrays
Change-Id: Ib91639bb0a6a00af737dd5186180011fe5120860
Reviewed-on: https://skia-review.googlesource.com/9529
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This compacts the object so that it is more efficient for ops to store it.
It also adds a new constructor and query that will allow ops to use the analysis to also store the GrPaint's color.
This has the side effect of limiting the number of color processors on a GrProcessorSet to 64K which is just under 64K more than should ever be needed.
Change-Id: I4e6bc8e3f81bb2ff6a73af685beb6fb928a3de67
Reviewed-on: https://skia-review.googlesource.com/8972
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Always create them budgeted, and register them with the cache (not as
wrapped resources).
Re-land (with fixes) of: https://skia-review.googlesource.com/9497
BUG=skia:
Change-Id: I2df7198adc99efa3eea99fc86b0b2930136f22c7
Reviewed-on: https://skia-review.googlesource.com/9544
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
We can flag the last run record instead. Run iteration is always
sequential, so no penalty.
As a side effect, we can no longer allow instantiation of zero-run text
blobs - but that seems like a good idea anyway.
Change-Id: I7ca80c4780623d5a188f92dfe6d6fe152f20f666
Reviewed-on: https://skia-review.googlesource.com/9149
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
BUG=skia:
Change-Id: Id8c90c6fb2e8f94713937b2e85666c76e96df2ed
Reviewed-on: https://skia-review.googlesource.com/9550
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Adds examples of circular reveal and XY tilt.
BUG=skia:6119
Change-Id: I9e7e7729e1d74249e985bc185cb4936f70a75544
Reviewed-on: https://skia-review.googlesource.com/9540
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This reverts commit cccda60aca.
Reason for revert: Android and Windows bot failures.
Original change's description:
> Treat cross context images as Ganesh-created resources
>
> Always create them budgeted, and register them with the cache (not as
> wrapped resources).
>
> BUG=skia:
>
> Change-Id: Id18ecf6e9e512db4be21b4f2bfd8e8c060bbe805
> Reviewed-on: https://skia-review.googlesource.com/9497
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>
TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: Ib7bebcad33037dd206c9b06b5cb6c503b00accba
Reviewed-on: https://skia-review.googlesource.com/9541
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Always create them budgeted, and register them with the cache (not as
wrapped resources).
BUG=skia:
Change-Id: Id18ecf6e9e512db4be21b4f2bfd8e8c060bbe805
Reviewed-on: https://skia-review.googlesource.com/9497
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
We'll be adding GalaxyS7_G930FD soon.
NOTRY=true
BUG=skia:6359
Change-Id: I3235576957ea0c395c8d42ee09d5ee89946176d9
Reviewed-on: https://skia-review.googlesource.com/9091
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
The element rearrange logic in SkTHashTable::remove() marks empty slots
as such, but does not reset their value.
When breaking out of the rearrange loop, we must also reset the last empty
slot value to avoid retaining unwanted copies.
Change-Id: I8ba2a25088c0aa5210277124e0917224cb295691
Reviewed-on: https://skia-review.googlesource.com/9533
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
We used to (incidentally) guard for this when we used bitmapdevice as our backnig.
Now that we have a (faster) nodrawdevice, we need to explicitly guard for it.
BUG=skia:
Change-Id: I9cbbf064cbfced78f0004a2e5aff60aa3ded6215
Reviewed-on: https://skia-review.googlesource.com/9530
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Reed <reed@google.com>
We never adopt render targets (just borrow them).
BUG=skia:
Change-Id: Ie899b814a7a81339a8735bbd7ad9facc66e580d7
Reviewed-on: https://skia-review.googlesource.com/9525
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
One of SkImageCacherator, GrBitmapTextureMaker, GrImageTextureMaker, GrTextureAdjuster, GrTextureProducer or SkImage has to take the first step. This is probably the least odd of the options.
Change-Id: Ie167034553451f4b3633a5a1548dbd4d75839b3d
Reviewed-on: https://skia-review.googlesource.com/9488
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>