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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>