This is split out of https://skia-review.googlesource.com/c/7889/ (Remove SkSpecialImage's GrTexture-based ctors) to allow focusing on the caching/subsetting changes.
Change-Id: Ic2af7a0d03e88941ab5b6cdfcecbbdefe3578eda
Reviewed-on: https://skia-review.googlesource.com/8456
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
The previous approach re-inflated views on every frame simply because the FPS
number changed (which was passed in a JSON object and used to check whether
the old view matched the new one based on a tag on the view that was set by
the previous FPS string).
The new approach is not pretty (there's no reason to even re-populate the
views when the only thing that needs to happen is to set the appropriate
FPS info in the floating TextView), but at least this avoids the inflation
overhead of the previous approach.
BUG=skia:
Change-Id: Ide1c736c49663cfcf478653a7cdaa99c736f1783
Reviewed-on: https://skia-review.googlesource.com/8461
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Chet Haase <chet@google.com>
Easier to work on SkJumper with SkSplicer out of my hair.
Change-Id: I6217082c5b4f83c79ac231f23e42a92d2efd6446
Reviewed-on: https://skia-review.googlesource.com/8509
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Add a null-check on geometry processor creation.
Add a test which exercises it: AA tessellator, with a non-invertible
matrix and a fragment processor which needs local coords (e.g., linear
gradient).
BUG=691902
Change-Id: I005b893aed58d3ad2500c41501045ac94b0b4b95
Reviewed-on: https://skia-review.googlesource.com/8462
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Also refer to it directly rather than using the term "modulate"
Change-Id: Ifa44a4d46e1be11b567943f58ead24e38f10d03b
Reviewed-on: https://skia-review.googlesource.com/8488
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Instead of trying to genereate snippets of code that an work when
splicing and when interpreting, let's just make one snippet for each.
And then, let's add one more portable single float version!
Why build one when you can have three at thrice the price?
This doesn't make these new strategies active, but does start moving the
code in build_stages.py and SkSplicer_stages.cpp towards that.
Change-Id: I2197fa2a11e233f24da67e54a4f291135652b087
Reviewed-on: https://skia-review.googlesource.com/8453
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
As a soft rollout, this only affects the Linux NUCS
(on Ubuntu16).
BUG=skia:6206
Change-Id: Ic314e85159cd3c0d9e55bbdce412a8d61adebb33
Reviewed-on: https://skia-review.googlesource.com/8276
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
This will prevent us from clipping the gamut
to sRGB.
BUG=skia:
Change-Id: Ifc34369d96aa9dd92ae2af72aac1cfa17fdc4b94
Reviewed-on: https://skia-review.googlesource.com/8025
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
BUG=skia:6242
Change-Id: I63cce6019ce854ba807b2a819ef4fe3214898bee
Reviewed-on: https://skia-review.googlesource.com/8344
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
BUG=skia:
Change-Id: I4f3c6370b3ef4247aa446716c7c154899925d089
Reviewed-on: https://skia-review.googlesource.com/8442
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
This also fixes bin/coverage.
fuzz/coverage borrows heavily from bin/coverage.
BUG=skia:
Change-Id: I9e353d1f5ea3bca1d57d66b1c1ecabc6f9b23cee
Reviewed-on: https://skia-review.googlesource.com/8414
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Returns? Where we're going, we don't need returns.
I have discovered a truly marvelous alternative, a description of which
this code review is too narrow to contain.
Change-Id: I13fb36eb75771bc691d8187dddd876efcebc57d6
Reviewed-on: https://skia-review.googlesource.com/8480
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Detect collapsed coords and implement using a solid color shader.
Replace SkTLazy objects with a stack-based SkArenaAllocator.
Change-Id: I5d867648d551ea30558fd8ae0c99b9292bc92961
Reviewed-on: https://skia-review.googlesource.com/8451
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Enforce that picture backed images created by the public API
must have a non-null SkColorSpace.
SkPictureShader uses a private call to get around this restriction.
BUG=skia:
Change-Id: I2fc11a8ffe583035d09e83abf40b827fbf575321
Reviewed-on: https://skia-review.googlesource.com/8415
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
Fixes loading a Sample as first slide.
Adds char input.
Adds --slide and --list options.
Change-Id: I34b66818e3673fcfdc649443e7d9dfb74b478062
Reviewed-on: https://skia-review.googlesource.com/8445
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Rob and I spent a long time debugging why this wasn't working for
Flutter - doing the more complex operations on the loading thread
produces a blank texture when it's used later on the drawing thread.
Limiting ourselves to just creating and uploading RGBA data fixes
that. We need to debug what's going wrong, but in the meantime, this
lets Flutter use Skia APIs to manage GPU uploading and lifetime of
texture-backed images, while still doing those uploads on their IO
thread.
BUG=skia:
Change-Id: Ibf5c37f2439814544beab8c93c2a646f7a9e779d
Reviewed-on: https://skia-review.googlesource.com/8443
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
These bots have never worked so we're just waisting cycles on them. The
Pixels have the same GPU and an up to date driver so we're not losing
any test coverage.
BUG=skia:
Change-Id: I339c8191d80843399dd5d31d19f6808b235f6672
Reviewed-on: https://skia-review.googlesource.com/8446
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Move SkDOM and ilk from include/xml to src/xml.
I have looked for uses of SkDOM in the depot using cs/ and have found none,
but this is not perfect. So, if this breaks external builds, revert it.
TBR=reed@google.com
Change-Id: I162a1977f0649b049c0f93f016701784d025996d
Reviewed-on: https://skia-review.googlesource.com/8447
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
With the flag (SkDevice.h) enabled, I get correct drawing w/ the rasterbackend.
After this lands, hopefully we can work in parallel on gpu/pdf/svg/xps/etc.
BUG=skia:6214
Change-Id: Ie35fee818470aab57aebacca8a2a5b812a552ee2
Reviewed-on: https://skia-review.googlesource.com/8192
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
BUG=skia:
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Change-Id: Idc76999d0f5591a567b3976cb9db829c350e4be2
Reviewed-on: https://skia-review.googlesource.com/8304
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
Since SkAutoBitmapShaderInstall was simplified to create shaders on the
heap, it is no longer needed. Simplify to a single routine.
TBR=mtklein@google.com
Change-Id: Ib18be559b03e234a05105d0892c1457cafce28b7
Reviewed-on: https://skia-review.googlesource.com/8391
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
We don't use these anywhere downstream except to check for opaqueness.
Change-Id: I897137135d69004ed45c0f4c1e7297183f49fc6d
Reviewed-on: https://skia-review.googlesource.com/8402
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Change-Id: I3a5475eb3e76eef19183950f14e17b119f32458b
Reviewed-on: https://skia-review.googlesource.com/8405
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
dstover was updating the {dr,dg,db,da} registers instead of {r,g,b,a}.
Change-Id: Ie2280abe80efb274fb422dc38a329c6dac12f846
Reviewed-on: https://skia-review.googlesource.com/8404
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This reverts commit 07f665efb9.
Reason for revert: Android code moved from priv api to real api
Original change's description:
> Revert "Always make SkImageShaders in heap."
>
> This reverts commit ff590a1244.
>
> Reason for revert: This breaks the android roll because they are using
> a private call. Updating android tests to use new api.
>
> Original change's description:
> > Always make SkImageShaders in heap.
> >
> > I made a couple of measurments, and it looks like any differences is
> > well below the noise threshold.
> >
> > Just for the record run1: .9991 of baseline and run2 .9988 of baseline.
> > I was using top25 .skps as workload.
> >
> > TBR=mtklein@google.com
> >
> > Change-Id: If4fa06e5d5df72fb67dbb4bbb99c926f05765897
> > Reviewed-on: https://skia-review.googlesource.com/8341
> > Reviewed-by: Herb Derby <herb@google.com>
> > Commit-Queue: Herb Derby <herb@google.com>
> >
>
> TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: Ibdaafc796702e250933b62e5f4abb5e2ce8d40c0
> Reviewed-on: https://skia-review.googlesource.com/8393
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Herb Derby <herb@google.com>
>
TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I320b5ebf707d74ffafd8b70d69646b74a30f0ae8
Reviewed-on: https://skia-review.googlesource.com/8407
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
The GP will likely require this value when dealing with a geometry
shader. In the future we may wish to either switch to device-space
geometry shaders, or else put this value in an "sk_" builtin.
BUG=skia:
Change-Id: I8dff88fc219feef84d39fb7bbd08f3b5686f53d2
Reviewed-on: https://skia-review.googlesource.com/8362
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
When sanitizing contours, if the first and last vertices coincide,
continue with the previous vertex, not the next vertex, since we
may otherwise exit prematurely. Also, round the last vertex before
entering the loop, just in case it coincides with the first.
Add a test case to exercise the above, and another one which exercises
the intruding-vertex workaround.
BUG=691593
Change-Id: Ic28a9308a21164d185edef0ee6fbc29b40742149
Reviewed-on: https://skia-review.googlesource.com/8364
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
One more piece of https://skia-review.googlesource.com/c/8230/.
-mno-red-zone makes it safe for x86 stages to use the stack on Windows
(at the expense of an extra sub and add to the stack pointer on !Windows).
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug,Test-Win10-MSVC-Golo-GPU-GT610-x86_64-Release,Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug
Change-Id: I81f8220e790b201757a7e1e9752b2fe94520ccbb
Reviewed-on: https://skia-review.googlesource.com/8352
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
This reverts commit ff590a1244.
Reason for revert: This breaks the android roll because they are using
a private call. Updating android tests to use new api.
Original change's description:
> Always make SkImageShaders in heap.
>
> I made a couple of measurments, and it looks like any differences is
> well below the noise threshold.
>
> Just for the record run1: .9991 of baseline and run2 .9988 of baseline.
> I was using top25 .skps as workload.
>
> TBR=mtklein@google.com
>
> Change-Id: If4fa06e5d5df72fb67dbb4bbb99c926f05765897
> Reviewed-on: https://skia-review.googlesource.com/8341
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
>
TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: Ibdaafc796702e250933b62e5f4abb5e2ce8d40c0
Reviewed-on: https://skia-review.googlesource.com/8393
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
This should land as a no-op, as nothing using the stack yet.
It will allow us to land the SSE2 code, which does spill in to_srgb.
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug,Test-Win10-MSVC-Golo-GPU-GT610-x86_64-Release
Change-Id: Ie8000d50a85d56ad6229736d79f3a947f06a808c
Reviewed-on: https://skia-review.googlesource.com/8389
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Change-Id: I0ab76132b9e21544ed3dfb87bd7adc91c4c4e656
Reviewed-on: https://skia-review.googlesource.com/8387
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>