Commit Graph

10089 Commits

Author SHA1 Message Date
Greg Daniel
7c9021185c Remove SkImage getTexture call.
Change-Id: Ib9f3d8c58ee5736bfee03eaedff20f24b51d5ff9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275625
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-03-06 18:53:00 +00:00
Leon Scroggins III
94aaf7cdf5 Split building encoding from decoding
Bug: skia:9756

In CanvasKit, a large part of the binary is for encoding. Clients
would be happier with a smaller binary and no webp/jpeg encoding. Make
this an option by splitting up the GN arguments.

Split SK_HAS_WEBP_LIBRARY into SK_CODEC_DECODES_WEBP (to match the
existing SK_CODEC_DECODES_RAW) and SK_ENCODE_WEBP. Same for JPEG and
PNG.

Update CanvasKit compile script to disable webp and jpeg encoding.
Update debugger compile script to disable all encoding.

Change IsPng signature to match other SkCodecs.

Change-Id: Iec8466ee1b76bc3d1e377c24201068b776cd7718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273768
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-03-06 18:50:40 +00:00
Mike Reed
1d4db3bcae remove bone variant of drawVertices (unsupported)
Bug: skia:9984
Change-Id: I764ac34130f5469b4f4937b48649f57f872cf787
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275458
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-05 21:34:17 +00:00
Greg Daniel
456f9b5fe9 Reland "Move GrGpuResource GrSurface and GrTexture into src."
This reverts commit f6ed96d1c2.

Reason for revert: google3 change landed

Original change's description:
> Revert "Move GrGpuResource GrSurface and GrTexture into src."
> 
> This reverts commit e5a06ce678.
> 
> Reason for revert: Need to make change in google3 first
> 
> Original change's description:
> > Move GrGpuResource GrSurface and GrTexture into src.
> > 
> > Must land https://chromium-review.googlesource.com/c/chromium/src/+/2087980
> > before this can land.
> > 
> > Bug: skia:7966
> > Change-Id: I60bbb1765bfbb2c96b2bc0c9826b6b9d57eb2a03
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275077
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
> 
> Change-Id: Id39e0a351e49a87209de88a6ad9fadb0219db72c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:7966
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275216
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com

Change-Id: I746ce739cb084cefc46f9dab24ef773e7c3cc621
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7966
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275436
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-03-05 19:16:21 +00:00
Mike Reed
50c64ab259 expose per-vertex-data variant of SkVertices
Bug: skia:9984
Change-Id: Iaff520c6085303830f14bac4fe56830ba7360f64
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275218
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-05 18:32:08 +00:00
Mike Klein
ec370976c6 move skvm interpreter to SkOpts again
This is the easiest way to guarantee Op::fma_f32
actually fuses, by using platform intrinsics.

While implementing this we noticed that quad-pumping
was actually slower than double-pumping by about 25%,
and single-pumping was between the two.  Switch from
quad to double pumping.

Change-Id: Ib93fd175fb8f6aaf49f769a95edfa9fd6b2674f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275299
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-03-05 17:47:42 +00:00
Greg Daniel
f6ed96d1c2 Revert "Move GrGpuResource GrSurface and GrTexture into src."
This reverts commit e5a06ce678.

Reason for revert: Need to make change in google3 first

Original change's description:
> Move GrGpuResource GrSurface and GrTexture into src.
> 
> Must land https://chromium-review.googlesource.com/c/chromium/src/+/2087980
> before this can land.
> 
> Bug: skia:7966
> Change-Id: I60bbb1765bfbb2c96b2bc0c9826b6b9d57eb2a03
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275077
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com

Change-Id: Id39e0a351e49a87209de88a6ad9fadb0219db72c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7966
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275216
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-03-05 01:46:51 +00:00
Greg Daniel
e5a06ce678 Move GrGpuResource GrSurface and GrTexture into src.
Must land https://chromium-review.googlesource.com/c/chromium/src/+/2087980
before this can land.

Bug: skia:7966
Change-Id: I60bbb1765bfbb2c96b2bc0c9826b6b9d57eb2a03
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275077
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-03-04 23:01:31 +00:00
Jim Van Verth
3a5974f68d Add Direct3D compile bots
Bug: skia:9935
Change-Id: I6d9c14ac674dee89a5a8ba726d99b4423c40eb9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274861
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-03-04 17:36:24 +00:00
Mike Reed
ee9ce59346 Reorganize vertices internals, in prep for extending with per-vertex-data
Bug: skia:9984
Change-Id: I50f9bd126ab27895db2a2c6dd4d078b8d6c98b15
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274940
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-04 15:15:31 +00:00
Brian Salomon
64a3f8fcb7 Revert "Use spin lock in SkIDChangeListener"
This reverts commit a624a534ed.

Reason for revert: Bad perf

Original change's description:
> Use spin lock in SkIDChangeListener
> 
> This lock should almost never be contested. This simplifies things and
> also avoid mutex locks when one thread has multiple refs on a path,
> image, ...
> 
> Change-Id: I909b490363cb9e81b38ed9edd04272133fb2692b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274676
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,brianosman@google.com

Change-Id: I45ec3241906429e4d0783b68ebe6398079b73d36
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274956
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-04 03:40:11 +00:00
Robert Phillips
d6900440ef Switch member destructor order in SkDeferredDisplayList
With the addition programInfos being stored on DDLs we need to ensure that the programInfos are deleted before the GrCCPerOpsTaskPaths.

W/o this change we can hit an assert in ~GrCCClipPath.

Change-Id: I02a2b195cae1dfd84a3e9cd2cf6c9b5194c430a8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274860
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-03 19:32:20 +00:00
Brian Salomon
a624a534ed Use spin lock in SkIDChangeListener
This lock should almost never be contested. This simplifies things and
also avoid mutex locks when one thread has multiple refs on a path,
image, ...

Change-Id: I909b490363cb9e81b38ed9edd04272133fb2692b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274676
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-03 16:58:00 +00:00
Mike Reed
a2cf8ae420 switch to virtual with no bones
Bug: skia:9984
Change-Id: I89d8f5f227690c71be875b5a7718aba0ad058650
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274504
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-03-03 13:35:00 +00:00
Brian Salomon
71fe945da3 Prevent unbounded listener growth on SkPixelRefs.
Use SkIDChangeListener and update GrBitmapTextureMaker to add listener
to key to deregister if texture is purged before genID changes.

Add a common listener list implementation and replace existing lists.

Change-Id: Ib0c78241eaf59b59b892d8b004b2bb095140bc6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274549
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-03-02 22:32:09 +00:00
Mike Reed
5caf9358c3 remove bones from SkVertices
Bug: skia:9984
Change-Id: I7c4f33ee82087eb1b0a60243183f0c68e310f10d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274547
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-03-02 20:30:59 +00:00
Brian Salomon
99a813ca29 Avoid unbounded listener growth on SkImage_Lazy when textures are purged
Generalizes the system used on SkPathRef where a GrTexture's key
destructor signals that a listener on the image can be removed via
the unique key custom data.

Removes texturesAreCacheable() from SkImageGenerator. This was used to
prevent unbounded growth in a narrow situation related to
GrBackendTextureImageGenerator.


Change-Id: I3c605da099acfac94751e793331e356a0979d359
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274038
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-02 18:38:09 +00:00
Brian Salomon
ecbb0fb2d5 Simplify view getters on GrTextureProducer.
The only thing that affects the view returned is whether it ought to
be MIP mapped or not. So don't take a whole GrSamplerState.

The view() function won't ever change the colortype so just query
GrTextureProducer rather than having view() return a tuple.

The rest is transitively reaching through callers and callees of
GrTextureProducer::view() to only pass filter or GrMipMapped instead of
GrSamplerState. Also, some params that indicate whether MIPs are
requested are changed from bool to GrMipMapped. And some minor style
stuff (mainly de-yoda-ifying GrMipMapped checks, using
GrSurfaceProxyView operator bool()).

Change-Id: Ia184aa793cf51d42642ea3bb0521ce06da2efb10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274205
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-01 00:32:04 +00:00
Nathaniel Nifong
e71bcc61e8 Add a condition to prevent a thread annotation meant for blaze from showing up to emscripten
Change-Id: Ie84d3fd6ae1625cd0e5b0959a30b94f9142ee30e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273876
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-02-28 17:57:20 +00:00
Jim Van Verth
888ba8b3da Initialize D3D format table.
Set up the expected formats we'll want.
Doesn't include YUV formats just yet.

Bug: skia:9935
Change-Id: I934a7ef006b5a218a5f637774aea5f082202cd3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273877
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-28 15:01:31 +00:00
Jim Van Verth
c86c83cd80 Add DXGI_FORMAT to BackendFormat.
First steps to getting D3D texture format caps set up.

Bug: skia:9935
Change-Id: I905aaedd7d5fcc8b5137fcc8d8189e93260c9359
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273797
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-02-27 21:24:46 +00:00
Mike Klein
4c690b442f add metadata to calculated bounds
For Flutter, mark each bounds rect as a draw or not.

saveLayer() is the trickiest part: it doesn't draw, but its paired
restore() does, while a restore() paired with save() doesn't.

Change-Id: I5f0dc61ad5543265c5ea2bf41b236f57915847b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273501
Reviewed-by: Emmanuel Garcia <egarciad@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-02-27 19:12:35 +00:00
Michael Ludwig
fb3f302bdf Reland "Track device coordinate space as matrix"
This reverts commit 915b779f9c.

Reason for revert: finally coming back to this, figure out what's wrong on Android

Original change's description:
> Revert "Track device coordinate space as matrix"
> 
> This reverts commit b74d5548a4.
> 
> Reason for revert: see if this fixes the android roll
> 
> Original change's description:
> > Track device coordinate space as matrix
> > 
> > This is a required step to be able to cleanly draw image filtered
> > device layers with arbitrary matrices, instead of relying on
> > SkMatrixImageFilter to apply the transformation.
> > 
> > Bug: skia:9545
> > Change-Id: I8d84679a281538875cf4a1b73565294fb7f89c86
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249076
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Mike Reed <reed@google.com>
> 
> TBR=robertphillips@google.com,reed@google.com,michaelludwig@google.com
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: skia:9545
> Change-Id: Ie374a7500cfbff35cb0782beb863086e118a005a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249986
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

TBR=robertphillips@google.com,reed@google.com,michaelludwig@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:9545
Change-Id: If31a9be86cb340a0874533c044c19b6787d5f176
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272340
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-02-27 16:32:45 +00:00
Brian Salomon
6066b754fe Remove cheap/any texture distinction from SkImageGenerator.
With the removal of rescaling of NPOT textures this no longer matters.

Change-Id: I313e895407c3a2c616e6113a5bde75dc6a167e7c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273519
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
2020-02-27 13:58:17 +00:00
Jim Van Verth
8ec13300cd Fill in more D3DCaps
Bug: skia:9935
Change-Id: Id8b851afdd97f8405dbb405e3f142f86dbe1de31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273003
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-02-26 18:26:45 +00:00
Mike Reed
8989363322 rm unneeded header, see include/public
Change-Id: Ica26f683a9fd0ef7a624aa081678b619b70c9af8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273400
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-26 04:53:33 +00:00
Julia Lavrova
9b906ce536 Revert "remove private copy of SkM44.h"
This reverts commit f8ef81b35e.

Reason for revert: Build broken

Original change's description:
> remove private copy of SkM44.h
> 
> Change-Id: Ifd47b929bafd40d190722366a0c1e2b856220ab3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272836
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=fmalita@chromium.org,reed@google.com

Change-Id: I0da4ad43d5eaf5813ec489bc9117d4b8fc2b930e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273330
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-02-25 23:00:54 +00:00
Brian Salomon
d8575452eb Add GrContextOption for GL error checking, shader, and program success.
Small behavior change: will not check for shader success and program
linking success over the command buffer in a debug build.

Also fail gracefully if stencil renderbuffer allocation fails.

Bug: skia:9938
Bug: chromium:1040186
Change-Id: I623f09d306261d28070078268f6242f92d65fd5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273276
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-02-25 21:00:19 +00:00
Mike Reed
f8ef81b35e remove private copy of SkM44.h
Change-Id: Ifd47b929bafd40d190722366a0c1e2b856220ab3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272836
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-25 19:51:17 +00:00
Brian Salomon
9f00494951 Add test that SWPathRenderer GenIDChange listeners get removed.
When a cached path mask texture is destroyed it should remove the
gen ID change listener on from the SkPathRef:
https://skia-review.googlesource.com/c/skia/+/272654

Change-Id: I4d1781e578b29b801b1b5b97ba5119ac321de73c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273004
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-02-25 14:51:51 +00:00
Shachar Langbeheim
c43a6c54b1 Remove docs for macros that don't exist in the code.
Change-Id: Ibabe3f1f9663ec36b5128bdb6f1cfeb7b8e09e8a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272896
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-02-24 19:44:45 +00:00
Robert Phillips
251ee1da5b Remove SkDDLTmpRedirect.h
With the Chrome-side CL:

https://chromium-review.googlesource.com/c/chromium/src/+/2067805 (Switch SkDDLTmpRedirect.h reference to SkDeferredDisplayList.h)

having landed, Skia no longer needs this temporary header.

TBR=bsalomon@google.com
Change-Id: I01da4ece2be239407e223105781d4d0d75deabdb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273018
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-24 18:26:35 +00:00
Dominic Mazzoni
2a016bad67 Allow passing multiple node IDs per PDF structure node.
At the time Chromium is painting, we're passing node IDs
along with painting commands to enable tagging. However,
this assumes that all nodes will end up in the structure
tree, which we might not want.

Instead, allow the client to prune the structure tree
later before telling Skia to generate the PDF, but
keep all of the node IDs to be matched up with.

As an example, suppose the doc looks like this:

root id=1
  paragraph id=2
    div id=3
      text1 id=4
    link id=5
      text2 id=6

The pruned tree passed to Skia would look like this:

root id=1
  paragraph id=2 extra_ids=3,4
    link id=5 extra_ids=6

We need to pass the extra node IDs into Skia so
that when content is tagged with id=4, we know to
map that to the paragraph node with id=2 instead.

Note that the resulting PDF document will *not*
have any of these extra IDs, they're all remapped
and consolidated.

While it's not strictly necessary that this is done
in Skia, it's easiest to implement it here. Doing the
same upstream would require replaying an SkPicture
and rewriting all of the node IDs.

Bug: chromium:607777
Change-Id: I0ecb62651e60b84cc5b9d053d7f7d3b9efda1470
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272462
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
2020-02-24 18:21:16 +00:00
Jim Van Verth
03b8ab225f Reland "Create D3D device and queue"
This is a reland of 29dc430f43

Original change's description:
> Create D3D device and queue
> 
> Bug: skia:9935
> Change-Id: Ib6548f413ca3a8befb553d2d47354b400c9162b9
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272520
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

Bug: skia:9935
Change-Id: I1c8797e09cdeb3694ea7f47b2236ab7d91d9519f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272996
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-02-24 17:41:55 +00:00
Robert Phillips
1cec4d5e3d Add a program iterator to SkDeferredDisplayList
Bug: skia:9455
Change-Id: I201218174b5d6efb72f7c06766a49f6711325bd5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272530
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-24 14:03:06 +00:00
Leandro Lovisolo
16656fc96c Revert "Create D3D device and queue"
This reverts commit 29dc430f43.

Reason for revert: This is breaking the Google3 autoroller due to header file d3d12.h not being available on google3.

Original change's description:
> Create D3D device and queue
> 
> Bug: skia:9935
> Change-Id: Ib6548f413ca3a8befb553d2d47354b400c9162b9
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272520
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com

Change-Id: I3857444cae52cc2338258c46b974ae5496bbaedc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272726
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Commit-Queue: Leandro Lovisolo <lovisolo@google.com>
2020-02-21 22:49:12 +00:00
Robert Phillips
4d5594dff1 Move SkDeferredDisplayList.h into include\core (take 2)
Clients will need official access to this class for the compilation iterator.

This CL also hides some of the cruft we don't want exposed.

Bug: skia:9455
Change-Id: I696c058f1c409fb459229552fbbdd935ec112358
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272643
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-21 21:26:02 +00:00
Florin Malita
178b860769 [skottie] Initial support for per-character 3D
When per-character 3D is enabled, text properties can be animated in
3 dimensions.

 - position and scale become 3-value vectors
 - in addition to existing "r" (really rz), rotation gains "rx" and "ry"
 - instead of specializing for 3D, expand the existing structures to
   handle both 3D and 2D modes
 - also ensure that sksg::Transform does not flatten to SkMatrix

Change-Id: I426a7ee1ff38c1702deb85e9f1db80f6069f36d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272648
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-02-21 21:14:02 +00:00
Mike Reed
82260fc756 remove unneeded include
Change-Id: Ie3c08d79ae36f28ff48f825699a2542154ca3096
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272652
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-21 21:01:32 +00:00
Brian Osman
6fa47769cb In SkRuntimeEffect, use a single shared Compiler instance
I've been increasingly concerned about the CPU and memory costs of
creating and holding on to many Compiler instances. Given that they're
use infrequently, having a shared (guarded) instance seems fine.

We can still look at reducing the startup cost of a single instance, but
this removes a large blocker to wider usage of SkRuntimeEffect.

Change-Id: Ia6dc721c73fdf8c9c4c7a8c1af5f350d2c028b22
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272466
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-21 20:25:04 +00:00
Jim Van Verth
29dc430f43 Create D3D device and queue
Bug: skia:9935
Change-Id: Ib6548f413ca3a8befb553d2d47354b400c9162b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272520
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-02-21 19:49:52 +00:00
Robert Phillips
305033b6e8 Revert "Move SkDeferredDisplayList.h into include\core"
This reverts commit ad3b2c9886.

Reason for revert: clang

Original change's description:
> Move SkDeferredDisplayList.h into include\core
> 
> Clients will need official access to this class for the compilation iterator.
> 
> This CL also hides some of the cruft we don't want exposed.
> 
> Bug: skia:9455
> Change-Id: I408c19f9ecd6880a5a7853def591407b0ca43e4e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272343
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,robertphillips@google.com

Change-Id: Ica80434e7423fb202355eb77a614ece1c4d54726
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9455
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272641
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-21 18:38:31 +00:00
Robert Phillips
ad3b2c9886 Move SkDeferredDisplayList.h into include\core
Clients will need official access to this class for the compilation iterator.

This CL also hides some of the cruft we don't want exposed.

Bug: skia:9455
Change-Id: I408c19f9ecd6880a5a7853def591407b0ca43e4e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272343
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-21 18:23:11 +00:00
Mike Reed
415caceb11 adopt new name convention
Change-Id: I7dedf2c8724256cf6889d8a608b425cb9188c030
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272597
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-21 17:28:42 +00:00
Mike Reed
46f5c5f08b Make SkM44 public
Need to migrate clients from private/ to core/ include
Unexperimentalize concat44() methods on SkCanvas

Change-Id: I64b8816722a9d93316cb8b8691d2d9a3e36f167f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272464
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-21 15:50:31 +00:00
Dominic Mazzoni
6ffabbb4c4 Simplify interface to StructureElementNode.
Use a std::vector of std::unique_ptr for the children, rather than an
error-prone raw pointer.

Use a string for the element type, rather than an enum.

In both cases, both the old and new format are supported and tested
within Skia until Chromium has migrated.

Also add support for Alt and Lang, which are like attributes
but go right on the structure node. There are only a small
handful of attributes that go on the structure node so this
seems like the simplest solution.

Bug: chromium:607777
Change-Id: I4f315685df35dd9dcd8e1bca6d275cbeb8f2c67a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271816
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
2020-02-20 21:16:48 +00:00
Robert Phillips
ca85b9b8e3 Add temporary header to shift clients over to include/core/SkDeferredDisplayList.h
The plan is:
Add SkDDLTmpRedirect.h
update clients to point to SkDDLTmpRedirect.h
Move SkDeferredDisplayList.h to include/core (and update SkDDLTmpRedirect.h)
update clients to point to SkDeferredDisplayList.h in its new location
remove SkDDLTmpRedirect.h

This staging is required to land:

https://skia-review.googlesource.com/c/skia/+/272343 (Move SkDeferredDisplayList.h into include\core)

Change-Id: I3302cdb8607b259d084bb9dd00600652c7f9a93a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272460
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-20 20:12:38 +00:00
Mike Reed
9d4e31d6cd rm Sk3D.h -- long live SkMat4
Change-Id: Ib83ee6567b1a32f34364b7ac66a659eaeced3249
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272037
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-20 13:15:33 +00:00
Mike Reed
e1a81bad5f move SkVec2 into shared header
Change-Id: I2b39242fe0519fa188151974dea883bad5652eb4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272118
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-19 23:27:04 +00:00
Dominic Mazzoni
7dfb46e7f3 Re-land: Support adding attributes to PDF document structure nodes.
Originally landed: https://skia-review.googlesource.com/c/skia/+/268878
Reverted: https://skia-review.googlesource.com/c/skia/+/271858

The issue was with compilation when PDF support is disabled. See
the diff between patchsets 1 and 2.

This is an important part of writing a tagged PDF. Many of the nodes
in the document structure tree need additional attributes, just like
in HTML.

This change aims to add support for a few useful attributes, not to
be comprehensive.

Bug: chromium:1039816
Change-Id: I15f8b6c41d4fdaa4b6e21775ab6d26ec57eb0f5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271916
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2020-02-19 20:50:14 +00:00