Commit Graph

7181 Commits

Author SHA1 Message Date
Julia Lavrova
db9f669eb1 Dealing with ghost spaces
Change-Id: I9cf133e915658f17d00f279ee1fa2662effa2021
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231646
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2019-08-09 18:56:13 +00:00
Sergey Ulanov
cc4573dfed Enable YCbCr sampler support on platforms other than Android
Previously YCbCr Vulkan samplers were supported only on Android for
external images, while Vulkan requires YCbCr sampler for I420 YUV image
formats such as VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM,
VK_FORMAT_G8_B8R8_2PLANE_420_UNORM.
This CL:
 - Adds VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM and
   VK_FORMAT_G8_B8R8_2PLANE_420_UNORM as supported Vulkan formats
 - Updates GrVkYcbcrConversionInfo to add fFormat field and allow
   fExternalFormat=0.
 - Removes assertions format=VK_FORMAT_UNDEFINED for all images that
   have ycbcr info.

Bug: chromium:981022
Change-Id: I3989f72e918a257a081b81ae20429a6771229ad6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230918
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-08-09 18:01:13 +00:00
Julia Lavrova
b7b0b3ad53 Paragraph cache: caching the shaped results only.
That makes layout phase 10 times faster (since the shaping takes 90% of it).

LRU cache is attached to the FontCollection object and has the same life time.
Currently it has hardcoded limit on the entry numbers (128).
One the number reached, the least recently used element is removed from the cache
to free the space for a new one.

Change-Id: I597e334422614e33715d7a9ed13acf7b1f9cd0e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230755
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2019-08-09 16:51:41 +00:00
Robert Phillips
702b37b965 Add unit test to prevent future memory regressions
Bug: b/138674523
Change-Id: Ie4e37763ca68c7fcfa2f78cfa3c85a21bb863f77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233558
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-08-09 15:39:01 +00:00
Brian Salomon
ec22b1a2bf Expose GrContext::dump() when SK_ENABLE_DUMP_GPU is defined.
Change-Id: I499228454bc387de2c988b8f607320b7e5ea57b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233557
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-08-09 14:13:01 +00:00
Herb Derby
10e48d4061 Allow SkMakeSpan to correctly handle the distinction between
const and non-const for container classes such as std::vector
and std::array.

Change-Id: I6ad49de7f2f2c379ba6c964115806d058c72cd7e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233296
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-08-08 18:44:24 +00:00
Brian Salomon
d4764a15f3 Rework how backend-specific formats are retrieved from GrBackendFormat.
Change-Id: If1047c477ff3f2cc4aaf19d2e2e838f2dbcb0126
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233160
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-08-08 17:20:34 +00:00
Greg Daniel
6fa62e2ab3 Remove use of GrColorType on GrCaps::getRenderTargetSampleCount.
Additionally this changes removes the version of the call that that takes
a GrPixelConfig.

As part of this change many call sites that were calling getRTSampleCount
to just check renderability have been changed to call
isFormat[AsColorType]Renderable instead. This change has also started to
move us to just checking format renderability (without GrCT) in classes
that are specifically dealing with GrSurface (GrResourceProvider, GrGpu, etc.).

Bug: skia:6718
Change-Id: Icf4a1a21a81a44e6863a7cd2059d21b9833d581f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233039
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-08-08 13:15:28 +00:00
Brian Salomon
ea4ad307eb Modify GrGLTexture/RenderTarget and related functions to not take
GrSurfaceDesc.

Change-Id: If853cff7624ec80e0152a28766dda188778913d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232577
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-08-07 18:43:09 +00:00
Chris Dalton
08755129a1 Add a GrTextureResolveManager class
Adds a GrTextureResolveManager class and plumbs it through calls to
generate the drawing manager's dependency DAG. This new class is
currently unimplemented, but it wraps GrDrawingManager and will
eventually give limited access to functionality for making new tasks
that regenerate mipmaps and/or resolve MSAA. We will use this object
to move mipmap generation up to the DAG/proxy level.

Bug: skia:
Change-Id: Ie1deef21e7ae579a0262f2eeb93d451f0740d823
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232633
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-08-06 20:47:31 +00:00
Greg Daniel
900583a11e Update some gpu caps isFormatRenderable calls.
This adds an isFormatRenderable call that doesn't take a GrColorType
which will be used in future changes. Also renamed the one that
takes a GrColorType to be more explixit what its use is.

Bug: skia:6718
Change-Id: Ib5a11aacccc4d94d21bc39be05f116ec3b23a3e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232757
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-08-06 17:09:08 +00:00
Greg Daniel
ea6bb447a2 Add supported GrColorTypes to Mtl FormatTable.
Change-Id: I095a69b801123225e1bd49573701e5e1632430eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232516
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-08-05 20:13:17 +00:00
Brian Salomon
4eb38b7684 Pass GrBackendFormat to GrResourceProvider and GrGpu texture create
functions.

Change-Id: Ie3fe9d56fdbf369ccacd0188a3d3d73ce1d30d48
Bug: skia:6718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232141
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-08-05 17:33:17 +00:00
Michael Ludwig
55edb50262 Update tests to use new image filter factories
Bug: skia:9280
Change-Id: Id8253baa6ca387b6f2f0583f29b2c25cc1005545
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230880
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-05 15:15:45 +00:00
Michael Ludwig
8ee6cf3691 Move SkImageFilter functionality into private SkImageFilter_Base
Bug: skia:9281
Change-Id: I189dbf652580805641f8c4b9a6587cf15a9049dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231256
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-02 18:56:39 +00:00
Mike Klein
b994412823 select, {eq,lt,gt}_i32 on x86
Add vpblendvb, vpcmpeqd, and vpcmpgtd, to implement select and eq/lt/gt.
I want to think just a touch bit more about neq, lte, and gte.

This is enough to JIT everything SkVMBlitter creates today.

There are 24 possible argument orders to vpblendvb,
so I'm sure I've got them wrong somehow, even with the new test.

Change-Id: I357664b866d8258a2b5438d520f47542ad581c50
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232060
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-02 18:28:15 +00:00
Mike Klein
95529e8216 x86 store16
Nothing particularly tricky.  Very much like store8,
but with one fewer shuffle.

This lets some of the 565 blitters JIT!

Change-Id: I853905bda30a0cda89f3fcb5fef1dfe62725063b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232059
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-02 17:47:34 +00:00
Robert Phillips
d344284e77 More SkAutoPixmapStorage
A left over code review request

Change-Id: Ib58abaee4761d14b8ec67f88dc903ac1ed06a58e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232016
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-08-02 16:59:04 +00:00
Mike Klein
52010b7dd8 x86, load16
Very similar to load8.

The only interesting thing is how different vpinsrw is from vpinsrb (and
vpinsrd and vpinsrq)... different map of instructions entirely.

Change-Id: Ia413b83604dd2d277d59495c5f693f505c35be9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232058
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-02 16:52:44 +00:00
Mike Klein
94d054b53c x86 uniform8
Add vbroadcastss(Ymm, Xmm) and expand movzbl() to support an offset.

The sequence

    movzbl          (load a byte, zero-extend to 4 byte)
    vmovd           (move that 4 byte value to an xmm)
    vbroadcastss    (broadcast low 4 bytes of xmm to all lanes of ymm)

implements uniform8.

Change-Id: I1d3125920d19dcb3cad5980495310bc95b9dffee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232057
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-02 16:41:44 +00:00
Mike Klein
788967eb37 add vbroadcastss(Ymm, GP64, int)
vbroadcastss with a register argument and immediate offset implements
uniform32.  And this turns on the JIT for some new SkVMBlitter paths
that pass more arguments that I'd previously wired up, so add a few
more.

Change-Id: I66db1286dcdb2c4a4ba7c43f2dc2cd13564d4d34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232056
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-02 16:07:37 +00:00
Brian Salomon
01915c0dd0 GrCaps::supportedWritePixelsColorType takes CT/format rather than config.
Bug: skia:6718
Change-Id: I555a1c6962e7abbe0c7a7271f563e2aab714207d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231640
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-08-02 15:21:30 +00:00
Ben Wagner
22e04c6e10 Tweak css3 weight score, prevent ties.
The old code could produce ties and didn't make much logical sense.
Now the range between 400 and 500 prefers heavier weights up to 500,
then lower weights, then the least weight above 500.

Change-Id: I4e80f43c039d795efc49a7329c5c64f9da0fd9b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231957
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-08-02 14:42:31 +00:00
Mike Reed
64acf4f7cf remove unneeded bitmapprovider abstraction
Change-Id: Idd413389bb0828a6fc73b7285b4ed7b6fe48af6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231638
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-08-01 21:24:02 +00:00
Brian Salomon
f77c1460f8 Make read/write/transfer pixels functions take surface color type
Bug: skia:6718
Change-Id: I9cac1b9dc8c04969719c79b7b7ce10c18fb428d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231563
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-08-01 21:06:30 +00:00
Robert Phillips
bac46728fc Add a means of printing out the GrBackendFormat
Change-Id: I78b145765bc6ad2f0568ff9bee97397844c23728
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231557
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-08-01 20:42:32 +00:00
Greg Daniel
0258c90803 Remove use of isConfigRenderable.
Bug: skia:6718
Change-Id: I7eb25601e55042252a4fdcddfa4bb906ce0307dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231108
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-08-01 18:57:51 +00:00
Robert Phillips
ffe27290ff Add GrCaps::getTestingCombinations
This will decrease our reliance on GrPixelConfig for testing.

Bug: skia:6718
Change-Id: I951f57cce229792d994391dbba74dd206bbfb923
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230893
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-08-01 14:46:36 +00:00
Brian Salomon
8f8354a9a3 Reland "Remove GrCaps::SupportedRead::fSwizzle and supporting code"
This reverts commit a0f864d6ac.

Reason for revert: updated valgrind suppression

EXTRA_TRYBOTS=Test-Ubuntu18-GCC-Golo-GPU-QuadroP400-x86_64-Release-All-Valgrind_SK_CPU_LIMIT_SSE41

Original change's description:
> Revert "Remove GrCaps::SupportedRead::fSwizzle and supporting code"
>
> This reverts commit 1cec69ae5c.
>
> Reason for revert: Causing Valgrind failures
>
> Original change's description:
> > Remove GrCaps::SupportedRead::fSwizzle and supporting code
> >
> > Add weird color types that handle the swizzling.
> >
> > Change-Id: Ie37a00eb877fe5e519f7498bf749e02a2f1dc204
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230135
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com
>
> Change-Id: I710e1952f2cef1a1e6e7ccf408b8a71ce721c002
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231262
> Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
> Commit-Queue: Ben Wagner aka dogben <benjaminwagner@google.com>

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

Change-Id: I367f62ba7349b112d0a2eb5340a37be938ad5ef5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231178
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-08-01 00:17:54 +00:00
Ben Wagner aka dogben
a0f864d6ac Revert "Remove GrCaps::SupportedRead::fSwizzle and supporting code"
This reverts commit 1cec69ae5c.

Reason for revert: Causing Valgrind failures

Original change's description:
> Remove GrCaps::SupportedRead::fSwizzle and supporting code
> 
> Add weird color types that handle the swizzling.
> 
> Change-Id: Ie37a00eb877fe5e519f7498bf749e02a2f1dc204
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230135
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: I710e1952f2cef1a1e6e7ccf408b8a71ce721c002
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231262
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
Commit-Queue: Ben Wagner aka dogben <benjaminwagner@google.com>
2019-07-31 23:55:31 +00:00
Hal Canary
d7cf0be186 SkPDF: SkPDFMakeShader handles pathological inputs better.
Also add a unit test that crashes before this change.

Change-Id: I94e441a57a9c28e7c12bc2b214a65b41446ffab8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230754
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-07-31 16:23:35 +00:00
Brian Salomon
1cec69ae5c Remove GrCaps::SupportedRead::fSwizzle and supporting code
Add weird color types that handle the swizzling.

Change-Id: Ie37a00eb877fe5e519f7498bf749e02a2f1dc204
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230135
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-07-31 15:48:45 +00:00
Mike Klein
9fdadb949f test a (the) zero-arg program
Just because a program doesn't read from or
write to memory doesn't mean it's pointless.

Oh wait, yes it does.  It shouldn't crash though.

Change-Id: I6a9c26c065831f9598afccce6e0a34a178cbd925
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230839
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-07-30 19:58:37 +00:00
Mike Klein
d4546d6c4c add vmovdqa(ymm,ymm)
Fills in a little TODO.
Also add assembler unit tests for similar float->int and int->float.

Tested by SkVM_mad, SkVM_madder.

Change-Id: I5334029927fdecb0ff7f5a3b081cf2ce7b23995c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230838
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-07-30 18:43:35 +00:00
Chris Dalton
95d8ceb955 Add GrMipMapsStatus to GrTextureProxy
Bug: skia:
Change-Id: I5adf10f730b04c2b3b62c3b12aa5899da4db3431
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229922
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-07-30 18:04:04 +00:00
Robert Phillips
0a15cc62a8 Propagate GrRenderable flag to GrCaps::getBackendFormatFromColorType
This makes calling GrCaps::getBackendFormatFromColorType equivalent to calling GrContext::defaultBackendFormat

Change-Id: Ic402245fa0502920c47c2a29aadc4e559abdc09b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230416
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-07-30 17:45:45 +00:00
Mike Klein
81d526703c more unit tests
Backfill tests for some uncovered operations.

Mostly functional tests, with some targeted at particular
corners of code generation, and a few assembler unit tests.

This doesn't get up to 100% line coverage, but I think it
covers all the non-failure cases.

Change-Id: Ib701df0c505aa41e3b2fe3cd429447acb294b752
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230837
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-07-30 17:35:15 +00:00
Mike Klein
5591fdf930 small refactors
Change-Id: I58b52d3e1d05d0834be30e00d991636e227cbf0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230836
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-07-30 15:43:13 +00:00
Robert Phillips
d5e80ca8ea Add GrContext::defaultBackendFormat
TBR=bsalomon@google.com
Bug: 987392
Change-Id: I38ff649b25e78c0a02a8fd20f513db4be62abf43
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229919
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-07-30 14:05:28 +00:00
Robert Phillips
8ff8bccf77 Add GrCaps::isFormatCompressed
This is part of trying to remove uses of GrPixelConfig from the proxy provider

Change-Id: I12d085cfbff86d0e44829ce3ee36744b937b804e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230576
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-07-30 13:47:58 +00:00
Mike Reed
9dc0b9e2f8 remove code now that loopers are dead (w.r.t. canvas and paint)
We can't remove the loopers themselves, as they are still used
by android and chrome (they just don't ever pass them to skia).

Eventually each of those clients will resolve this, but for now
we just keep the classes (and tests) in skia.

Bug: skia:4783
Change-Id: I5f507e6bb82280f2bc7c0b21eebe59c287aa9265
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230579
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-07-30 12:49:28 +00:00
Mike Klein
8ac9f4e5b2 flesh out SkVM ops a bit more
Add missing comparison and selection ops, bit casts, 16-bit memory
operations, gathers, uniform loads, and fill in math holes where
reasonable.  Update some names to be a bit more regular.

I think all instructions are implemented in the interpreter,
and many tested.  More testing and JITs to follow.

Change-Id: I8cf377e8b72a86ac950e020892ce82b39e9d7277
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229893
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-07-29 20:43:10 +00:00
Ethan Nicholas
1386366e01 renamed SkSL texture() and process() to sample()
Bug: skia:
Change-Id: I2ae0caf08f8434302cae8151ae1ea0fda8d56928
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230397
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-07-29 17:37:38 +00:00
Brian Osman
886af0dae3 Allow defined functions in the SkSL .inc files
Use that to implement many intrinsics in SkSL for the interpreter.

Change-Id: I3762867781cb1a053429fd37b12ae3cf7739cb3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230134
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-07-29 17:10:48 +00:00
Greg Daniel
7bf37e07c3 Fix valgrind crash in TransferFrom test.
Change-Id: Iac78e5a832d209227cca58dd9f359e3d4dbd7da6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230396
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-07-29 14:38:06 +00:00
Robert Phillips
b7f95d1c16 Switch BackendAllocationTests from GrPixelConfig to GrColorType
Bug: skia:6718
Change-Id: Ifd78a1b227dc468ce882cf3caf78b4fae80cc006
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229386
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2019-07-29 13:26:06 +00:00
Brian Salomon
6f6d2de95c Test more color types in TransferPixelsFrom.
Change-Id: I55f04660c35595d53e6ad1753d3f922578cdf681
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229978
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-07-26 21:25:10 +00:00
Brian Salomon
42be09d535 Test GrGpu::transferPixelsTo for more color types.
Change-Id: Ibae377f01c1ed37c5dfac50a085c7eb97e93f24b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229376
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-07-26 16:48:12 +00:00
Greg Daniel
ba88ab65b3 Reland "Move ExternalFormat and Type to FormatInfo."
This reverts commit e2c5e8c7ee.

Reason for revert: relanding with fix

Original change's description:
> Revert "Move ExternalFormat and Type to FormatInfo."
>
> This reverts commit 80140518ef.
>
> Reason for revert: probably breaking angle
>
> Original change's description:
> > Move ExternalFormat and Type to FormatInfo.
> >
> > This also deletes the ConfigInfoTable in GrGLCaps as there is no more use
> > of it.
> >
> > Additionally with the rework of storing External Io info on the format table
> > I rewrote the implimination of supportedReadPixels and supportedWritePixels
> > for GL to loop over the supported types looking for a match instead of
> > simply defaulting to a base value.
> >
> > Finally transferFromOffsetAlignment has been rolled into the SupportedRead
> > instead of being its own query.
> >
> > Bug: skia:6718
> > Change-Id: I39f77adf6c0b5b38245e55e8a7e18c0b428862d0
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229381
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
>
> Change-Id: Ifef2e7308fdb4d91d649f08488b798815e0aa5fa
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:6718
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229896
> 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: Ida09be706b461cf89467fc0082744177e71e8985
Bug: skia:6718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229918
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-07-26 13:17:16 +00:00
Mike Reed
59f2e46ab4 Return translate info from looper, rather than moding a canvas
Change-Id: Ibb4520030bc0ca455fa079d923fd4f5be86d72a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229837
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-07-25 20:39:13 +00:00