Commit Graph

6885 Commits

Author SHA1 Message Date
Brian Salomon
aad8315aeb Reland "Allow swapping out of GrBackendTexture used by SkSurface"
This reverts commit f73b8db50b.

Reason for revert: Fixed SK_GL issue

Original change's description:
> Revert "Allow swapping out of GrBackendTexture used by SkSurface"
>
> This reverts commit 9456f7aba5.
>
> Reason for revert: Breaking layout tests
>
> Original change's description:
> > Allow swapping out of GrBackendTexture used by SkSurface
> >
> > Change-Id: I67f26efaee87536f3faf51ca164bf003013c7c8a
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215428
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
>
> Change-Id: I0ff5e63d47cd3e536f9fe656503d74965ce6dbfd
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215822
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ie87d84ac4c08d67bcd276330f1af087bc532aad2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215825
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-05-24 15:20:01 +00:00
Brian Salomon
f73b8db50b Revert "Allow swapping out of GrBackendTexture used by SkSurface"
This reverts commit 9456f7aba5.

Reason for revert: Breaking layout tests

Original change's description:
> Allow swapping out of GrBackendTexture used by SkSurface
> 
> Change-Id: I67f26efaee87536f3faf51ca164bf003013c7c8a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215428
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: I0ff5e63d47cd3e536f9fe656503d74965ce6dbfd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215822
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-05-24 14:01:23 +00:00
Brian Osman
07c117b6f8 Support larger compound types in the interpreter
Field access and array indexing are supported, including
dynamic indices. Larger types (> 4 slots) can be used as
lvalues, rvalues, etc.

Change-Id: I9bb4ed850be4259c05c8952c6c0a17b71f813772
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214443
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2019-05-23 20:19:30 +00:00
Ben Wagner
a541db4dca Add test of char to glyph round tripping.
This also tries to work around some surprising behavior on macOS, which
may cause attributing space glyphs to character 9 instead of 32.

This also updates the gdi character to glyph mapping for non BMP
characters on Windows 10. This forces all uniscribe script analysis to
simple to get just the default cmap mapping without shaping.

Change-Id: Id93a2de6de27ab61fbf034f5087e93e4c7e839ba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215431
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-05-23 20:05:40 +00:00
Mike Reed
6a5f7e29a8 split RGB into YUV planes
Change-Id: Ifd1d010068691e187561a25aff45d8b67ae62c39
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215442
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-05-23 19:57:30 +00:00
Michael Ludwig
41f395d445 Reland "Track quad type on GrQuad directly"
This reverts commit 0dee19bacc.

Reason for revert: properly remember src quad type

Original change's description:
> Revert "Track quad type on GrQuad directly"
>
> This reverts commit 85766c4cd3.
>
> Reason for revert: red - so much red
>
> Original change's description:
> > Track quad type on GrQuad directly
> >
> > This makes subsequent higher-level drawing APIs more compact, and
> > shouldn't come with a performance hit. Everywhere we used to need
> > a GrPerspQuad, we'd also take the GrQuadType as a second argument.
> > The quad list types already deconstruct the quad so there's no
> > extra overhead in the op's memory usage.
> >
> > It also improves usability and decreases the likelihood that an
> > incorrect quad type is ever associated with the quad.
> >
> > Bug: skia:
> > Change-Id: Iba908fb133ad664744a5788a7088d90de0d3a1c2
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214820
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
>
> Change-Id: Ied594673116fb901287b334fea41da3c71494fb1
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215607
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: Id5fb51218f2ace37086112caa2e43461d2f2b46b
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215640
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2019-05-23 18:51:11 +00:00
Brian Salomon
9456f7aba5 Allow swapping out of GrBackendTexture used by SkSurface
Change-Id: I67f26efaee87536f3faf51ca164bf003013c7c8a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215428
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-05-23 18:38:28 +00:00
Robert Phillips
0dee19bacc Revert "Track quad type on GrQuad directly"
This reverts commit 85766c4cd3.

Reason for revert: red - so much red

Original change's description:
> Track quad type on GrQuad directly
> 
> This makes subsequent higher-level drawing APIs more compact, and
> shouldn't come with a performance hit. Everywhere we used to need
> a GrPerspQuad, we'd also take the GrQuadType as a second argument.
> The quad list types already deconstruct the quad so there's no
> extra overhead in the op's memory usage.
> 
> It also improves usability and decreases the likelihood that an
> incorrect quad type is ever associated with the quad.
> 
> Bug: skia:
> Change-Id: Iba908fb133ad664744a5788a7088d90de0d3a1c2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214820
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

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

Change-Id: Ied594673116fb901287b334fea41da3c71494fb1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215607
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-05-23 17:22:29 +00:00
Michael Ludwig
85766c4cd3 Track quad type on GrQuad directly
This makes subsequent higher-level drawing APIs more compact, and
shouldn't come with a performance hit. Everywhere we used to need
a GrPerspQuad, we'd also take the GrQuadType as a second argument.
The quad list types already deconstruct the quad so there's no
extra overhead in the op's memory usage.

It also improves usability and decreases the likelihood that an
incorrect quad type is ever associated with the quad.

Bug: skia:
Change-Id: Iba908fb133ad664744a5788a7088d90de0d3a1c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214820
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-05-23 16:52:55 +00:00
Robert Phillips
459b295bed Expand backend allocation API to allow an initialization color (only for GL to start)
Change-Id: I8e676e80f85f14c81c3cec8d766d0fdc7e25f426
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214445
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-05-23 15:11:04 +00:00
Brian Osman
c51d791ab9 Interpreter: Fix scalar -> vector constructors
We were never replicating scalar values when constructing vector types
from a single argument.

Change-Id: I5bdeeb91f5a10c151b18561de6c275f2db2898fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215526
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
2019-05-23 14:51:58 +00:00
Robert Phillips
08ba085253 Revert "De-GL-ify tests, gm and tools"
This reverts commit 89fb346d2b.

Reason for revert: Google3 failure

Original change's description:
> De-GL-ify tests, gm and tools
> 
> Change-Id: Id15a3a4b2c8b80b9dc7ecdab1cf1af1f9282f442
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215447
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I155b033ac48d9fea15f66b22a090fb34f3bb81fa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215521
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-05-22 20:23:56 +00:00
Robert Phillips
89fb346d2b De-GL-ify tests, gm and tools
Change-Id: Id15a3a4b2c8b80b9dc7ecdab1cf1af1f9282f442
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215447
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-05-22 19:24:17 +00:00
Herb Derby
e384a1ed7f Reland "Make SkRemoteGlyphCache obey the prepareForDrawing contract"
This is a reland of 4e045301f1

Original change's description:
> Make SkRemoteGlyphCache obey the prepareForDrawing contract
>
> Change-Id: I3f781b8d72f460edb73c5b3d446676db19a4a935
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215090
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>

Change-Id: Ia1e8f09c8969a83cf9281936931b795efbaf5dc3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215168
Commit-Queue: Khushal Sagar <khushalsagar@chromium.org>
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
2019-05-22 16:47:19 +00:00
Chris Dalton
1706cbffc7 Remove VisitorType from GrOp::visitProxies
We are planning to start detecting mipmaps and MSAA resolves during
the "gather" step now, so all visits should behave the same at this
point. (And it appears there might not have been any GrOps that
actually changed their behavior based on this flag at the moment.)

Bug: skia:
Change-Id: I7a7a1c9c47cbe03683c42025bf6d0ecb32a57ba1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215145
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-05-22 15:13:50 +00:00
Robert Phillips
b04b694689 Make GrGLGpu::createBackendTexture parallel GrGLGpu::createTextureImpl
- in preparation for making createBackendTexture call createTextureImpl (just like GrGLGpu::onCreateTexture)

This is more pre-work for making https://skia-review.googlesource.com/c/skia/+/214445/ (Expand backend allocation API to allow an initialization color) reasonable to review.

Change-Id: I28a9ec889532fb72fd05bea4b1fdbb8935e5228b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215170
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-05-22 14:40:20 +00:00
Ethan Nicholas
82162eead5 SkSL interpreter intrinsics
Bug: skia:
Change-Id: I418fb05444f9c1ee076ace41a24072c4a5e7ef6c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214691
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-05-21 20:38:20 +00:00
Herb Derby
201491e734 Revert "Make SkRemoteGlyphCache obey the prepareForDrawing contract"
This reverts commit 4e045301f1.

Reason for revert: Breaks unit test for Windows 10 all native fonts

Original change's description:
> Make SkRemoteGlyphCache obey the prepareForDrawing contract
> 
> Change-Id: I3f781b8d72f460edb73c5b3d446676db19a4a935
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215090
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>

TBR=herb@google.com,khushalsagar@chromium.org,khushalsagar@google.com

Change-Id: Ia4207104d97d1cc6d2cc058eb1e938f7239f1bb5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215166
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-05-21 20:23:31 +00:00
Herb Derby
4e045301f1 Make SkRemoteGlyphCache obey the prepareForDrawing contract
Change-Id: I3f781b8d72f460edb73c5b3d446676db19a4a935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215090
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
2019-05-21 20:00:15 +00:00
Ben Wagner
ab6eefe60e Move SkLeanWindows.h to src.
This file pulls in Windows headers in a custom way, which is somewhat
awkward for a library header. The only use in include/ has been replaced
with a single forward declaration.

Change-Id: Ibef4cf7a2d1c9957a6a5b145b95aca1a6868cb5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214689
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-05-21 13:48:00 +00:00
Mike Klein
fe0aeb3691 update SkUserConfig.h a bit
- tweak comments to be immune to tools/rewrite_headers.py
    - remove a few bonkers settings no user should change

While I'm at it, re-run tools/rewrite_headers.py.

Change-Id: Ie588d604010dd26abcdd277c586cd6c58568dcf5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214740
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-05-20 17:52:22 +00:00
Robert Phillips
5c7a25bd2f Move explicit backend object allocation API to GrContext
This initial portion of the API should be ready to go. Follow on CLs will add the other entry points.

Change-Id: Ia9c708046ba08b16f9a71558e2bf2c38279abe5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214680
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-05-20 15:31:56 +00:00
Ben Wagner
729a23f50f Move ccpr headers for display list out of include/private.
This partially undoes 774168efac "Allow
CCPR in DDL mode (take 2)". The issue appears to have been the use of a
not fully defined type (destructor could not be instantiated) because
the private fields were also dllexported, requiring the destructors to
exist in all translation units which included the header. Only the parts
of the class which are actually public are now marked as exported.

Change-Id: I8a79bd5d8962e94c24f7563d496744bb278153fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214020
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-05-20 14:50:56 +00:00
Ethan Nicholas
9e6a39356e support for SkSL interpreter external function calls
Bug: skia:
Change-Id: Ie8c873bf7fc795567ad812f56c37bee4c06213bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214307
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-05-20 13:49:56 +00:00
Mike Klein
a8ceb775c1 Revert "remove SkMiniPicture and co."
This reverts commit 046ecb1b5e.

Reason for revert: Flutter

Original change's description:
> remove SkMiniPicture and co.
> 
> This was an optimization for Chromium that I believe is no longer
> relevant in a world of PaintOpBuffers.
> 
> Change-Id: Ic7526715a0ef1c3cec387a44189b7d56d5107af5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213680
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,reed@google.com,chinmaygarde@google.com

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

Change-Id: Ibf1ccee88c9ea140210cb9258ec96f9841e84c24
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214661
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-20 13:18:48 +00:00
Mike Klein
b6a6f0829e disassemble on unit test failure
Change-Id: I072f5d72f64eb683cc90c2890313ee289487cff3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214403
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2019-05-17 20:36:48 +00:00
Robert Phillips
efb9f14aba Add testing of mipmaps to backend allocation test
Bug: skia:9091
Change-Id: I1d928d3180c47d22a41c69e169da00b598318d47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214301
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-05-17 19:57:56 +00:00
Brian Osman
f3fa60010e Implement postfix ++/--, and use the correct 1 for floats
Change-Id: I0e6e8205998f3058cb59e279704e23989bccc66b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214192
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-05-17 19:01:05 +00:00
Brian Salomon
201700fa86 Initial version of rescaling async readback API
This is implemented at backend-neutral level and so misses some
opportunities to reduce the number of passes in the GPU backend.

Filter quality is interpreted as:
none - single nearest neighbor resampling
low - chain of bilinear resamplings. 2x up/down except for one
step which may be smaller than 2x.
medium - same as low
high - when both scale factors are up then same as low but with bicubic
filtering rather than linear. Otherwise, same as low.

Bug: skia:8962

Change-Id: I4467636c14b802d6a0d9b5c363c1ad9e87a1a44b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213831
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-05-17 16:39:10 +00:00
Robert Phillips
9b16f81858 Switch over to using new direct allocation API in our tests (as much as possible at least)
To fully switch over we need the entry point that uploads data but most of the old call
sites can be switched over now.

Change-Id: I362b1dfde7d88bf8d3f8f90155f53d9ac442a329
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214300
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-05-17 15:41:50 +00:00
Brian Osman
4e93feba40 Interpreter: Implement ternary operator
Change-Id: If05661224d4a53e1854180d9b280ebb7a7ac2793
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214191
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-05-17 14:29:23 +00:00
Robert Phillips
0c6daf034b Direct backend object allocation API
Change-Id: Ie8733a4db8061c67678a41cf239ce4407e967df7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212965
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-05-17 12:14:48 +00:00
Brian Osman
1091f02b40 Interpreter: Change all Load/Store ops to use immediate indices
Avoids the need for a PushImmediate (which usually also required
a Nop for alignment) on every load/store. And it makes the codegen
for local vs. global identical, which simplifies the byte-code
generator in a few spots.

This means that places previously using DupDown now need something that
dupes the *top* N elements of the stack. Just use Vector + Dup, and
remove the (now unused) DupDown instruction.

Also add/implement kStoreSwizzleGlobal, which was the last missing
load/store op (and add a test case).

Change-Id: Id450272c11f4f1842c9d57bc5114e7f81e9e926e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214062
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-05-16 14:19:51 +00:00
Ethan Nicholas
91164d1c01 added external value support to SkSL interpreter
Bug: skia:
Change-Id: I1806e1f6abaef322ecd3ba0d9bfaa9d7ca7a44c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212983
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-05-15 20:05:45 +00:00
Brian Osman
b745129ceb Interpreter: Implement/fix vectorized load/store of globals
Also has swizzled loads of globals. Swizzle stores are still broken.

Change-Id: I0c01a309592c0aa460e1459de2636a2e1ef2ee6c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213830
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-05-15 17:40:45 +00:00
Mike Klein
945d1e538c simplify rtree loops in Skia too
Sorry for yanking you around on whether on not this is worth doing.
Seems like SkRTrees are going to stick around for now for Flutter,
so I think we might as well keep both implementations up to date.

This ripples out a little further than in Chromium, as the math we're
deleting here was the only use of the aspect ratio of the passed-in
bounds, that itself the only use of those bounds themselves.  So we can
un-plumb all that too.  I'd still like to see how much we can minimize
the need for those user-provided bounds at all, especially when we're
calculating them all here.

Change-Id: Iea07e8e3d23a4dd31da8bcde512b24caabc96a10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213840
Reviewed-by: James Bankoski <jimbankoski@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-15 15:42:10 +00:00
Ben Wagner
21bca28bda Move SkMessageBus.h into src/core
Not used by anything else in the include directory, probably don't want
to accidentially expose it either.

Change-Id: I50d255e2cac43d8405305a825fd194bb36edd8fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213826
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-05-15 15:33:48 +00:00
Ben Wagner
8bd6e8f198 Move SkTSearch.h into src.
No public headers are using it anymore, so move it from include/private
into src/core where SkTSearch.cpp resides.

Change-Id: I4499c629487ff1b8c391b44708616d67567a3e9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213674
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-05-15 14:15:07 +00:00
Brian Osman
226668a146 Add support for calling functions within the interpreter
Change-Id: Id009aa32faa40e9847dcf3668f1fd15e8b95dc56
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213134
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-05-15 13:36:16 +00:00
Mike Klein
ad44dd500f preserve comments past the #include ""
Tacking on parts[2] lets us keep things like IWYU comments

    #include "something.h" // IWYU pragma: keep

Rerun the script too... not much interesting.

Change-Id: I9f02c81ffece0ecf3e99730d4a12d49e01417ddc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213697
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-05-14 19:35:34 +00:00
Ben Wagner
5162a74b0a Remove GpuLayerCacheTest
The gpu code doesn't have a layer cache anymore to test.

Change-Id: Iec931112e5e12c90f2cad0c6012dfd1d0f14ad25
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213665
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-05-14 19:28:44 +00:00
Mike Klein
046ecb1b5e remove SkMiniPicture and co.
This was an optimization for Chromium that I believe is no longer
relevant in a world of PaintOpBuffers.

Change-Id: Ic7526715a0ef1c3cec387a44189b7d56d5107af5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213680
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-14 19:19:44 +00:00
Robert Phillips
42dda0884f Remove some uses of GrBytesPerPixel (take 2)
GrPixelConfig needs to go away. Towards that end, switch the Vk and GL backends over to using their native formats.

Change-Id: Ie663d1ec64d19b8940925afc7c39bc057c4112cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213482
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-05-14 19:04:54 +00:00
Mike Klein
a705cb93c7 remove SkLiteDL
It's been dead code since it was inlined into Android last summer.

Change-Id: I252f6392d9436ef357f22a54bab8a33c9d1b3ea9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213625
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-14 18:55:44 +00:00
Ben Wagner
f1344ac239 Remove SK_ALLOW_STATIC_GLOBAL_INITIALIZERS from tests.
The tests themselves should run fine if no factories were actually
registered. This isolates the last uses of this flag to the gpu code
which is actually depending on it.

Change-Id: Ief9c01abfc37c4e071d946d70ef85f13f94ae0f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213301
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-05-14 18:21:34 +00:00
Brian Osman
4167215daf Fix stack indexing bug in vectorized unsigned -> float conversion
Also add a test of all three conversions (scalar & vector).

Change-Id: I1671e992760ad538304d2602e37cd9792a49e9cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213660
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-05-14 18:09:50 +00:00
Robert Phillips
0221e8b226 Revert "Remove some uses of GrBytesPerPixel"
This reverts commit 13f02be291.

Reason for revert: Vulkan assert

Original change's description:
> Remove some uses of GrBytesPerPixel
> 
> GrPixelConfig needs to go away. Towards that end, switch the Vk and GL backends over to using their native formats.
> 
> Change-Id: I92c80eb27e5d639097a40745429721208fe26836
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213428
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I253b6587a33c9195266772386aace1c53e0652cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213468
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-05-13 19:55:33 +00:00
Robert Phillips
13f02be291 Remove some uses of GrBytesPerPixel
GrPixelConfig needs to go away. Towards that end, switch the Vk and GL backends over to using their native formats.

Change-Id: I92c80eb27e5d639097a40745429721208fe26836
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213428
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-05-13 19:32:12 +00:00
Brian Osman
44d44761c7 Interpreter: Fix bool literals
Change-Id: I0cf8e12d5ddb9b89aff39f484d8a017f61e4a20f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213465
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-05-13 18:54:16 +00:00
Herb Derby
9b86955c65 Add thread safety annotations for SkMutex
Introduce SkAutoMutexExclusive for SkMutex RAII.

Unsubclass SkMutex from SkBaseMutex to allow annotations
for class field mutexes separate from global mutexes.

Leave SkAutoMutexAcquire for handling global mutexes using
SkBaseMutex.

Test using GrSingleOwner.h.

Change-Id: I19d9d0ae0d05206cbb6ef137dc362969048c9c07
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213136
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-05-13 15:44:33 +00:00