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>
Change-Id: I7deb9b49b4a3a361888a6afc07b4c6341a4b16cf
Reviewed-on: https://skia-review.googlesource.com/9410
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
Currently in SkFontMgr_DirectWrite when trying to find some last resort
font SystemParametersInfoW failing is considered a fatal error and so
onLegacyCreateTypeface will return nullptr. Instead, treat failure of
getDefaultFontFamily as ignorable and continue to the default default.
BUG=chromium:697672
Change-Id: I1ea018627487fbd39b1d0eebad4c798346d09c94
Reviewed-on: https://skia-review.googlesource.com/9408
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
* Work around BUG=chromium:696356
* SkTestScalerContext needs a return a em-size.
* SkPDFFont::MakeVectorCache which always produces a glyph
cache at emsize. Replaces vector_cache().
* Stop looking at fLastGlyphID and fEmSize in TypefaceMetrics.
Change-Id: I28d93b8f62d461a60fa046e9aaf7fa6d116a7ee5
Reviewed-on: https://skia-review.googlesource.com/9324
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Change-Id: I0cc82fe826b81a082b579f60af3d9ef35d5fe351
Reviewed-on: https://skia-review.googlesource.com/9407
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
No policy or behavior changes here, just a rename.
BUG=skia:
Change-Id: Ieefa5c5bbd40f25d4fef81f07b50b4057ea732b4
Reviewed-on: https://skia-review.googlesource.com/9406
Commit-Queue: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
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 25.1 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 313 ms
Also provides marginal performance improvements
for other sRGB downsamples.
BUG=skia:
Change-Id: Icfcd2ccd69676ccf3822db8042a4698e4464bb71
Reviewed-on: https://skia-review.googlesource.com/9386
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
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>
Instead of a single-level cache with blob-id-derived key, refactor GrTextBlobCache
as a two-level cache with a direct blob-id key (to support efficient lookup by id in
future CLs).
Change-Id: Idf29c05224faeb04919610a3935572773d5aba03
Reviewed-on: https://skia-review.googlesource.com/9400
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
BUG=skia:6337
NOTRY=true
Change-Id: Ibddd57c461d3a1ce62245487dfc0e4eeeba1978a
Reviewed-on: https://skia-review.googlesource.com/9397
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
* Also fix SkRRect generation to only make valid RRs.a
* drawDRRect only draws if outer contains inner.
* Also fix SkComposeColorFilter::toString
Change-Id: Ia75da2813555b7714663929d0ec288ae2a86d9f1
Reviewed-on: https://skia-review.googlesource.com/9399
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>