Commit Graph

4323 Commits

Author SHA1 Message Date
Brian Salomon
6422722cba Reland "Remove GrDeviceSpaceTextureDecalFragmentProcessor."
This is a reland of af5f9f008d

This was reverted due to Metal GMs failing. That is a bug in Metal where
pipeline creation fails with "internal error". Reporting to Apple, filing
Skia bug, and moving on.

Original change's description:
> Remove GrDeviceSpaceTextureDecalFragmentProcessor.
>
> It was used to sample clip masks using device coords.
>
> Replace with a more generic GrDeviceSpaceEffect that simply calls a
> child FP with sk_FragCoord.
>
> Also fix issue in GrQuadPerEdgeAA GP. It wouldn't setup coord transforms
> at all if they are all applied in the FS (explicit coords). Moreover,
> the GrGLSLGeometryProcessor::emitTransforms() helper required a valid VS
> var for local coords even when all FPs use explicit coords and wouldn't
> use a local coords var.
>
> Make CPP SkSL code gen for clone copy the explicit coord status of
> children.
>
> Change-Id: Ib8bb36028354405c8012f6e91e9eb46db75d16a6
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271658
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Change-Id: Ia4530e6799019cd92863fe983a2d3c71df6f0620
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273511
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-26 18:57:36 +00:00
Brian Salomon
c8d092a060 Revert "Revert "Remove copies for wrap modes in GrTextureProducer.""
This reverts commit bf5cb0f539.

Change-Id: I0dd15d03c42c5dc2c09ba81b6bc16d582f9093f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272928
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-02-25 14:06:21 +00:00
Brian Salomon
3fcf83a504 Fix GrTextureEffect with kRepeat/kRepeat/kBilerp.
Use absolute error value when doing shader-based interp between all
four subset corner texels.

Add 2x2 image to rectangle_texture GM and draw with all combos of
tile modes.

Change-Id: Ia5856d592b1c9ab8b588301e7b659b05a7439396
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272920
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-02-24 18:02:45 +00:00
Jim Van Verth
03b8ab225f Reland "Create D3D device and queue"
This is a reland of 29dc430f43

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

Bug: skia:9935
Change-Id: I1c8797e09cdeb3694ea7f47b2236ab7d91d9519f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272996
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-02-24 17:41:55 +00:00
Leandro Lovisolo
16656fc96c Revert "Create D3D device and queue"
This reverts commit 29dc430f43.

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

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

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

Change-Id: I3857444cae52cc2338258c46b974ae5496bbaedc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272726
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Commit-Queue: Leandro Lovisolo <lovisolo@google.com>
2020-02-21 22:49:12 +00:00
Jim Van Verth
29dc430f43 Create D3D device and queue
Bug: skia:9935
Change-Id: Ib6548f413ca3a8befb553d2d47354b400c9162b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272520
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-02-21 19:49:52 +00:00
Mike Reed
2a7c619546 switch to SkM44
Change-Id: I2d44eb5b1984212fb461977f5e9ee95717046a8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272467
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-21 17:19:02 +00:00
Mike Reed
46f5c5f08b Make SkM44 public
Need to migrate clients from private/ to core/ include
Unexperimentalize concat44() methods on SkCanvas

Change-Id: I64b8816722a9d93316cb8b8691d2d9a3e36f167f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272464
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-21 15:50:31 +00:00
Robert Phillips
bf5cb0f539 Revert "Remove copies for wrap modes in GrTextureProducer."
This reverts commit 7fba244ea9.

Reason for revert: See if this is blocking the Chrome roll

Original change's description:
> Remove copies for wrap modes in GrTextureProducer.
> 
> GrTextureEffect now supports implementing wrap modes in shaders
> for subsets and texture types with HW sampling restrictions.
> 
> Change-Id: I5c93ade044465e13c5f56f7437fbbe288db0a8a8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271056
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: I14397bec8ff4ba165c28faa8f44497f47d865862
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272522
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-21 13:47:00 +00:00
Brian Salomon
df283d01ca Revert "Remove GrDeviceSpaceTextureDecalFragmentProcessor."
This reverts commit af5f9f008d.

Reason for revert: bad GM results on Metal

Original change's description:
> Remove GrDeviceSpaceTextureDecalFragmentProcessor.
> 
> It was used to sample clip masks using device coords.
> 
> Replace with a more generic GrDeviceSpaceEffect that simply calls a
> child FP with sk_FragCoord.
> 
> Also fix issue in GrQuadPerEdgeAA GP. It wouldn't setup coord transforms
> at all if they are all applied in the FS (explicit coords). Moreover,
> the GrGLSLGeometryProcessor::emitTransforms() helper required a valid VS
> var for local coords even when all FPs use explicit coords and wouldn't
> use a local coords var.
> 
> Make CPP SkSL code gen for clone copy the explicit coord status of
> children.
> 
> Change-Id: Ib8bb36028354405c8012f6e91e9eb46db75d16a6
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271658
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: Ie02951dcc037d282dc3829cad216a0a0c9474038
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272518
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-02-20 22:38:48 +00:00
Brian Salomon
af5f9f008d Remove GrDeviceSpaceTextureDecalFragmentProcessor.
It was used to sample clip masks using device coords.

Replace with a more generic GrDeviceSpaceEffect that simply calls a
child FP with sk_FragCoord.

Also fix issue in GrQuadPerEdgeAA GP. It wouldn't setup coord transforms
at all if they are all applied in the FS (explicit coords). Moreover,
the GrGLSLGeometryProcessor::emitTransforms() helper required a valid VS
var for local coords even when all FPs use explicit coords and wouldn't
use a local coords var.

Make CPP SkSL code gen for clone copy the explicit coord status of
children.

Change-Id: Ib8bb36028354405c8012f6e91e9eb46db75d16a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271658
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-02-20 22:09:58 +00:00
Brian Salomon
7fba244ea9 Remove copies for wrap modes in GrTextureProducer.
GrTextureEffect now supports implementing wrap modes in shaders
for subsets and texture types with HW sampling restrictions.

Change-Id: I5c93ade044465e13c5f56f7437fbbe288db0a8a8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271056
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-02-20 22:09:48 +00:00
Chris Dalton
4386ad19fb Add GrOpsRenderPass::bindPipeline()
Clients now must call bindPipeline() before drawing.

Also renames GrOpsRenderPass::draw() to drawMeshes(), in order to
ensure every call site gets updated. drawMeshes() will soon be
replaced by individual calls for each draw type (indexed, instanced,
indexed-patterned, indirect, etc.).

Change-Id: I93ef579ded7d0048c5aa1bf1d7c0eb7bc1cd27b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270424
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-02-20 16:47:13 +00:00
Mike Reed
ba9e8171c1 allow client to pass null if there are no uniforms
Relies on https://skia-review.googlesource.com/c/skia/+/271738

Change-Id: I990ed71c847af472252b6efc3abde83fc741abfa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271698
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-02-19 14:21:39 +00:00
Brian Osman
fe6fe6c5a8 Revert "allow client to pass null if there are no uniforms"
This reverts commit 0185eb19d4.

Reason for revert: Asserts on ASAN bots

Original change's description:
> allow client to pass null if there are no uniforms
> 
> Change-Id: I788574ccd1f66cfa29556d7d84ae813d108a39c7
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271318
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: I497b657095570055066c4964150bfb16cd33b027
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271697
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-18 21:11:45 +00:00
Mike Reed
0185eb19d4 allow client to pass null if there are no uniforms
Change-Id: I788574ccd1f66cfa29556d7d84ae813d108a39c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271318
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-18 20:35:25 +00:00
Mike Reed
bfe80bb552 expand gm to test GPU and CPU
Change-Id: I7d1c80f1b7dadc8535736385aa3adb935fa24293
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271237
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-16 20:00:45 +00:00
Mike Reed
2c5ee18724 remove legacy factory for overdrawcolorfilter
Change-Id: I19453c51bf275050d6426b82a1ad717348a3ea56
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271136
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-15 16:53:39 +00:00
Brian Salomon
b3779f53f5 Remove GrTextureEffect::MakeTexelSubset.
Originally there was a distinction WRT half pixel insetting, but as I
learned more about what the call sites expected the distinction was
erased. Callers with a SkIRect can just convert to SkRect.

Change-Id: Ib1e117baffdb532ba09a668da7f851d02c2c5206
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270941
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-02-14 18:32:05 +00:00
Brian Salomon
f46f19b98c Add support for implementing ShaderMode::kRepeat with MIPs in GrTextureEffect.
Change-Id: I12ea00b35967f13e81410c584e34b62eea6c2ffe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270445
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-02-14 13:52:27 +00:00
Brian Salomon
53c909e05f Support bilerp filtering for all ShaderModes in GrTextureEffect.
Support MIP map for all but kRepeat.

Update texel_subset_ GMs to exercise newly supported modes.

Also makes GrTextureEffect do shader wrap modes for rectangle/
external textures even when not subsetted.

Change-Id: Ie2d299106120b5c6cc40365e8f300cc426dd5489
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268163
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-02-14 01:49:35 +00:00
Brian Salomon
16033c9cc1 Update texel_subset_* GMs.
Draw placeholder gray rectangles rather than omitting cols/rows.

Swap x and y mode iteration so they correspond with GM layout.

Change-Id: I3c2d95bcd5d684f5a5a99cb677c326864e13f252
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270641
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-02-13 18:50:05 +00:00
Mike Reed
146722ed8b threshold rtshader
Change-Id: Ia1a0e35f2cb7cf2f7fd1a58b88dc81ec59eced0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268943
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-02-13 18:00:22 +00:00
Ben Wagner
d38f00a12a Skip degenerate contours in glyphs.
Stroking in Skia follows the SVG rules of adding end caps to degenerate
contours. Skip all degenerate contours and degenerate curves on contours
to avoid this.

Bug: skia:9820
Change-Id: I320beeeb3728f39c764729454dcb128a05524d35
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268166
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-02-13 16:22:42 +00:00
Chris Dalton
79f336d074 Remove GrPrimitiveType from GrMesh
Change-Id: I9b5bdaa08f3a383ce24d33aca5448352d954d9c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270001
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-02-12 17:28:25 +00:00
Mike Klein
f7eb0544a8 basic, untested BGR 1010102 and 101010x
Updated every switch that yelled at me, and added support to dm and fm,
and then founds some more switches that shouldn't have defaults...

The tricky spots outside those were mips and dither,
since they aren't simply exhaustive switches.

_Now_ no diffs between RGB/BGR 1010102 and 101010x.

No GPU support.

Bug: skia:9893
Change-Id: I73ab3fd22bdef0519296dfe4cb84031e23ca0be3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270114
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-11 21:44:57 +00:00
Greg Daniel
e32506bf66 Update GrClipStackClip and GrDeviceSpaceTextureDecalFP to use views.
Bug: skia:9556
Change-Id: I61346e31b67ca1dffc5132e0af47aff4fdfc6e22
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269907
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-02-11 15:23:37 +00:00
Mike Reed
50a490a1a4 fix gm to test unpremul etc.
Change-Id: Ia53003e31b2e24ffc5834faefb1de0687036683d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270057
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-11 14:04:02 +00:00
Mike Reed
dc2782c380 Update OverdrawColorFilter to clarify how it interprets its input array.
1. Document that Make() takes RGBA_premul
2. Change impl so that CPU matches this behavior/definition
3. Offer a clearer factory that takes SkColor
   (perhaps migrate clients to this one in the future)

Bug: skia:9896
Change-Id: I0a81dda45834a2fbf2b28b711ba7e6b83f360aff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269906
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-02-11 10:58:36 +00:00
Brian Osman
7353dc5490 Change SkSL main() from (float x, float y) to (float2 p)
Change-Id: Id046199edd63535ef07e1dfa65fbc7c0f8cefd00
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269371
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-07 20:19:13 +00:00
Michael Ludwig
949ceb249f Add ClipToW0 utility function for GrQuads,
and improve perspective handling in rest of quad pipeline

This function produces 0, 1, or 2 quads clipped to w > 0, with proper
local coords. To make its signature a little easier to reason about,
I added a simple 'DrawQuad' struct that represents the combination of
device and local coordinates, and edge AA flags. I am open to suggestions
for the name.

GrQuad::bounds() remains perspective aware so that it is always correct.
I updated CropToRect to check for w < 0 and not attempt to crop in that
scenario. Theoretically, we could clip to w = 0 first and then go through
the CropToRect optimization path. However, with the current state of the
GrFillRectOp and GrTextureOp, that made it more annoying to have the bulk
APIs handle the w clipping as well.

So for now, the w plane clipping is entirely the responsibility of the
ops. A benefit of this approach is that GrRenderTargetContext doesn't need
to be modified, and in the case where the clipping produces 2 quads they
are automatically put in the same op w/o going through any batching code.

However, it is becoming clear to me that managing 4 effective code paths
(fill + texture X simple + bulk API) is more maintenance than it's worth.
I added skbug:9869 to work out how to simplify these op creation APIs further,
and if we succeed there, I think it will make applying the W plane clipping
more convenient as well.

For now, since this affects SkiaRenderer on Linux stable, I am pushing
for correctness.

Bug: skia:9779, chromium:224618
Change-Id: I4218a956cbe0bbc2b5c9cf133a069d54c93848e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268686
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-07 19:06:51 +00:00
Brian Osman
788b91678f Remove SkTMin and SkTMax
Use std::min and std::max everywhere.

SkTPin still exists. We can't use std::clamp yet, and even when
we can, it has undefined behavior with NaN. SkTPin is written
to ensure that we return a value in the [lo, hi] range.

Change-Id: I506852a36e024ae405358d5078a872e2c77fa71e
Docs-Preview: https://skia.org/?cl=269357
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269357
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-07 18:40:09 +00:00
Greg Daniel
c7672092e8 Have gpu yuv code speak in views.
Bug: skia:9556
Change-Id: Iaa071d53248dfcd6d9e1bd88b24c8b39e133ced2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269148
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-02-06 21:47:02 +00:00
Brian Osman
aba642c6ac Remove SkScalarClampMax and SkScalarPin
Change-Id: Ic96a0ea2cd1bfd59ee3f236543e1d6dd102544ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269142
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-02-06 18:29:51 +00:00
Brian Osman
7f36405ea3 Remove SkMin32/SkMax32
Use std::max and std::min instead

Change-Id: I7fd2626ea9ea8ea09c709ff962523ca3de2f8a16
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269136
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-06 17:31:51 +00:00
Ben Wagner
782a957f83 Update fontscalerdistortable to onOnceBeforeDraw.
In viewer fontscalerdistortable spends a large amount of resources
continually recreating typefaces. Instead, just create the needed
typefaces once up front and then use them in onDraw. This also makes it
easier to just check in popular variants for testing how system specific
fonts look.

Change-Id: Ie5f975cd87e87523b6f28ff01ec9ffc726d8b971
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265148
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-02-06 16:25:41 +00:00
Brian Osman
116b33e8ab Remove SkMaxScalar and SkMinScalar
Use std::max and std::min instead

Change-Id: Icf3796609e5cb511687fb50bd31229ae4b6b9b39
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268841
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-06 15:43:22 +00:00
Greg Daniel
febdedfa44 Switch SkImage_Base asTextureProxyRef to return view instead.
Bug: skia:9556
Change-Id: Ibcdf187021c22290013d99d8684f891576046052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268937
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-02-06 15:38:21 +00:00
Tyler Denniston
45f94f8344 Reland: Initial checkin of GM verifier framework
The goal of the verifier framework is to enable opt-in checks of the
images produced by individual GMs. The basis of verification will be
comparing the rendered output of a GM against a source-of-truth image,
such as one generated by the CPU backend.

In the short term this can enable coarse-grained sanity checks for a
subset of GMs to catch e.g. egregious rendering bugs. In the longer term
this can provide an SkQP-style suite of tests that can be run across
many/all GMs to provide a vote of confidence in the rendering
correctness of new devices.

Bug: skia:9855
Change-Id: I50f15ecd029b28b69c0f68dc4126df3a4dd61d75
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268685
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-02-06 15:01:31 +00:00
Brian Osman
3225306f82 In SkRuntimeEffect, just use hash of SkSL as the ID
Change-Id: I2ce210889452756d5d100fbb15f578bb72e2af2a
Bug: skia:9813
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268687
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-05 17:52:48 +00:00
Greg Daniel
d2ccbb522e Have GrTextureEffect factories take a view as input.
Bug: skia:9556
Change-Id: I06fd7e9bc7e370a5b8891220308a6d362336be9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268632
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-02-05 16:19:57 +00:00
Greg Daniel
37c127f558 Rename view getters in various image subclasses.
This also changes the SkImage_Base header to return a const& view and
then removes the equivalent version in SkImage_GpuBase.

Bug: skia:9556
Change-Id: Ica096693a22c0fc590786058c055fb28387c80a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268624
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
2020-02-05 16:02:27 +00:00
Greg Daniel
c61d7e3d6e Rename various getters related to GrSurfaceProxyView.
Bug: skia:9556
Change-Id: Ib418beeb6c62854462a6023ebe410c7ca76e6dec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268620
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
2020-02-05 14:29:08 +00:00
Tyler Denniston
14d64afaa8 Revert "Initial checkin of GM verifier framework"
This reverts commit 7e36f0015e.

Reason for revert: breaking google3 roll

Original change's description:
> Initial checkin of GM verifier framework
> 
> The goal of the verifier framework is to enable opt-in checks of the
> images produced by individual GMs. The basis of verification will be
> comparing the rendered output of a GM against a source-of-truth image,
> such as one generated by the CPU backend.
> 
> In the short term this can enable coarse-grained sanity checks for a
> subset of GMs to catch e.g. egregious rendering bugs. In the longer term
> this can provide an SkQP-style suite of tests that can be run across
> many/all GMs to provide a vote of confidence in the rendering
> correctness of new devices.
> 
> Bug: skia:9855
> Change-Id: Id7310de8005ffa7e8eb2fd0e4008f5f8db1419ab
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267761
> Commit-Queue: Derek Sollenberger <djsollen@google.com>
> Auto-Submit: Tyler Denniston <tdenniston@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>

TBR=djsollen@google.com,tdenniston@google.com

Change-Id: Ie3beff447fea406b5ad3c3ca5a98fa2bd73d20fb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9855
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268682
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-02-04 20:54:39 +00:00
Tyler Denniston
7e36f0015e Initial checkin of GM verifier framework
The goal of the verifier framework is to enable opt-in checks of the
images produced by individual GMs. The basis of verification will be
comparing the rendered output of a GM against a source-of-truth image,
such as one generated by the CPU backend.

In the short term this can enable coarse-grained sanity checks for a
subset of GMs to catch e.g. egregious rendering bugs. In the longer term
this can provide an SkQP-style suite of tests that can be run across
many/all GMs to provide a vote of confidence in the rendering
correctness of new devices.

Bug: skia:9855
Change-Id: Id7310de8005ffa7e8eb2fd0e4008f5f8db1419ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267761
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Auto-Submit: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2020-02-04 20:11:24 +00:00
Florin Malita
d589916ebc Potentially-uninitialized Sk3LookAt result
Bug: oss-fuzz:20520
Change-Id: I383881571fa156c6faa5e798a1e126bb9e5e8dd0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268621
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2020-02-04 15:31:30 +00:00
Robert Phillips
d095b9f5d7 Fix SW decompression of BC1 and add a GM to check it (take 2).
Bug: skia:9680
Change-Id: I59a4c18f7ba7d04162715cfcbeefd70f84609edb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268439
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-04 13:41:10 +00:00
Robert Phillips
ab5da1f6b6 Revert "Fix SW decompression of BC1 and add a GM to check it."
This reverts commit 4238751bc3.

Reason for revert: This appears to be turning the PreAbandonGpuContext bot red

Original change's description:
> Fix SW decompression of BC1 and add a GM to check it.
> 
> Bug: skia:9680
> Change-Id: I8a8f9ee1aad783fc247c5516ac1effd0dab25936
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268158
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: I4304f13453579eb3ee6d3c0febe8c94ebfe915b2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9680
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268438
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-03 21:03:41 +00:00
Robert Phillips
4238751bc3 Fix SW decompression of BC1 and add a GM to check it.
Bug: skia:9680
Change-Id: I8a8f9ee1aad783fc247c5516ac1effd0dab25936
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268158
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-02-03 20:42:31 +00:00
Greg Daniel
cc104db12c Have GrTextureProducer return views instead of proxies.
Bug: skia:9556
Change-Id: Ieedb9c48914c637278203d4d462c19b2d85b27d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268396
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-02-03 20:42:21 +00:00