Bug: chromium: 758161
Change-Id: I2472ff59af2fab05d94d88d5effb44828e8a5132
Reviewed-on: https://skia-review.googlesource.com/37800
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Change-Id: Id626f954fe45546a015a1bd423f19cca5f8967a9
Reviewed-on: https://skia-review.googlesource.com/37861
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
From local testing, TSAN causes this to happen for 40-50 GMs in the
middle of a DM run. Having this message would have saved me a couple
hours of head-scratching and debugging.
Best theory about the TSAN thing is that it interferes with a driver
thread that's reclaiming freed resources, but that's just a guess.
Bug: skia:
Change-Id: Ie6759fd2f22953595920cb271e2317c5ed1a0941
Reviewed-on: https://skia-review.googlesource.com/37441
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Only blitAntiH & blitMask/kA8 for now, but hopefully we can extend for
blitRect & blitMask/kLCD16 also.
Change-Id: I5e888d49c0c11f2f1fc595dbfb382044fc224edc
Reviewed-on: https://skia-review.googlesource.com/37542
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
NaNs can't be correctly sorted.
Don't run the unit test on VK backend, since it requires large (>64K bytes) vertex buffer uploads.
Bug: 757650
Change-Id: I667693f135a090a5d9076bb7a2ec6879fc06d645
Reviewed-on: https://skia-review.googlesource.com/37484
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
When Skia's built with an interestingly advanced instruction set
baseline like SSSE3 or SSE4.1, we end up with two distinct copies of
some SkOpts functions, one default in SkOpts.o and one specialization
from SkOpts_{ssse3,sse41}.o. These functions are static, and so are
technically unrelated, even though they're the same code compiled with
the same instructions available. They're going to be identical.
What we want here is to remove static but mark them as inline instead.
In this case inline means "if the linker sees multiple copies of this,
that's cool, just pick any one arbitrarily". That's just what we want.
Now, when I disassemble a binary before and after this change, I do see
the redundant routines removed. However, the file size change is
minimal... I suspect that this must mean the linker has noticed that we
had identical code and physically folded the two logically independent
routines. I don't know how prevalent this optimization is, though, so
it doesn't hurt to give it more of a "one copy please" hint with inline.
There may also be a difference here between the binary size (~unchanged)
and the in-memory layout of that binary?
Change-Id: Id9c8f0ffc84aa1c9a066c22b623d34adab281857
Reviewed-on: https://skia-review.googlesource.com/37501
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
As a preface to having all the atlas texture coordinates be absolute they must all first be integers. In the case of the small path renderer that means that the rect for the DF case must be bloated out a bit.
Change-Id: I9969fcfe9d3ae3247a2964e2ca79cad522ccad9e
Reviewed-on: https://skia-review.googlesource.com/37360
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
There's no reason to call Init_ssse3() if we know Skia's built globally
with SSSE3. And there's definitely no reason to call Init_ssse3() if
Skia's build globally with SSE4.1+.
These are the only places the Init_foo() methods are called, and those
in turn are the only places that refer to their optimized routines, so
guarding like this allows redundant routines to be dead-code stripped by
the linker.
There are still situations where we end up with two copies of the same
routine, compiled at _the same_ optimization level. If you're on a Mac
and have SSSE3 or SSE4.1 as your global baseline instruction set, you'll
get two copies, one from SkOpts.o's defaults, and one from
SkOpts_{ssse3,sse41}.o's "better" routines. I'm still thinking about
how to best fix this. Might just be as simple as removing "static" and
letting the linker dedup.
This cuts off about 70K of code on a build of ok.
Change-Id: Ia349d2c5299072bbd43966132798500de059b9ca
Reviewed-on: https://skia-review.googlesource.com/37600
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
GrContextOptions has an SkExecutor field, allowing clients to supply a
thread pool. If present, the GrContext will create an SkTaskGroup that
can be used for internal threading work.
Bug: skia:
Change-Id: I8b01245515a21a83f9fe838caf0a01c9a26c0003
Reviewed-on: https://skia-review.googlesource.com/37580
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Set doConsumeDegenerates to false when calling SkPath::Iter::next() for
all paths which are not in screen space. These lines are not degenerate
for world space paths.
Note: this change fixes only GrTessellatingPathRenderer and
GrDefaultPathRenderer. GrMSAAPathRenderer still exhibits the bug.
Bug: skia:6987
Change-Id: Ie3d494703211925c77052c68513948484e341486
Reviewed-on: https://skia-review.googlesource.com/37522
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This reverts commit 267641a90c.
Reason for revert: Seems to be turning the bots red
Original change's description:
> Fix artifacts on tiny stroked paths scaled up a lot.
>
> Set doConsumeDegenerates to false when calling SkPath::Iter::next() for
> all paths which are not in screen space. These lines are not degenerate
> for world space paths.
>
> Bug: skia:6987
> Change-Id: I411faf594bf8a15891bfff08691e86679b7741ac
> Reviewed-on: https://skia-review.googlesource.com/36881
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Stephen White <senorblanco@chromium.org>
TBR=bsalomon@google.com,senorblanco@chromium.org
Change-Id: I0d5a14670126ab3e0d99083a500ec8d3d0ef9961
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6987
Reviewed-on: https://skia-review.googlesource.com/37440
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit 20af6d12ee.
Performance regressions on Android and Flutter
Change-Id: If70edbe85aa251f298eddf18a89ba2cf56ed94fb
Reviewed-on: https://skia-review.googlesource.com/37340
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
BUG=chromium:749147
Change-Id: I2d4259805300c3f5ed9d25e142e9f12570c59781
Reviewed-on: https://skia-review.googlesource.com/37121
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
If an SkPathRef is constructed from arbitrary memory, it might not be
valid. However, any SkPathRef should be able to be destroyed cleanly.
An alternative to this would be to have CreateFromBuffer always do
the validation (even in release builds), return null for invalid ones,
and do the cleanup itself, but this seems like extra complication and
maybe not something general release builds want.
Bug: chromium: 752755
Change-Id: I1d509a5d5d0b173c20162ff79d731d6c8b4b6fb4
Reviewed-on: https://skia-review.googlesource.com/37321
Commit-Queue: Adrienne Walker <enne@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This is like an op, but only has one virtual, and always runs before
any ops prepare. To be used in threaded software mask rendering
(to schedule ASAP uploads).
Bug: skia:
Change-Id: I647482e2472d7321f3685e5bdbe49e10ac59c0b1
Reviewed-on: https://skia-review.googlesource.com/37160
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The method already always returns true, except in a single case after
asserting.
Change-Id: Icf241a8af04220d459c0782ffd9b74c34c753236
Reviewed-on: https://skia-review.googlesource.com/37161
Reviewed-by: Chris Blume <cblume@chromium.org>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Set doConsumeDegenerates to false when calling SkPath::Iter::next() for
all paths which are not in screen space. These lines are not degenerate
for world space paths.
Bug: skia:6987
Change-Id: I411faf594bf8a15891bfff08691e86679b7741ac
Reviewed-on: https://skia-review.googlesource.com/36881
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
NaNs can't be correctly sorted.
Bug: 757650
Change-Id: Id1ca2fe1d1de7884da2a64ceef9491b1da7e8e77
Reviewed-on: https://skia-review.googlesource.com/37220
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
There was no way to get this behavior without triggering an error before.
Bug: skia:
Change-Id: Id9cb9090e47226dadad0032f06ec205dd2538dcc
Reviewed-on: https://skia-review.googlesource.com/37001
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Things ran slower when we attempted to turn it on,
and we've already removed the analog in SkJumper_stages.cpp.
Change-Id: I61afa38990bf54d1bff2b1902f09a14df4e17da9
Reviewed-on: https://skia-review.googlesource.com/37080
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Flag no longer defined.
Change-Id: I4b4aa33ecd23b485cf80d79882f52da96c82a567
Reviewed-on: https://skia-review.googlesource.com/36822
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
We were ignoring the path renderer flag when drawing GMs or SKPs.
Bug: skia:
Change-Id: Iee443fb70f1faec65e46925fa0e3cea3716d448d
Reviewed-on: https://skia-review.googlesource.com/36861
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Make initializeColorXform private, and only call in the base class.
Add virtual method to skip initializeColorXform, for classes that do
not need one.
Change SkCodec::FrameInfo's SkAlphaType to an SkEncodedInfo::Alpha.
This allows proper checking internally whether SkCodec needs to do a
color correct premultiply.
Depends on https://chromium-review.googlesource.com/c/620947, for this
API change.
(Separated from review.skia.org/25746)
Bug: skia:5609
Bug: skia:6839
Change-Id: Icb0d46659c546060c34d32eaf792c86708726c7a
Reviewed-on: https://skia-review.googlesource.com/35880
Reviewed-by: Chris Blume <cblume@chromium.org>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Previously it was the size of the original image with the subset contents at the top left.
Change-Id: I9a50e44e5666acb06d9c3cfbb850c31e52a9e405
Reviewed-on: https://skia-review.googlesource.com/36441
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
These are already disabled on WIC, but they are supported by SkCodec.
Bug: skia:6984
Change-Id: Ib248749f357debcc173dfaa2bcd5adc8da52df22
Reviewed-on: https://skia-review.googlesource.com/36440
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
The SkiaRenderer in chromium is going to use the overdraw canvas and
filter for measuring overdraw. Move these headers out of src/ into
include/.
Bug: chromium:704285
Change-Id: I2abb1671b73e3d26552462cf700340a7e3b874f0
Reviewed-on: https://skia-review.googlesource.com/36160
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: Ia2cb5da2df380b02b81afb99a94ca48a93c5349d
Reviewed-on: https://skia-review.googlesource.com/36420
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>