Commit Graph

4141 Commits

Author SHA1 Message Date
Brian Osman
2b73e66ca5 Add BT2020 (non-constant-luminance) YUV color space
Change-Id: I8ef13b78a5f2f49ff9c59db285b3e0e7ee708c9b
Bug: chromium:960620
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252160
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-11-01 14:34:13 +00:00
Brian Osman
ac8a16ca52 Update YUV GMs to use SkYUVMath matrices
There is now just one location that defines these transformations.

Change-Id: I06b2c81610cb5aec73daa39d130f9da610b668ef
Bug: skia:9543
Change-Id: I06b2c81610cb5aec73daa39d130f9da610b668ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251958
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-10-31 14:54:03 +00:00
Chris Dalton
8a64a44244 Rename sampleVariablesSupport() to sampleMaskSupport()
We have only implemented support for the sample mask. This CL renames
the cap to reflect that.

It also replaces sampleVariablesStencilSupport() with the more aptly
named canOnlyUseSampleMaskWithStencil(), to make it more clear that
this is a driver workaround.

Change-Id: Ibf54092c63181232fb3b94cad7ddb16e3a15e3d1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251580
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-10-30 16:20:47 +00:00
Mike Klein
278615afb4 add a paint-color string to gm/emboss
I'm not hitting SkVMBlitter with a 3D mask
without also implementing support for SkColorShader.

Adding this green "World" tests that path with
a paint color, and should let me test and land 3D
mask support before adding shader support.

Change-Id: I9020a14a8a77dd2946c094308e5ad04beea20068
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251439
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-10-29 21:12:22 +00:00
Robert Phillips
d9ddd07554 Revert "Rename sampleVariablesSupport() to sampleMaskSupport()"
This reverts commit 766b4c9c21.

Reason for revert: GMs and bots

Original change's description:
> Rename sampleVariablesSupport() to sampleMaskSupport()
> 
> We have only implemented support for the sample mask. Renaming the cap
> to reflect that.
> 
> Change-Id: I10b5923c7464093187336016963a8ac51ebd54f5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249932
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>

TBR=egdaniel@google.com,csmartdalton@google.com,ethannicholas@google.com

Change-Id: I712169e86ee479bffd71d6665710f731d6c0e042
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250179
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-10-23 12:27:08 +00:00
Chris Dalton
766b4c9c21 Rename sampleVariablesSupport() to sampleMaskSupport()
We have only implemented support for the sample mask. Renaming the cap
to reflect that.

Change-Id: I10b5923c7464093187336016963a8ac51ebd54f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249932
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2019-10-22 21:08:55 +00:00
Brian Salomon
9f2b86c54d More SkISizification in GPU code.
Uses SkISize instead of separate width/height variables in many places.

No functional change.

Change-Id: If87b2c57e43d810f0820c4e3c9ef8e6b8ebd10ba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249886
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-10-22 15:04:07 +00:00
Brian Salomon
4eda7108a2 Simplify sk_gpu_test::MakeTextureProxyFromData.
Make it take GrImageInfo.

Change-Id: I9ec16e9b935fbe3e829b4669f715c17873a1793a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249813
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-10-21 20:04:37 +00:00
Robert Phillips
6c2aa7af0b Revert "Reduce inputs to GrProgramDesc::Build method(s)"
This reverts commit 63a3873957.

Reason for revert: fail

Original change's description:
> Reduce inputs to GrProgramDesc::Build method(s)
> 
> This moves the computation of the GrStencilSettings into GrProgramDesc::Build for the Vulkan backend
> 
> This makes it clear that the stencilSettings are determined by the GrProgramInfo.
> 
> Note that this does change some behavior in that the number of stencil bits is now determined (and set up for) the number requested not the number actually available on the attached stencil buffer at flush time.
> 
> Bug: skia:9455
> Change-Id: Ia5fa4e30e34952c1a492b8d571094abf2291b2a4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248696
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: Ib0b337c19acea8000b5592f3dfeda181fd6ef157
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9455
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249222
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-10-17 19:06:52 +00:00
Robert Phillips
63a3873957 Reduce inputs to GrProgramDesc::Build method(s)
This moves the computation of the GrStencilSettings into GrProgramDesc::Build for the Vulkan backend

This makes it clear that the stencilSettings are determined by the GrProgramInfo.

Note that this does change some behavior in that the number of stencil bits is now determined (and set up for) the number requested not the number actually available on the attached stencil buffer at flush time.

Bug: skia:9455
Change-Id: Ia5fa4e30e34952c1a492b8d571094abf2291b2a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248696
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-10-17 18:32:40 +00:00
Greg Daniel
c594e62698 Plumb GrColorType through all ops/processors that sample textures.
This change also allows for the remove of GrPixelConfigIsOpaque function.

Bug: skia:6718
Change-Id: I7e7b70f02d911eda67640d648fb6348091e0f55d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248698
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-10-15 18:34:37 +00:00
Robert Phillips
2d8a95ee71 Add "meshCount" to GrProgramInfo
This improves the encapsulation of the GrProgramInfo class.

Bug: skia:9455
Change-Id: Ic241ba4a2c2edea3e774522065371e5ed8cc2da3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/247438
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-10-10 17:18:15 +00:00
Robert Phillips
901aff018b Add GrProgramInfo to centralize management of program information
This is the first step in moving the marshaling of program information earlier in renderTask processing (i.e., to onPrePrepare).

Change-Id: I91e3baed9a128e845bd32f9dbbacd9b21d852a3d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244118
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-10-08 20:35:51 +00:00
Robert Phillips
405413fcec Clarify that the OpArgs' outputSwizzle comes from its GrRenderTargetProxy
Since we want to collect shader information early, this attempts to make clear that numSamples, origin and outputSwizzle can all be obtained from the target renderTargetProxy.


Change-Id: I42e0fd79e2163f17673ccdd344a31fbaadac5f53
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/246298
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-10-04 18:03:32 +00:00
Brian Salomon
9241a6d394 Reland "Reland "SkSurface asynchronous read APIs allow client to extend pixel lifetime""
This is a reland of 6fc04f88a8

Original change's description:
> Reland "SkSurface asynchronous read APIs allow client to extend pixel lifetime"
> 
> This is a reland of ce240cc6fd
> 
> Original change's description:
> > SkSurface asynchronous read APIs allow client to extend pixel lifetime
> > 
> > Previously the pixel data passed to the client was only valid during
> > the client's callback. This meant if the client wanted to defer
> > processing of the data a copy was necessary.
> > 
> > Now we pass an object to the callback and the pixel lifetime is tied
> > to the lifetime of that object.
> > 
> > The object may be holding a GPU transfer buffer mapped. We don't assume
> > that the object will be released on the direct GrContext thread. So
> > when the object is destroyed it posts a message to a new type,
> > GrClientMappedBufferManager, hanging off the direct context. The direct
> > context will periodically check for messages and unmap and then unref
> > buffers so that they can be reused. Currently this is done in
> > GrContext::performDeferredCleanup() and GrDrawingManager::flush().
> > 
> > The old API is kept around for backwards compatibility but it is
> > reimplemented as a bridge on top of the new mechanism.
> > 
> > Also a utility function to SkImageInfo is added to directly make a new
> > info with a specified dimensions rather than passing the width and
> > height separately to makeWH().
> > 
> > Bug: chromium:973403
> > Bug: skia:8962
> > 
> > Change-Id: Id5cf04235376170142a48e90d3ecd13fd021a2a6
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245457
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> 
> Bug: chromium:973403, skia:8962
> Change-Id: I5cecd36276c8b6dc942cf549c7095db2df88530c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245678
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: chromium:973403, skia:8962
Change-Id: Ie584c1c3ef8021c976f71b708e53871c693cc450
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/246057
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-10-03 19:14:22 +00:00
Ravi Mistry
cb55010652 Revert "Reland "SkSurface asynchronous read APIs allow client to extend pixel lifetime""
This reverts commit 6fc04f88a8.

Reason for revert: Chrome roll failure suspect because of:
* https://chromium-review.googlesource.com/c/chromium/src/+/1837131 (22 commits)
* https://chromium-review.googlesource.com/c/chromium/src/+/1837214 (24 commits)

Original change's description:
> Reland "SkSurface asynchronous read APIs allow client to extend pixel lifetime"
>
> This is a reland of ce240cc6fd
>
> Original change's description:
> > SkSurface asynchronous read APIs allow client to extend pixel lifetime
> >
> > Previously the pixel data passed to the client was only valid during
> > the client's callback. This meant if the client wanted to defer
> > processing of the data a copy was necessary.
> >
> > Now we pass an object to the callback and the pixel lifetime is tied
> > to the lifetime of that object.
> >
> > The object may be holding a GPU transfer buffer mapped. We don't assume
> > that the object will be released on the direct GrContext thread. So
> > when the object is destroyed it posts a message to a new type,
> > GrClientMappedBufferManager, hanging off the direct context. The direct
> > context will periodically check for messages and unmap and then unref
> > buffers so that they can be reused. Currently this is done in
> > GrContext::performDeferredCleanup() and GrDrawingManager::flush().
> >
> > The old API is kept around for backwards compatibility but it is
> > reimplemented as a bridge on top of the new mechanism.
> >
> > Also a utility function to SkImageInfo is added to directly make a new
> > info with a specified dimensions rather than passing the width and
> > height separately to makeWH().
> >
> > Bug: chromium:973403
> > Bug: skia:8962
> >
> > Change-Id: Id5cf04235376170142a48e90d3ecd13fd021a2a6
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245457
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
>
> Bug: chromium:973403, skia:8962
> Change-Id: I5cecd36276c8b6dc942cf549c7095db2df88530c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245678
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: I9e01d1b82fb399b94292441d91da51176bb161d9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:973403, skia:8962
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245956
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-10-03 09:19:24 +00:00
Brian Salomon
6fc04f88a8 Reland "SkSurface asynchronous read APIs allow client to extend pixel lifetime"
This is a reland of ce240cc6fd

Original change's description:
> SkSurface asynchronous read APIs allow client to extend pixel lifetime
> 
> Previously the pixel data passed to the client was only valid during
> the client's callback. This meant if the client wanted to defer
> processing of the data a copy was necessary.
> 
> Now we pass an object to the callback and the pixel lifetime is tied
> to the lifetime of that object.
> 
> The object may be holding a GPU transfer buffer mapped. We don't assume
> that the object will be released on the direct GrContext thread. So
> when the object is destroyed it posts a message to a new type,
> GrClientMappedBufferManager, hanging off the direct context. The direct
> context will periodically check for messages and unmap and then unref
> buffers so that they can be reused. Currently this is done in
> GrContext::performDeferredCleanup() and GrDrawingManager::flush().
> 
> The old API is kept around for backwards compatibility but it is
> reimplemented as a bridge on top of the new mechanism.
> 
> Also a utility function to SkImageInfo is added to directly make a new
> info with a specified dimensions rather than passing the width and
> height separately to makeWH().
> 
> Bug: chromium:973403
> Bug: skia:8962
> 
> Change-Id: Id5cf04235376170142a48e90d3ecd13fd021a2a6
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245457
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: chromium:973403, skia:8962
Change-Id: I5cecd36276c8b6dc942cf549c7095db2df88530c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245678
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-10-03 01:41:35 +00:00
Brian Salomon
9c219785a8 Revert "SkSurface asynchronous read APIs allow client to extend pixel lifetime"
This reverts commit ce240cc6fd.

Reason for revert: crashing in chrome unit test, abandoned context related?

Original change's description:
> SkSurface asynchronous read APIs allow client to extend pixel lifetime
> 
> Previously the pixel data passed to the client was only valid during
> the client's callback. This meant if the client wanted to defer
> processing of the data a copy was necessary.
> 
> Now we pass an object to the callback and the pixel lifetime is tied
> to the lifetime of that object.
> 
> The object may be holding a GPU transfer buffer mapped. We don't assume
> that the object will be released on the direct GrContext thread. So
> when the object is destroyed it posts a message to a new type,
> GrClientMappedBufferManager, hanging off the direct context. The direct
> context will periodically check for messages and unmap and then unref
> buffers so that they can be reused. Currently this is done in
> GrContext::performDeferredCleanup() and GrDrawingManager::flush().
> 
> The old API is kept around for backwards compatibility but it is
> reimplemented as a bridge on top of the new mechanism.
> 
> Also a utility function to SkImageInfo is added to directly make a new
> info with a specified dimensions rather than passing the width and
> height separately to makeWH().
> 
> Bug: chromium:973403
> Bug: skia:8962
> 
> Change-Id: Id5cf04235376170142a48e90d3ecd13fd021a2a6
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245457
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ic14cf07a7629b167c9f34a651aa87a0326e74207
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:973403, skia:8962
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245721
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-10-02 22:51:15 +00:00
Brian Salomon
ce240cc6fd SkSurface asynchronous read APIs allow client to extend pixel lifetime
Previously the pixel data passed to the client was only valid during
the client's callback. This meant if the client wanted to defer
processing of the data a copy was necessary.

Now we pass an object to the callback and the pixel lifetime is tied
to the lifetime of that object.

The object may be holding a GPU transfer buffer mapped. We don't assume
that the object will be released on the direct GrContext thread. So
when the object is destroyed it posts a message to a new type,
GrClientMappedBufferManager, hanging off the direct context. The direct
context will periodically check for messages and unmap and then unref
buffers so that they can be reused. Currently this is done in
GrContext::performDeferredCleanup() and GrDrawingManager::flush().

The old API is kept around for backwards compatibility but it is
reimplemented as a bridge on top of the new mechanism.

Also a utility function to SkImageInfo is added to directly make a new
info with a specified dimensions rather than passing the width and
height separately to makeWH().

Bug: chromium:973403
Bug: skia:8962

Change-Id: Id5cf04235376170142a48e90d3ecd13fd021a2a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245457
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-10-02 19:20:08 +00:00
Greg Daniel
5faf474fab More bounds fixes for StrokeRect and DefaultPath when using MSAA for non-aa.
Change-Id: Ia9c2a47675eac8f3ac1220c0e1089766aa141fc1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245364
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-10-01 19:49:15 +00:00
Brian Salomon
4bc0c1fc4b Rename GrColorSpaceInfo -> GrColorInfo
Add version SkImageInfo::Make() that takes SkISize instead of separate
width and height.

Change-Id: I42aa79d23b19e22f5405631728c245b04bce0559
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245172
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-09-30 21:53:24 +00:00
Robert Phillips
66944404ce Make SkPixmap-variant of createBackendTexture public
Change-Id: I51d916d2410428113e29d2fc374e5f1f7f4010b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244676
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-09-30 18:06:14 +00:00
Greg Daniel
55e5be3fc3 Fix reported op bounds on a few ops.
Change-Id: I00bed7dc891d0153e1ea62e6c650ab54bf234800
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245164
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-09-30 17:13:58 +00:00
Brian Salomon
729fc0cb65 Revert "Construct GPU SkImages with SkColorType, don't infer from GrPixelConfig"
This reverts commit 384f6e35b1.

Reason for revert: bot breakage

Original change's description:
> Construct GPU SkImages with SkColorType, don't infer from GrPixelConfig
> 
> Bug: skia:6718
> 
> Change-Id: I8828939427481ea7780a66fc0fed8e9909baba9b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245156
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ib52b457bfc4b323ce06ee5359d9e9ab580aff6ea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245166
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-09-30 16:33:19 +00:00
Brian Salomon
384f6e35b1 Construct GPU SkImages with SkColorType, don't infer from GrPixelConfig
Bug: skia:6718

Change-Id: I8828939427481ea7780a66fc0fed8e9909baba9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245156
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-09-30 15:28:30 +00:00
Ethan Nicholas
31cff27607 Revert "Revert "remove 'in uniform' support from GrSkSLFP, make rules more clear""
This reverts commit 85705c1b3b.

Change-Id: If189dafce53491728296a4292c76af55b05835ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244509
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-09-26 18:11:45 +00:00
Ethan Nicholas
85705c1b3b Revert "remove 'in uniform' support from GrSkSLFP, make rules more clear"
This reverts commit ac18a5ca60.

Reason for revert: breaking Chrome roll

Original change's description:
> remove 'in uniform' support from GrSkSLFP, make rules more clear
> 
> Bug: skia:
> Change-Id: Iaa4d33c1bfb295d87343411ba6aacc8fae68ef9c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244300
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

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

Change-Id: I6e53f5197c751d961abfa21861b940d4168de213
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244508
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-09-26 16:04:26 +00:00
Herb Derby
4e8f63a92a Blur both in x and y
Change-Id: Iea4ad298fe472182411a0246b8bae2972523c575
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244263
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-09-26 15:17:51 +00:00
Ethan Nicholas
ac18a5ca60 remove 'in uniform' support from GrSkSLFP, make rules more clear
Bug: skia:
Change-Id: Iaa4d33c1bfb295d87343411ba6aacc8fae68ef9c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244300
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-09-26 14:05:10 +00:00
Herb Derby
f07a363413 Limit sigma for software blurs
The value (window + 1)^3 * 255 < 2^32.
window = floor(sigma * 3 * sqrt(2 * kPi) / 4)
So, max sigma = 135.

Bug: skia:9454
Change-Id: I1df5137013da3e80d1e8af9ed6ac2b688ef95e7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243430
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-09-24 14:00:36 +00:00
Chris Dalton
c096654fa7 ccpr: Don't assign inverse fill types to fan tessellations
Bug: skia:9453
Change-Id: Iabbd1089975efff4e89687e990128c075bf0ab9d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243432
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-09-24 02:44:17 +00:00
Brian Osman
2e29ab5b03 added support for user-defined functions to GrSKSLFP
Bug: skia:
Change-Id: I1483cdf7229b7234be41d21407e2b4abf99fff76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239925
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-09-20 17:13:57 +00:00
Robert Phillips
ea1b30b57b New proposed syntax for SkColorTypes
Everything except for SkImageInfo.h is mechanical

Change-Id: I2d775c79467fb15f6022e80d21b4a9151272fe2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242896
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-09-19 20:42:55 +00:00
Robert Phillips
f47717ad8c Alter wacky_yuv_formats GM to skip rows if the required backing GPU format(s) aren't supported
Change-Id: I066345d57f11e0937fc760ebdba6ad308a5f948b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242821
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-09-19 18:06:38 +00:00
Robert Phillips
17a3a0bda9 Last tranche of new SkColorTypes
This CL adds:
    kAlpha_F16_SkColorType
    kRG_F16_SkColorType
    kRGBA_16161616_SkColorType,

which should be it for a while.

Bug: skia:9121
Change-Id: I81b9d46a202a76e9b7d7ca86495d72dbdae32576
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241357
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-09-18 18:23:29 +00:00
Brian Salomon
db47b16d46 blurrect_compare GM: draw "masks" in white for RGBA fallback.
Change-Id: I569fd550dbdd3fcff5e879f68a919da92421513a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242477
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-18 17:01:05 +00:00
Brian Salomon
db151e073f Respect ImageSetEntry alpha in one-at-a-time code path
Previously it was ignored. Update GM with test case that covers this.

Change-Id: I93e7de285a9d4020dd48e14e09e55fdfb346fff7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242083
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-09-17 17:07:54 +00:00
Mike Reed
4241f5e0a8 Revert "add guard to switch to SkPathTypes"
This reverts commit e1af44498b.

Reason for revert: breaking google3?

Original change's description:
> add guard to switch to SkPathTypes
> 
> Change-Id: I44d8b5ae8a5172d11a6d4cd9d994373dd3816d6f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241278
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: If1fffb6310921ee6f213af000da793afcf62ab0b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241560
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-09-14 19:13:44 +00:00
Mike Reed
e1af44498b add guard to switch to SkPathTypes
Change-Id: I44d8b5ae8a5172d11a6d4cd9d994373dd3816d6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241278
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-09-14 01:26:38 +00:00
Brian Salomon
032cf12f2b Make blurrect_compare GM work on GPUs without renderable A8
Change-Id: I8965a6a417bc7b228e723d8e53a5ff46f8c7badf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240836
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-12 13:40:19 +00:00
Robert Phillips
429f0d380c Add kRG_1616 and kAlpha_16 SkColorTypes
This also switches GrColorType::kR_16 to kAlpha_16 to more closely match raster.

Bug: skia:9121
Change-Id: I03c6e6c52c90aa4223478c5ea6c8b2ed8558f677
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239930
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-09-12 12:20:09 +00:00
Brian Salomon
4fe30e15c0 Also skip blurrect_compare on DDL configs
Change-Id: I5ead00b6d04c9b528a2b04f8ba2d20973ef95c13
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240561
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-10 21:50:06 +00:00
Brian Salomon
78be3ebee7 Update new blurrect_compare GM to skip when SkCanvas::makeSurface will fail
Change-Id: I6e101bf54e233345934e258dadb4fb7ab3283b61
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240511
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-10 18:31:15 +00:00
Brian Salomon
a8f43ce668 Remove unused GM deferred canvas feature
Change-Id: I57b7fab34a46dd03a045800989e73f9001bdb6cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240506
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-10 18:28:05 +00:00
Brian Salomon
b2d5d40a33 Adapt GrRectBlur for cases with rect W/H less than six sigma.
Add GM that generates reference blur rect images and compares against
actual.

Change-Id: If0ce291e211fefe96af8afdf0a60636b5f40ef47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239757
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-10 14:39:07 +00:00
Robert Phillips
d470e1b905 Add kRG_88_SkColorType
Bug: skia:9121

Change-Id: Id2a12a5d607b84ce393d2b58233bf8e23f646059
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235797
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-09-06 17:55:26 +00:00
Greg Daniel
f793de1189 Update some ops to create their buffers in onPrepare.
Need for a follow on change, we need all ops to do all their prep work
which includes creating needed buffers before we start calling
execute on ops. This change updates the few ops that were creating their
buffers in onExecute.

Change-Id: I0f43b0cc35359e1e7ccfb3b159e79bdfe288dcb1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239436
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-09-05 19:43:11 +00:00
Mike Reed
18a8df6cc1 update gm to better show the unclipped layers
Change-Id: I7dd19befda85bf2f89f317d190b7296ded91c00e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238957
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-09-03 20:10:48 +00:00
Robert Phillips
cf39f375d1 Remove maxCount resource cache limit
Change-Id: I0f1064c8433d69e24ca3d5b970c99d539dc1dadd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238442
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-09-03 14:59:51 +00:00
Michael Ludwig
0a1e9efa39 Don't use AA convex path renderer if direction can't be determined
Without the changes to GrShape and GrAAConvexPathRenderer, this new GM
would not draw the red circle at the center when using Ganesh. Raster
drew the red circle. The difference came about because they checked
convexity after transforming by the view matrix, and Ganesh checked
before.

With this particular path construction and the very large scale factor
on the CTM, the convexity calculator in local space computed small
enough edge vectors that it thought the contour backtracked on itself
instead of winding in a consistent direction.

The GrAAConvexPathRenderer would claim it could draw the convex path,
but later when actually preparing to draw, it would do nothing if it
turned out the convex path didn't have a direction. This CL updates it
so that the convex path renderer's canDraw() function matches what it
is actually able to draw.

There is the separate issue of the convexity/direction checking
precision.

Bug: chromium:996140
Change-Id: I6f2af2d9ba6752663d97c8573deb2d767a3f1245
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238121
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-09-02 01:57:03 +00:00