Commit Graph

1118 Commits

Author SHA1 Message Date
Robert Phillips
571177f015 Remove kLinesAdjacency and add kPath from/to GrPrimitiveType
kLinesAdjacency is no longer used while kPath has historically been left out.

Change-Id: I84be64a2e8ec79ff299a2bced73ded0be04df38e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/246307
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-10-04 19:29:23 +00:00
Brian Osman
8acfa4db53 Remove some unused functions (and an enum) from GrTypesPriv
Change-Id: I9b27c073122e615cf2db289de5607d6636658803
Bug: skia:6718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/246077
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-10-03 19:02:42 +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
Brian Salomon
dcbc359a00 Remove vestiges of 32 float texture format support
Change-Id: I186b2ea83a0c41f0ff1ecfe4163704c71ed121fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244881
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-09-27 19:40:54 +00:00
Herb Derby
cbd235c746 Introduce SkIota a wrapper that adds an index
SkIota adds an index to some collection you already use:

std::vector<int> v;
for (auto t : SkMakeIota(v)) {
   size_t i; int v;
   std::tie(i, v) = t;
   ...
}

Change-Id: I18390fc084eb8509cfaeb50d9720541759a2986d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225546
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-09-27 15:17:06 +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
a5d96bcc51 Remove "experimental" comments regarding RG_F16 and RGBA_16161616
These two formats are now exercised in the wacky_yuv_formats GM

Change-Id: I07a5649401b7928e8c4666e39793915ac1d45646
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242560
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-09-19 18:05: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 Osman
3257dda627 Fix standalone SkSL build after adding SkOnce to SkSLByteCode
Also trim includes in SkSLCompiler while I'm there

Change-Id: I87b27199b84e5e856e0a914f44368313a6f226e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242085
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-09-17 16:51:37 +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
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
Robert Phillips
e3b6fe4980 Update comparison in BackendAllocation tests
Change-Id: I11760741251b03dfb457d4b07ef3cb6a560c6f7b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240683
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-09-11 19:17:33 +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
Mike Reed
8fda88ed6d reverse/restore order of verbs in path to be forward (normal)
As part of this (clean up), also removed support for serialized-paths
older than version-4, which was introduced Feb 2018.

Change-Id: I2dc74a52bb8bdd7ea0cb2d8a78b644ca783eb31f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239102
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-09-05 21:14:08 +00:00
Chris Dalton
4ece96d76d Reland "Initiate MSAA resolves during DAG generation"
This is a reland of 804f6a0fe7

Original change's description:
> Initiate MSAA resolves during DAG generation
> 
> Adds an "fIsMSAADirty" flag to GrRenderTargetProxy and switches to
> resolving MSAA in GrTextureResolveRenderTask. This completes our push
> to resolve textures outside of render passes.
> 
> For the time being, we only store a dirty flag on the proxy and still
> rely on the GrRenderTarget itself to track the actual dirty rect. This
> will be followed by a CL that moves the dirty rect out of
> GrRenderTarget and into the proxy.
> 
> Bug: skia:
> Change-Id: I21219a58028bdb4590940210e565133093cd34b3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235672
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

Bug: skia:
Change-Id: I805b3af1404eb7919ae937cff3dfa97921e32c69
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237482
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-08-30 17:54:10 +00:00
Hal Canary
b1f411ac05 tools/skui: put all enums in a common namespace
Change-Id: Icd331e8946d80652750b8b6ea0db65f5f676ac3e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238058
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-08-29 15:39:32 +00:00
Herb Derby
30cd12e814 Track RemoteStrikes to send using pointers instead of descriptors
This reduces the number of map lookups that need to happen.

Change-Id: I068819f2576bf644a5c3550d48e69413e19179d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237217
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
2019-08-26 22:10:20 +00:00
Chris Dalton
6f31cc3882 Revert "Initiate MSAA resolves during DAG generation"
This reverts commit 804f6a0fe7.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Initiate MSAA resolves during DAG generation
> 
> Adds an "fIsMSAADirty" flag to GrRenderTargetProxy and switches to
> resolving MSAA in GrTextureResolveRenderTask. This completes our push
> to resolve textures outside of render passes.
> 
> For the time being, we only store a dirty flag on the proxy and still
> rely on the GrRenderTarget itself to track the actual dirty rect. This
> will be followed by a CL that moves the dirty rect out of
> GrRenderTarget and into the proxy.
> 
> Bug: skia:
> Change-Id: I21219a58028bdb4590940210e565133093cd34b3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235672
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: Ife557caa840edfb64cbcafc272dc3012cfb43702
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237242
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-08-26 20:18:57 +00:00
Chris Dalton
804f6a0fe7 Initiate MSAA resolves during DAG generation
Adds an "fIsMSAADirty" flag to GrRenderTargetProxy and switches to
resolving MSAA in GrTextureResolveRenderTask. This completes our push
to resolve textures outside of render passes.

For the time being, we only store a dirty flag on the proxy and still
rely on the GrRenderTarget itself to track the actual dirty rect. This
will be followed by a CL that moves the dirty rect out of
GrRenderTarget and into the proxy.

Bug: skia:
Change-Id: I21219a58028bdb4590940210e565133093cd34b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235672
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-26 18:36:53 +00:00
Greg Daniel
2d41d0d363 Remove GrGpuTextureCommandBuffer class and rename to GrOpsRenderPass.
Change-Id: Ia6e666a7bb986bb3dc769d25919580bca17b4748
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236556
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-26 15:34:14 +00:00
Greg Daniel
f41b2bd449 Reland "Merge GrOpList and GrRTOpList and rename to GrOpsTask."
This reverts commit f21bf9e50b.

Reason for revert: relanding with infra fix

Original change's description:
> Revert "Merge GrOpList and GrRTOpList and rename to GrOpsTask."
>
> This reverts commit 2a5954140b.
>
> Reason for revert: breaking everything
>
> Original change's description:
> > Merge GrOpList and GrRTOpList and rename to GrOpsTask.
> >
> > Change-Id: I8f4f2218a30fd0541a8f79f7bb9850f9500cd243
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236343
> > 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: I27840ea0343e8e6b388556afb7bd2e76386d611d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236349
> 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: Ibd3a06e4a91dbb1f225dcc8d17d0db3967b6f85f
No-Presubmit: true
No-Tree-Checks: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236350
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-08-22 20:52:09 +00:00
Greg Daniel
f21bf9e50b Revert "Merge GrOpList and GrRTOpList and rename to GrOpsTask."
This reverts commit 2a5954140b.

Reason for revert: breaking everything

Original change's description:
> Merge GrOpList and GrRTOpList and rename to GrOpsTask.
> 
> Change-Id: I8f4f2218a30fd0541a8f79f7bb9850f9500cd243
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236343
> 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: I27840ea0343e8e6b388556afb7bd2e76386d611d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236349
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-08-22 20:12:38 +00:00
Greg Daniel
2a5954140b Merge GrOpList and GrRTOpList and rename to GrOpsTask.
Change-Id: I8f4f2218a30fd0541a8f79f7bb9850f9500cd243
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236343
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-08-22 19:33:01 +00:00
Brian Salomon
57f211b56a SK_API in src/gpu cleanup
Change-Id: I14d6f7ef06c3cfcefd0813dd5013e4185b12d8cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235804
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-08-22 02:00:07 +00:00
Brian Salomon
bf6b9795f6 GrSurfaceContext not ref counted.
Also don't specify redundant width/height to SkGpuDevice.

Change-Id: I389df5c4b073c2c05632ba6b7c95b02a22dfaf98
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235824
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-08-21 15:31:23 +00:00
Ben Wagner
0b9801eadc Use void(void*) instead of decltype with sk_free.
Unfortunately, boringssl also declares a function named sk_free making
decltype give an error since the function is overloaded if both Skia and
BoringSSL headers are included in the same TU (as happens in ChromeOS
builds). In theory one can use decltype and specify which overload to
use, but this is far more verbose than just specifying the type.

Change-Id: I7dfefbce0a75c7ff6791b58287f26f2cc47c8eca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235828
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-08-20 22:28:42 +00:00
Ben Wagner
723a877d0c Make SkFunctionWrapper a better wrapper.
SkFunctionWrapper was made to be a simple abstraction over existing
resource release functions which generally follow a specific pattern of
returning void and taking a pointer to the underlying type. However,
this has been observed to be an unnecessary limit. This makes it more
generic while also making the call sites a little less brittle.

This change also uncovered an issue in msvc v19.20 to v19.22, see
https://developercommunity.visualstudio.com/content/problem/698192/in-templateusing-decltype-is-void.html
To work around this, several otherwise redundant '&' are used.

There was an attempt to take references to functions instead of pointers
to functions which greatly simplifies the intermediate wrappers.
However, that uncovered another issue in msvc, see
https://developercommunity.visualstudio.com/content/problem/699878/function-to-pointer.html

Change-Id: I54ab945ed9d9cfd0204d4d6650c2fde47cc9e175
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235105
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-08-20 20:31:36 +00:00
Greg Daniel
212dada392 Remove some unused GrPixelConfig functions.
Bug: skia:6718
Change-Id: I729eb1cff28c42fae548f0217f97b3b9fda02656
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235598
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-19 15:47:34 +00:00
Chris Dalton
3f7932e733 Add kRequiresManualMSAAResolve to GrInternalSurfaceFlags
We will use this flag to check whether a proxy needs manual msaa
resolve, and if so, install a render task to do just that when it is
dirty and about to be read from.

For the time being, we are leaving GrRenderTarget::getResovleType in
place. This will allow us to assert that requiresManualMSAAResolve
works as expected. Long term, we plan to delete the former in favor of
the latter.

Bug: skia:
Change-Id: I155fa2a6d876edd339232c7c8208015d5da2c8ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234436
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-08-19 15:04:30 +00:00
Greg Daniel
7bfc9139c6 Remove GrCaps isConfigTexturable.
This also makes the isTexturable that takes a color explicitly called
isFormatTexturableAndUploadable. A lot of the uses of isConfigTexturable
were changed to the Uploadable version of the check, even though this is
not where we want to land in the long run. In the long run the uploadability
will be checked via calls to supportedWritePixelsColorType and all the
isTexturable calls should purely be about texturing. However, until those
changes land we keep it safe and keep the same functionality that
isConfigTexturable had by checking uploadability as well.

Bug: skia:6718
Change-Id: I3563f33f49811923da80e676fa3036ae46c4da70
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234323
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-08-14 19:30:45 +00:00
Chris Dalton
3d77027d26 Reland "Initiate regeneration of mipmaps from proxy DAG land"
This is a reland of fe19203eb7

Original change's description:
> Initiate regeneration of mipmaps from proxy DAG land
> 
> This allows us to resolve all the textures before executing a command
> buffer, rather than interrupting execution as is currently done in the
> GL backend.
> 
> Change-Id: I998546b312d24cf47fc2c837e7c94fbf95571af0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230636
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

Change-Id: Ic904d0b1bcb451bcb74cfae2204fb7297eaff108
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234016
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-14 16:01:31 +00:00
Brian Salomon
67529b2543 SkSL GLSL generator writes default precision for sampler2D/samplerExternalOS/sampler2DRect
This is a stop gap. We should probably base the precision decision on the texture format.

Also removes all code used to add sampler precision to program keys. The precision that
was added to the key did not affect the generated GLSL.

Bug: skia:8863
Bug: skia:6718
Change-Id: Ibdb702e1aca5d48d83e2f24cb24010a0b7270871
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234322
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-08-14 13:29:57 +00:00
Robert Phillips
f75996469d Make defaultBackendFormat callable from anywhere in the GrContext hierarchy
This is probably overkill but yields an officially thread-safe means of calling defaultBackendFormat.

Change-Id: Ibf344acf11102d938e335e9ea38bfaee575e00c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234324
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-08-13 20:46:35 +00:00
Robert Phillips
3e7fa79f2c Revert "Initiate regeneration of mipmaps from proxy DAG land"
This reverts commit fe19203eb7.

Reason for revert: Turned a lot of bots red

Original change's description:
> Initiate regeneration of mipmaps from proxy DAG land
> 
> This allows us to resolve all the textures before executing a command
> buffer, rather than interrupting execution as is currently done in the
> GL backend.
> 
> Change-Id: I998546b312d24cf47fc2c837e7c94fbf95571af0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230636
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com

Change-Id: Iaa8391b8fbd5a4f851ca41834c1dfeee4be6fedd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233836
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-08-10 13:00:33 +00:00
Chris Dalton
fe19203eb7 Initiate regeneration of mipmaps from proxy DAG land
This allows us to resolve all the textures before executing a command
buffer, rather than interrupting execution as is currently done in the
GL backend.

Change-Id: I998546b312d24cf47fc2c837e7c94fbf95571af0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230636
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-10 00:39:50 +00:00
Brian Salomon
74c19de3be Add SkUNREACHABLE to definition of SK_ABORT.
Remove return statements immediately following SK_ABORTs.

Change-Id: I6446b6ba3a6fb272d84ea27f38cf366095cf801d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233565
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-08-09 20:43:39 +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
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
Hal Canary
bcfed55a8c experimental/editor: mouse drag select, modifierkeys cleanup.
Change-Id: I8c8de54ad6309424bdf18987ccf3eac6bdd41c19
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233080
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-08-08 02:33:44 +00:00
Ben Wagner
549476357c Mark SkBitmaskEnum operators constexpr.
Change-Id: I498beee590ff7728f4d49da28d9a2b9909409c48
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232763
Reviewed-by: Hal Canary <halcanary@skia.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-08-07 14:32:10 +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
Chris Dalton
6b49810f98 Extract a GrRenderTask base class from GrOpList
This is a more abstract representation of something that can
participate in the DAG by modifying a GrSurfaceProxy's pixels. This
will serve as the direct base class for future DAG participants that
aren't opLists, and help to eventually remove GrTextureOpList.

Bug: skia:
Change-Id: Ia903c0188e0f6a6602781b90ee8da87ba3cc13f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231277
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-08-02 16:56:09 +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
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
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
Stephen White
ff5d7a2f90 Implement separate sampler and textures in SkSL.
Dawn doesn't support old-style combined texturesampler uniforms, so
they must be expressed as separate samplers and texture uniforms.

At the SkSL Type level, I've added a Texture2D type, and expressed
the Sampler2D (combined) type in terms of it. This ensures that we
emit only a single OpTypeImage for it in the SPIRV.

Eventually, all of the Texture types (1D, 3D, Rect) could be defined
and SamplerX could simply contain a reference to TextureX. I wanted to
float this idea with a single example for now (and since it's all that
the Dawn backend needs).

This also required adding a new "makeSampler2D" function to combine
them, which maps to OpSampledImage at the SPIR-V level.

Change-Id: Iaf33a6e7d339da415be6ea9a017340cb0ef3c1eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229417
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2019-07-26 22:09:50 +00:00
Brian Salomon
b28cb68bc0 Make GrColorTypeBytesPerPixel return size_t.
Change-Id: I4ce55c3870290cc7053db5eeb3eb4e29337f06a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229977
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-07-26 17:50:32 +00:00