Commit Graph

62 Commits

Author SHA1 Message Date
Brian Salomon
c411429239 Convert GrGLDriver/Vendor/Renderer to enum classes
Reformat uses to de-yodaify and try to improve readabilty of
complicated conditionals.

Change-Id: Ifccb84836cbe4f5a01813795ceb287089984f8ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405685
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-05-07 18:28:48 +00:00
Chris Dalton
f5b87f9b11 Make SkSurfaceProps non-optional for SDCs and SkSpecialImages
This ensures we don't lose the original SkSurfaceProps when creating
image filters, etc.

Bug: skia:11396
Change-Id: I6b412361c1005138278a1396faa7f7e069ec7eb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397291
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-04-20 16:22:46 +00:00
Brian Salomon
18ab2030e3 Make GrGLSLFragmentProcessors be created as std::unique_ptr.
Rename factory function from createGLSLInstance() to makeProgramImpl()

Bug: b/180759848
Bug: skia:11358
Change-Id: I095bdf1f26db5a8192fa8ab59000db4a1d561d96
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/373738
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-02-23 19:31:01 +00:00
Brian Osman
e795954366 Run the Programs unit test on all rendering backends
Change-Id: I2bf8070fccacb21d2c5de56cdd9b6b77adb6c5a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368876
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-02-18 17:40:58 +00:00
John Stiles
bead7e324a Remove GrFragmentProcessor::usesExplicitReturn.
All fragment processors now use explicit returns; sk_OutColor no longer
exists at all.

Change-Id: Ic5cf566a916c1d616edcc56ba84b6780776f8515
Bug: skia:10549
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344300
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-12-15 18:06:12 +00:00
John Stiles
02eb5dc371 Remove sk_OutColor built-in variable.
Change-Id: I41a5aea7b01efe8901498621197b9a5ff0f4fe5f
Bug: skia:10549
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344656
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-12-15 17:03:12 +00:00
Brian Salomon
1aa1f5fcba whole-word replace renderTargetContext with surfaceDrawContext
TBR:egdaniel@google.com

Change-Id: Ia471dfc1278bcbeb2b485e4deeb3e932060c50a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343576
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-12-11 23:24:40 +00:00
Brian Salomon
eebe735dea GrRenderTargetContext->GrSurfaceDrawContext
Just the class/files. variable names and additional comments to follow.

Change-Id: Ic03d07fd5009eaf3d706c2536486a117328963fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342617
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-12-10 18:51:19 +00:00
Brian Osman
03f9e2a3b7 Remove fInputColor usage in unit-test FPs
Change-Id: If467390cd3e1d33f0e72db4b75f9889d4562af5a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341722
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-12-09 15:40:08 +00:00
Brian Salomon
70fe17e12f Remove GrRenderTargetContextPriv and GrSurfaceContextPriv
I think this is vestigial from some time in the past where RTC was
public.

Also just expose the methods that add ops rather than have so many
friends + testingOnly versions.

Change-Id: I60d9fdff23b2d67039a7b37815da7ff9e73d8999
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339158
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-11-30 20:13:25 +00:00
Adlai Holler
a069304560 Rename GrContextPriv to GrDirectContextPriv
Change-Id: I3fccadd8a2860dbee73f93f995738146373f8a39
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326196
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-10-14 16:46:01 +00:00
Brian Salomon
32d41b7e45 Stop building GL backend on Android Vulkan builders
Should reduce build time and avoid running GL unit tests redundantly
on Vulkan bots.

Change-Id: I67379e6820dab2f038175a825ee1461086a2da84

Cq-Include-Trybots: luci.skia.skia.primary:Test-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan
Change-Id: I67379e6820dab2f038175a825ee1461086a2da84
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318196
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-09-21 14:54:00 +00:00
John Stiles
7571f9e490 Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'.
Mechanically updated via Xcode "Replace Regular Expression":

  typedef (.*) INHERITED;
    -->
  using INHERITED = $1;

The ClangTidy approach generated an even larger CL which would have
required a significant amount of hand-tweaking to be usable.

Change-Id: I671dc9d9efdf6d60151325c8d4d13fad7e10a15b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314999
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-03 03:41:26 +00:00
John Stiles
1cf2c8d6ec Enable ClangTidy flag modernize-use-override.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html

Adds override (introduced in C++11) to overridden virtual functions and
removes virtual from those functions as it is not required.

virtual on non base class implementations was used to help indicate to
the user that a function was virtual. C++ compilers did not use the
presence of this to signify an overridden function.

Change-Id: If66d8919358f72a4035190caf8d7569268037a9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310160
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-14 10:54:45 +00:00
John Stiles
87d0a2fa53 Update MakeChildFP to allow processor hierarchies to be created.
Previously, MakeChildFP avoided infinite recursion by rejecting any FP
that took inputs. MakeChildFP now generates random inputs up to a
user-supplied tree depth.

The ProcessorOptimizationValidationTest test has been updated to
test up to a tree depth of 3. The ProcessorCloneTest has been left at
a tree depth of 1 due to a bug that only appears on Galaxy S20/Mali G77.
The Mali bug doesn't appear to be related to FP cloning, but probably
deserves further analysis. (It appears that on this device, these
processors hooked together in sequence render a tiny bit differently
each time: DitherEffect -> RectBlurEffect -> ImprovedPerlinNoise. By
visual inspection it looks like the dither varies on each draw.)

Change-Id: Ib8f619eb7a8a9c9254080303504c20065ff35453
Bug: skia:10384, skia:10595
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308556
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-10 19:27:44 +00:00
Robert Phillips
58adb34cda Update more tests to use the GrDirectContext/GrRecordingContext pair
Change-Id: I66011fef006398a95c9f54af97c5c1092b8b7415
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305497
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-24 18:05:30 +00:00
John Stiles
f743d4eb53 Rename Xfermode fragment processor to Blend.
Change-Id: Iaa0829d72d0da1469df2da23102ff0e3572b641b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305556
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-07-24 13:34:00 +00:00
John Stiles
41d91b68b5 Remove support for multiple coverage processors from GrPaint API.
Change-Id: I82276e38ea4a5524127176eb5a34066b6cb06d88
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304799
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-07-21 19:44:38 +00:00
John Stiles
5933d7d54f Update GrPaint APIs to reflect lack of multiple color processors.
Change-Id: Ic7799b3c5f4294cba9ff72f8c11a2ad285ab189f
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304738
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-07-21 17:09:58 +00:00
John Stiles
6c452a50e9 Remove support for multiple color processors from GrPaint.
Change-Id: Ia92dc2be9a25f334bdbc098564cf2332496677fa
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304296
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-07-21 16:48:57 +00:00
Brian Salomon
69100f05bb Rename GrCaps fields and methods from MipMap to Mipmap
Change-Id: I44d151dc80aca8fc6426735ee17224cb5b8aa576
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304603
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-07-21 15:56:21 +00:00
Brian Salomon
7e67dcaea6 Rename GrMipMapped GrMipmapped
Change-Id: Ia2cfbca8982b57399b6681cbb4501c2933ab4df7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304576
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-07-21 14:06:35 +00:00
Robert Phillips
4e105e2e06 Clean up GrContext references in the src/gpu
This CL tries to remove all uses of GrContext - replacing them with
either GrDirectContext or GrRecordingContext. Preferring the recording
context wherever possible.

Change-Id: I61af94928aa37bc82ff9923acffd57586610f695
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302904
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-07-16 14:14:08 +00:00
Brian Osman
12c5d29ba6 In FPs, store pointers for all child slots, even nullptr
This simplifies things like ConstantOutputForConstantInput and
invokeChild. It also removes the need for child indices: generated
FPs now directly refer to their children by slot number.

Change-Id: I69bbb042d5d72d21b999256f969c467702d0774d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302436
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-07-14 15:43:56 +00:00
Brian Salomon
ffd15eafd9 Remove unused base class GrGLSLFragmentBuilder
defines one method that is never used.

Change-Id: If8522c5f1ac7447b0d5584e76cdbd2f7d127036b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300259
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
2020-07-06 20:03:33 +00:00
Robert Phillips
6d344c3069 Update unit tests to accept GrDirectContext
This CL makes it explicit that the unit tests always get a direct context.

It is mainly a mechanical CL.

Change-Id: I49e0628851d9c81eb47386ef978edf905c6469d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299866
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-06 15:45:12 +00:00
John Stiles
5c57e88d8f Redesign GrXfermodeFragmentProcessor to use one FP instead of two.
Previously, we had separate "ComposeOne" and "ComposeTwo" fragment
processors. These performed extremely similar roles, but varied in
the number of child FPs used, and treatment of the input color's alpha
channel.

This CL combines these two FPs into a single unified "Compose" fragment
processor. To avoid breaking many existing GMs, the semantics of the
prior FPs have been preserved as closely as possible. (Specifically, the
FP treads very carefully to ensure that the alpha channel handling
matches the old code, as dozens of GMs fail otherwise.)

Change-Id: I7ab453f3313e70ae25e5e70f86373a64ff02072f
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299703
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-06-30 18:44:57 +00:00
Michael Ludwig
9aba625ec3 Move setSampleMatrix and setSampledWithExplicitCoords into child registration
Bug: skia:10396
Change-Id: I0c117ab4d95737b76dec5bce16103b9058218fb8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297065
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-06-22 21:20:20 +00:00
Greg Daniel
9efe386978 Add SkSurface flush call that takes a GrBackendSurfaceMutableState.
This new api will eventually replace the version that takes an

SkSurface::BackendAccess.
Change-Id: I48cd013725e14027f386b0b111223459944ac44a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295567
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-06-12 20:40:54 +00:00
Greg Daniel
e8d3ccadfe Remove GrPrepareForExternalIORequests from flush.
Now that we have the GrContext setBackendTextureState calls we no longer
need these to be on flush.

Bug: skia:10254
Change-Id: I7c44667a327de11dd853e3e71b114959a7bcee86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295447
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-06-10 20:00:20 +00:00
Brian Salomon
b0aab2c7d1 Reland "Revert "Revert "GrDisplacementEffect uses GrTextureEffect."""
This is a reland of 16abfa5e42

Original change's description:
> Revert "Revert "GrDisplacementEffect uses GrTextureEffect.""
> 
> Also further limits the number of FP stages on ANGLE D3D9 to avoid
> varying limit.
> 
> This reverts commit 0b406736c1.
> 
> Bug: skia:10139
> 
> Change-Id: Ifda0b932ab8ce176f1a1cd1ca9c2deaf1fda20bd
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284048
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: skia:10139
Change-Id: I542506a87fadeeb54e2f749b199806d2155c6cab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284230
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-04-17 20:19:48 +00:00
Brian Salomon
f49debf07d Fix two GrProcessor names that are not valid idenitfiers
Change-Id: I123caca8649097316f52f6fb0aed2e6ed0d5090a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284256
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-04-17 15:08:12 +00:00
Kevin Lubick
1bf127479c Reland "Revert "GrDisplacementEffect uses GrTextureEffect.""
This reverts commit 16abfa5e42.

Reason for revert: Appears to have made ANGLE and ios unhappy

Original change's description:
> Revert "Revert "GrDisplacementEffect uses GrTextureEffect.""
> 
> Also further limits the number of FP stages on ANGLE D3D9 to avoid
> varying limit.
> 
> This reverts commit 0b406736c1.
> 
> Bug: skia:10139
> 
> Change-Id: Ifda0b932ab8ce176f1a1cd1ca9c2deaf1fda20bd
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284048
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: I0e4b135a59f713342bf5c6c258779975762ccd1f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10139
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284217
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2020-04-17 11:51:47 +00:00
Brian Salomon
16abfa5e42 Revert "Revert "GrDisplacementEffect uses GrTextureEffect.""
Also further limits the number of FP stages on ANGLE D3D9 to avoid
varying limit.

This reverts commit 0b406736c1.

Bug: skia:10139

Change-Id: Ifda0b932ab8ce176f1a1cd1ca9c2deaf1fda20bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284048
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-04-17 00:07:38 +00:00
Greg Daniel
dabe38f611 Add submits after flushes in ProgramsTest.
This looks to be the culprit behind the failing/flaky metal bots. Not
sure what the direct cause is because it was different tests that were
failing and I would have thought we'd eventually submit at the end of
ProgramsTest when tearing things down. Maybe we just created such a
backlog of work submitted to the actual GPU that the GPU got put into
a bad state?

Bug: skia:10118
Change-Id: I318428e228e08fbcaaa12b23ad2869ecc35cc786
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283136
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-04-13 13:31:12 +00:00
Robert Phillips
e19babf996 Remove GrAtlasManager.h from all other .h files
Having GrAtlasManager.h in GrContextPriv.h was needlessly propagating dependence on that header.

Change-Id: Idf5836f1e217ecd2da91f751b488a63a884c02ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281739
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-04-07 12:43:46 +00:00
Ethan Nicholas
7c75226854 Renamed the various 'stage' shader functions to have the actual effect name
This is purely to make debugging easier, as the shaders now make more sense
to read.

Change-Id: Ie8e9b9d36112fda3ff997d088955de5a0e2c787a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281017
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-04-01 19:07:04 +00:00
Brian Salomon
df1bd6dd0a Remove texture swizzle from GrSurfaceProxy.
Bug: skia:9556


Change-Id: I2c450c51e1a0987aacebdfcf32ef76cd31f0e80b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279656
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-03-27 17:01:07 +00:00
Brian Salomon
f4ba4ec796 Revert "Revert "Revert "Revert "Don't build GL on Metal, Vulkan, Dawn, Direct3D bots""""
Updated to use sentinel GL context even when GL backend is not built.

This reverts commit 1171d314ef.

Change-Id: Ia94bbe4865ddd4e898446c13886877c539f0eb0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277976
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-20 17:11:58 +00:00
Brian Salomon
1171d314ef Revert "Revert "Revert "Don't build GL on Metal, Vulkan, Dawn, Direct3D bots"""
This reverts commit fb27c9a25f.

Revert "Remove MoltenVK support"

Reason: TSAN Vulkan bots hanging.

This reverts commit 6cafe73da9.

Change-Id: I8ec9db35c112f3c8da8636dab2065e6f18de7d0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277936
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-19 13:10:59 +00:00
Brian Salomon
fb27c9a25f Revert "Revert "Don't build GL on Metal, Vulkan, Dawn, Direct3D bots""
This reverts commit 00ba5ef4a6.

Bug: skia:10051

Change-Id: I13fd5494b7e7e64159e6330f168ab8c16a2db149
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277609
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-03-18 18:12:11 +00:00
Greg Daniel
3a36511f21 Remove origin from GrSurfaceProxy.
Bug: skia:9556
Change-Id: Ic95a3a6b11e1ff8a6f6b2f5c5aeb9037b72aae90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270840
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-14 16:52:58 +00:00
Greg Daniel
026a60ca4d Have GrProcessorTestData hold views instead of proxies.
Bug: skia:9556
Change-Id: I2e51331eaca74a6c355872cd19b725f7b3ab551e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270199
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-12 16:47:25 +00:00
Brian Salomon
a56a746b7e Remove GrSurfaceDesc
Replace with SkISize.
Also change some const SkISize& params to just SkISize.

Change-Id: I3c72d961662eefeda545fba17d63e877cd5ca813
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269374
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-02-07 19:48:13 +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
Brian Osman
978693cdaa Make invokeChild just return a string containing the child function call
Also removes several unused chunks of code that were declaring unused
variables, etc.

Change-Id: I47458736b189d59c0448c6f58b60a9b4ab046db2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266565
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-01-24 20:23:33 +00:00
Brian Osman
cddfc5e7ef Remove invokeChild variants that write to output color
Change-Id: I1788cd621704f580ff0c7d930138d463b724f314
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266556
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-01-24 15:54:22 +00:00
Greg Daniel
b58a3c7331 Remove fConfig from GrSurfaceDesc.
Bug: skia:6718
Change-Id: I586e10c828d5d0a0b3e46d8efd7400991b98d5c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265978
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-01-23 15:53:36 +00:00
Greg Daniel
47c20e81bc Pass swizzle into createProxy instead of inferring from GrPixelConfig.
This whole change is basically work that will all get reverted shortly
when GrSurfaceProxy no longer stores swizzle. But for now this helps
get rid of a use of pixel config.

Bug: skia:6718
Change-Id: If911360a8a9d2c52a58b5795386484634885b3f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265579
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-01-21 20:58:32 +00:00
Greg Daniel
e20fcad156 Reland "Move makeDeferredRenderTargetContext calls to factory on RTC."
This reverts commit a4f207eb67.

Reason for revert: Landing with fix

Original change's description:
> Revert "Move makeDeferredRenderTargetContext calls to factory on RTC."
>
> This reverts commit 1c16b43033.
>
> Reason for revert: Red on tree
> Original change's description:
> > Move makeDeferredRenderTargetContext calls to factory on RTC.
> >
> > Change-Id: Iaa8f5829d9f8650ff27a60f75fb2216f016ab85e
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262058
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com
>
> Change-Id: I9e3c9d13c66b5437c87ad7136d283fa4ac81df1f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263019
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

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

Change-Id: If4ec8316a952fb482471c22273f4724f9b30a998
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263022
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-01-08 19:13:14 +00:00