Commit Graph

2557 Commits

Author SHA1 Message Date
Brian Salomon
34a2030d0a Remove window rects flag from GrInternalSurfaceFlags.
This flag is annoying to set correctly when writing test code.
Fortunately it has become redundant with the "is GL FBO 0" flag.

Change-Id: Ifd88292d2d6ea05bfe0d269e853baff857e70bfe
Reviewed-on: https://skia-review.googlesource.com/c/178929
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-12-18 18:17:03 +00:00
Herb Derby
880979f32c Fix 64-bit truncate warning
BUG=chromium:910360

Change-Id: Ibd353d851626cca1b44bcfe38de5039a772bc6f0
Reviewed-on: https://skia-review.googlesource.com/c/178284
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-12-18 01:11:02 +00:00
Brian Salomon
f391d0f771 Reduce the number of backend->pixelconfig GrCaps virtuals.
Moves method to get GrBackendFormat from GrBackendTexture from GrCaps
to GrBackendTexture so that a GrContext is not required.

Uses kUnknown_GrPixelConfig as failure return from GrCaps functions
rather than an GrPixelConfig* out param and bool result.

Having the texture type be part of GrBackendFormat made removing the
GrCaps function that goes from GrBackendRenderTarget to GrPixelConfig
awkward so that was left alone for now.

Change-Id: If9be0f898c538be4a7b24022b6011f63441a0317
Reviewed-on: https://skia-review.googlesource.com/c/175991
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-12-14 17:12:36 +00:00
Ethan Nicholas
8e265a7520 Re-land "Perform Vulkan resets in a background thread"
Bug: skia:
Change-Id: I1c7ec365a370137ca64d9091cb60e6430c3f1c28
Reviewed-on: https://skia-review.googlesource.com/c/177069
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-12-13 20:24:22 +00:00
Greg Daniel
54200e4025 Move vulkan headers from third_party to include/third_party.
Bug: skia:
Change-Id: I7174c6da075c0fd3d6238a5556439f42d6b97659
Reviewed-on: https://skia-review.googlesource.com/c/176680
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-12-12 14:16:43 +00:00
Brian Salomon
9f7d9a2776 Revert "Move some Gr headers from include/gpu to include/private and src/gpu."
This reverts commit 3bdc3f5f9c.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Move some Gr headers from include/gpu to include/private and src/gpu.
> 
> Bug: skia:
> Change-Id: I341dd3bff63cc99d3be830e21673073645a9cfec
> Reviewed-on: https://skia-review.googlesource.com/c/176220
> Auto-Submit: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: Ia7082f66abb969b20dd5d1f12c3c8d09cd84c241
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/176587
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-12-11 19:01:41 +00:00
Brian Salomon
3bdc3f5f9c Move some Gr headers from include/gpu to include/private and src/gpu.
Bug: skia:
Change-Id: I341dd3bff63cc99d3be830e21673073645a9cfec
Reviewed-on: https://skia-review.googlesource.com/c/176220
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-12-11 15:23:48 +00:00
Brian Salomon
3ccaa88c50 Add SK_API to GrTexture.
Sadly, we still expose this Chrome.

Bug: chromium:911856
Change-Id: Ib266eb1a338db621385cd75dbba6e709dd01587c
Reviewed-on: https://skia-review.googlesource.com/c/175999
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
2018-12-10 19:32:08 +00:00
Michael Ludwig
f23a152715 Reland "Add clamp to border wrap mode to gpu"
This reverts commit 8137f3c862.

Reason for revert: update GrCaps clampToBorder for iOS and Mac 10.11

Original change's description:
> Revert "Add clamp to border wrap mode to gpu"
>
> This reverts commit f49a5785f3.
>
> Reason for revert: clamp-to-border in metal not available on iOS
>
> Original change's description:
> > Add clamp to border wrap mode to gpu
> >
> > Bug: skia:
> > Change-Id: I286163cdea4fa8f7e6a876baaa11aa3dacd4f2ff
> > Reviewed-on: https://skia-review.googlesource.com/c/175244
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,ethannicholas@google.com,michaelludwig@google.com
>
> Change-Id: I01ef28d9c2fbf6c6dcd82d9aac193ff102d60151
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/c/175988
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

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

Change-Id: I37467eb096fec28131587aefe340f0485fca59d4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/175989
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2018-12-10 16:59:37 +00:00
Michael Ludwig
8137f3c862 Revert "Add clamp to border wrap mode to gpu"
This reverts commit f49a5785f3.

Reason for revert: clamp-to-border in metal not available on iOS

Original change's description:
> Add clamp to border wrap mode to gpu
> 
> Bug: skia:
> Change-Id: I286163cdea4fa8f7e6a876baaa11aa3dacd4f2ff
> Reviewed-on: https://skia-review.googlesource.com/c/175244
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

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

Change-Id: I01ef28d9c2fbf6c6dcd82d9aac193ff102d60151
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/175988
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2018-12-10 15:14:48 +00:00
Brian Salomon
0a7e58f4c9 Add glTexParameterf[v] to GrGLInterface
Change-Id: Icd1f2a84f76cedfdb9dfd358e57e0fbc6cae49cb
Reviewed-on: https://skia-review.googlesource.com/c/175828
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
2018-12-10 14:50:23 +00:00
Michael Ludwig
f49a5785f3 Add clamp to border wrap mode to gpu
Bug: skia:
Change-Id: I286163cdea4fa8f7e6a876baaa11aa3dacd4f2ff
Reviewed-on: https://skia-review.googlesource.com/c/175244
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2018-12-10 14:45:48 +00:00
Brian Osman
f5bbf66eb4 Finish removing sample shading support
Chrome's initialization of the function pointer is gone:
https://chromium-review.googlesource.com/c/chromium/src/+/1366758

Bug: skia:
Change-Id: I025db12fbf8cfbcaee580b3494bd56e41b8fd325
Reviewed-on: https://skia-review.googlesource.com/c/175982
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-12-10 14:28:19 +00:00
Greg Daniel
d207345456 Add cap to number of oplists we execute before flushing to the gpu.
This fixes a crash we saw when we switch vulkan copies as draws to creating
their own secondary command buffer. The crash came from the perf blendmode
tests when using an advanced blend mode. They would do 1000 draws which forced
us into creating 2000 command buffers (since the dst copies and the normal draws
each used them). I tested without the copies as draws change and just increasing
the total number of draws we do and was able to repro the crash.

Besides fixing the above OOM crash, I am also seeing a 5-10% perf gain on the
blendmode micro benches which is nice

Bug: skia:
Change-Id: I9266ea0ba02a755f54dabd4ee804963ab0c9b684
Reviewed-on: https://skia-review.googlesource.com/c/175436
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-12-07 17:57:07 +00:00
Brian Osman
a63593a10c Remove sample shading and dest color override
Both of these features are unused (though Chrome still installs a GL
function in the interface, so the function pointer needs to stick around
until that's removed).

Bug: skia:
Change-Id: Id061e83042b0dd5f583a850de182c29cd27fab1f
Reviewed-on: https://skia-review.googlesource.com/c/175423
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-12-07 15:46:12 +00:00
Brian Salomon
c67c31ced1 Revert "Revert "Mark wrapped textures imported into SkImages as "read only".""
This reverts commit ff4ccaa9fc.

Bug: skia:8509
Change-Id: If4a059d6e6e412ec1d6be2c70663d59c362e91d2
Reviewed-on: https://skia-review.googlesource.com/c/175249
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-12-06 15:34:31 +00:00
Brian Salomon
ff4ccaa9fc Revert "Mark wrapped textures imported into SkImages as "read only"."
This reverts commit 796693af3c.

Reason for revert: texture flags assertion in DDL config

Original change's description:
> Mark wrapped textures imported into SkImages as "read only".
> 
> Read only textures and proxies fail writePixels, as copy dsts, and mip
> regeneration.
> 
> Bug: skia:8509
> 
> Change-Id: Iaa0b473cc9a9930fde3ef0e91373d5040650de35
> Reviewed-on: https://skia-review.googlesource.com/c/174316
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: If5cb36e83795656185ff8d26e4ef2c52a2695a09
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8509
Reviewed-on: https://skia-review.googlesource.com/c/174846
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-12-05 21:35:40 +00:00
Brian Salomon
796693af3c Mark wrapped textures imported into SkImages as "read only".
Read only textures and proxies fail writePixels, as copy dsts, and mip
regeneration.

Bug: skia:8509

Change-Id: Iaa0b473cc9a9930fde3ef0e91373d5040650de35
Reviewed-on: https://skia-review.googlesource.com/c/174316
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-12-05 20:12:42 +00:00
Greg Daniel
b353eeb716 Remove duplicate member of GrVkDrawableInfo struct.
Bug: skia:
Change-Id: I81a38f9920f89f4749fc58458b85a29714cec7a9
Reviewed-on: https://skia-review.googlesource.com/c/174584
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-12-05 18:20:28 +00:00
Greg Daniel
45723ac931 Take into accout the GrBackendFormat when deciding if we can chain textures together.
Bug: skia:
Change-Id: I8c26bed1bb18318f96d248c227e3b33b190d2a05
Reviewed-on: https://skia-review.googlesource.com/c/173320
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-12-03 16:54:40 +00:00
Greg Daniel
7e000220c3 Reland "Add support for Ycbcr Conversion Samplers in vulkan."
This is a reland of 6cd74900da

Original change's description:
> Add support for Ycbcr Conversion Samplers in vulkan.
> 
> The only thing missing from this CL is that we need to bake the
> ycbcr conversion samplers into the VkPipeline when we create it. As that
> is a larger change, that will be broken up into a few follow on CLs.
> 
> Currently this only supports ycbcr conversion samplers when used with
> external textures.
> 
> Bug: skia:
> Change-Id: I23e95b19469093072589ebbbfb7926ab79dcdea9
> Reviewed-on: https://skia-review.googlesource.com/c/164602
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

Bug: skia:
Change-Id: I943398077775ef6396fbe5cb9196d23a29128669
Reviewed-on: https://skia-review.googlesource.com/c/173986
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-12-03 16:16:55 +00:00
Greg Daniel
f4bf973592 Revert "Add support for Ycbcr Conversion Samplers in vulkan."
This reverts commit 6cd74900da.

Reason for revert: breaking win vulkan bots

Original change's description:
> Add support for Ycbcr Conversion Samplers in vulkan.
> 
> The only thing missing from this CL is that we need to bake the
> ycbcr conversion samplers into the VkPipeline when we create it. As that
> is a larger change, that will be broken up into a few follow on CLs.
> 
> Currently this only supports ycbcr conversion samplers when used with
> external textures.
> 
> Bug: skia:
> Change-Id: I23e95b19469093072589ebbbfb7926ab79dcdea9
> Reviewed-on: https://skia-review.googlesource.com/c/164602
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ib56905821cbfd40cf30ec89269b551ce01605a1a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/173982
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-12-03 14:34:45 +00:00
Greg Daniel
6cd74900da Add support for Ycbcr Conversion Samplers in vulkan.
The only thing missing from this CL is that we need to bake the
ycbcr conversion samplers into the VkPipeline when we create it. As that
is a larger change, that will be broken up into a few follow on CLs.

Currently this only supports ycbcr conversion samplers when used with
external textures.

Bug: skia:
Change-Id: I23e95b19469093072589ebbbfb7926ab79dcdea9
Reviewed-on: https://skia-review.googlesource.com/c/164602
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-12-03 14:13:42 +00:00
Brian Salomon
2335644771 Fix occurrences of "-Wextra-semi-stmt"
Docs-Preview: https://skia.org/?cl=173761
Change-Id: Iefdb91cd28eabb4b01b7b42a4f300b0b4caf05d9
Reviewed-on: https://skia-review.googlesource.com/c/173761
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-11-30 23:23:09 +00:00
Greg Daniel
54bfb18dad Privately include our version of vulkan header file in all our src files.
This should allow clients to include Skia and their vulkan files in any
order. However, it does require that when clients are building their
files that include skia with vulkan, they must have vulkan/vulkan_core.h
on their include path somewhere.

Bug: skia:
Change-Id: I969db396c92127be7c8df754926d175f38b8aafa
Reviewed-on: https://skia-review.googlesource.com/c/172147
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-11-26 15:15:44 +00:00
Greg Daniel
4065d45d2d Reland "Reland "Have a GrBackendFormat be stored on gpu proxies.""
This is a reland of 2f9a5ea639

Original change's description:
> Reland "Have a GrBackendFormat be stored on gpu proxies."
> 
> This reverts commit 919c9e77c3.
> 
> Reason for revert: Flutter change has landed and fixed memory issue.
> 
> Original change's description:
> > Revert "Have a GrBackendFormat be stored on gpu proxies."
> >
> > This reverts commit 51b1c12bbc.
> >
> > Reason for revert: reverting till flutter gets to 1.1 to fix build issues.
> >
> > Original change's description:
> > > Have a GrBackendFormat be stored on gpu proxies.
> > >
> > > Bug: skia:
> > > Change-Id: Iaf1fb24ab29a61d44e5fa59a5e0867ed02dcda90
> > > Reviewed-on: https://skia-review.googlesource.com/c/168021
> > > Reviewed-by: Brian Osman <brianosman@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> >
> > TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com
> >
> > Change-Id: I574fdc084ef5994596c51fb0d60423b5dc01b885
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: chromium:903701 chromium:903756
> > Reviewed-on: https://skia-review.googlesource.com/c/169835
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com
> 
> Change-Id: Ifd9b6b8e194af9fb9258fa626644e76e6ecf090d
> Bug: chromium:903701 chromium:903756
> Reviewed-on: https://skia-review.googlesource.com/c/170104
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Bug: chromium:903701 chromium:903756
Change-Id: Id1360067d8e928b0a4e1848dae8bc1e7f1994403
Reviewed-on: https://skia-review.googlesource.com/c/171660
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-11-19 18:51:07 +00:00
Greg Daniel
2268ad23fe Add flag to force purge resources from cache as soon as possible.
Bug: skia:
Change-Id: Ibd636b9e1bf932033c3161c862523f841cb85e79
Reviewed-on: https://skia-review.googlesource.com/c/171005
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-11-15 16:45:30 +00:00
Greg Daniel
d7157b2ccf Revert "Reland "Have a GrBackendFormat be stored on gpu proxies.""
This reverts commit 2f9a5ea639.

Reason for revert: breaking fuchsia

Original change's description:
> Reland "Have a GrBackendFormat be stored on gpu proxies."
> 
> This reverts commit 919c9e77c3.
> 
> Reason for revert: Flutter change has landed and fixed memory issue.
> 
> Original change's description:
> > Revert "Have a GrBackendFormat be stored on gpu proxies."
> >
> > This reverts commit 51b1c12bbc.
> >
> > Reason for revert: reverting till flutter gets to 1.1 to fix build issues.
> >
> > Original change's description:
> > > Have a GrBackendFormat be stored on gpu proxies.
> > >
> > > Bug: skia:
> > > Change-Id: Iaf1fb24ab29a61d44e5fa59a5e0867ed02dcda90
> > > Reviewed-on: https://skia-review.googlesource.com/c/168021
> > > Reviewed-by: Brian Osman <brianosman@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> >
> > TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com
> >
> > Change-Id: I574fdc084ef5994596c51fb0d60423b5dc01b885
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: chromium:903701 chromium:903756
> > Reviewed-on: https://skia-review.googlesource.com/c/169835
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com
> 
> Change-Id: Ifd9b6b8e194af9fb9258fa626644e76e6ecf090d
> Bug: chromium:903701 chromium:903756
> Reviewed-on: https://skia-review.googlesource.com/c/170104
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: Ia0556355e5775b2100901b7bfa37f97bb6ccd90f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:903701 chromium:903756
Reviewed-on: https://skia-review.googlesource.com/c/171002
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-11-14 15:28:15 +00:00
Greg Daniel
2f9a5ea639 Reland "Have a GrBackendFormat be stored on gpu proxies."
This reverts commit 919c9e77c3.

Reason for revert: Flutter change has landed and fixed memory issue.

Original change's description:
> Revert "Have a GrBackendFormat be stored on gpu proxies."
>
> This reverts commit 51b1c12bbc.
>
> Reason for revert: reverting till flutter gets to 1.1 to fix build issues.
>
> Original change's description:
> > Have a GrBackendFormat be stored on gpu proxies.
> >
> > Bug: skia:
> > Change-Id: Iaf1fb24ab29a61d44e5fa59a5e0867ed02dcda90
> > Reviewed-on: https://skia-review.googlesource.com/c/168021
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com
>
> Change-Id: I574fdc084ef5994596c51fb0d60423b5dc01b885
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:903701 chromium:903756
> Reviewed-on: https://skia-review.googlesource.com/c/169835
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ifd9b6b8e194af9fb9258fa626644e76e6ecf090d
Bug: chromium:903701 chromium:903756
Reviewed-on: https://skia-review.googlesource.com/c/170104
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-11-14 14:52:44 +00:00
Brian Osman
66af080a16 Remove obsolete SK_IGNORE_ defines
In chronological order:

SK_IGNORE_THIN_STROKED_RECT_FIX   : https://codereview.chromium.org/18317003/
SK_IGNORE_64BIT_OPENGL_CHANGES    : https://codereview.chromium.org/118533003/
SK_IGNORE_FAST_RRECT_BLUR         : https://codereview.chromium.org/189663012/
SK_IGNORE_MATRIX_IMAGE_FILTER_FIX : https://skia-review.googlesource.com/c/skia/+/127125/

Bug: skia:
Change-Id: I082ee9b0636f8523476b0271677f46b274f1ce97
Reviewed-on: https://skia-review.googlesource.com/c/170721
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-11-13 15:38:03 +00:00
Greg Daniel
e5178243d0 Require vulkan 1.1 headers when compiling skia.
Bug: skia:
Change-Id: Ibfda62cbdc3d78fc2a3b08ff07866c1ee501de7a
Reviewed-on: https://skia-review.googlesource.com/c/163223
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-11-12 14:48:47 +00:00
Greg Daniel
919c9e77c3 Revert "Have a GrBackendFormat be stored on gpu proxies."
This reverts commit 51b1c12bbc.

Reason for revert: reverting till flutter gets to 1.1 to fix build issues.

Original change's description:
> Have a GrBackendFormat be stored on gpu proxies.
>
> Bug: skia:
> Change-Id: Iaf1fb24ab29a61d44e5fa59a5e0867ed02dcda90
> Reviewed-on: https://skia-review.googlesource.com/c/168021
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: I574fdc084ef5994596c51fb0d60423b5dc01b885
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:903701 chromium:903756
Reviewed-on: https://skia-review.googlesource.com/c/169835
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-11-09 15:33:23 +00:00
Greg Daniel
51b1c12bbc Have a GrBackendFormat be stored on gpu proxies.
Bug: skia:
Change-Id: Iaf1fb24ab29a61d44e5fa59a5e0867ed02dcda90
Reviewed-on: https://skia-review.googlesource.com/c/168021
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-11-08 19:44:55 +00:00
Mike Klein
3674336c33 Reland "make enum santizer fatal"
This is a reland of 166dbd3135

Since last attempt,
   - update SkPath::Direction docs
   - kIllegal is not an advanced blend mode

Original change's description:
> make enum santizer fatal
>
> This enum sanitizer checks that all the values of the enum we use fall
> within the range of the enumerated values.
>
> The main thing this helps point out is that the size of enum types in
> C++ need only be large enough to hold the largest declared value; larger
> values are undefined.  In practice, most enums are implemented as ints
> for compatibility with C, so while this hasn't pointed out anything
> egregiously broken, the sanitizer has found a couple possibly dangerous
> situations in our codebase.
>
> For most types using values outside the enum range, we can just
> explicitly size them to int.  This makes their de facto size de jure.
>
> But we need to actually make GrBlendEquation and GrBlendCoeff not store
> values outside their enumerated range.  They're packed into bitfields
> that really can't represent those (negative) values.  So for these I've
> added new kIllegal values to the enums, forcing us to deal with our
> once-silent illegal values a bit more explicitly.
>
> Change-Id: Ib617694cf1aaa83ae99289e9e760f49cb6393a2f
> Reviewed-on: https://skia-review.googlesource.com/c/168484
> Reviewed-by: Brian Osman <brianosman@google.com>

Cq-Include-Trybots: skia.primary:Housekeeper-PerCommit-Bookmaker,Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Debug-All-Android
Change-Id: Id93b80bbeae11872542c9b76715e3c3cb10609fd
Reviewed-on: https://skia-review.googlesource.com/c/168582
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-11-06 17:31:00 +00:00
Mike Klein
f2b35e4fb8 Revert "make enum santizer fatal"
This reverts commit 166dbd3135.

Reason for revert: illegal is not advanced, docs

Original change's description:
> make enum santizer fatal
> 
> This enum sanitizer checks that all the values of the enum we use fall
> within the range of the enumerated values.
> 
> The main thing this helps point out is that the size of enum types in
> C++ need only be large enough to hold the largest declared value; larger
> values are undefined.  In practice, most enums are implemented as ints
> for compatibility with C, so while this hasn't pointed out anything
> egregiously broken, the sanitizer has found a couple possibly dangerous
> situations in our codebase.
> 
> For most types using values outside the enum range, we can just
> explicitly size them to int.  This makes their de facto size de jure.
> 
> But we need to actually make GrBlendEquation and GrBlendCoeff not store
> values outside their enumerated range.  They're packed into bitfields
> that really can't represent those (negative) values.  So for these I've
> added new kIllegal values to the enums, forcing us to deal with our
> once-silent illegal values a bit more explicitly.
> 
> Change-Id: Ib617694cf1aaa83ae99289e9e760f49cb6393a2f
> Reviewed-on: https://skia-review.googlesource.com/c/168484
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=mtklein@chromium.org,mtklein@google.com,brianosman@google.com

Change-Id: I691c08092340a6273e442c0f098b844f7d0363ba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/168581
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-11-06 16:30:19 +00:00
Mike Klein
166dbd3135 make enum santizer fatal
This enum sanitizer checks that all the values of the enum we use fall
within the range of the enumerated values.

The main thing this helps point out is that the size of enum types in
C++ need only be large enough to hold the largest declared value; larger
values are undefined.  In practice, most enums are implemented as ints
for compatibility with C, so while this hasn't pointed out anything
egregiously broken, the sanitizer has found a couple possibly dangerous
situations in our codebase.

For most types using values outside the enum range, we can just
explicitly size them to int.  This makes their de facto size de jure.

But we need to actually make GrBlendEquation and GrBlendCoeff not store
values outside their enumerated range.  They're packed into bitfields
that really can't represent those (negative) values.  So for these I've
added new kIllegal values to the enums, forcing us to deal with our
once-silent illegal values a bit more explicitly.

Change-Id: Ib617694cf1aaa83ae99289e9e760f49cb6393a2f
Reviewed-on: https://skia-review.googlesource.com/c/168484
Reviewed-by: Brian Osman <brianosman@google.com>
2018-11-06 15:39:50 +00:00
Brian Salomon
dc82994e3a Revert "Reland "Reland "Revert "Use OpenGL sampler objects when available.""""
This reverts commit 327955b1ba.

Bug: skia:8471
Change-Id: I56eb9509f0e2d5c4aa9e2a110a73a09723f77c4a
Reviewed-on: https://skia-review.googlesource.com/c/164617
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-10-24 12:43:42 +00:00
Brian Salomon
327955b1ba Reland "Reland "Revert "Use OpenGL sampler objects when available."""
This reverts commit bfb3df4cc0.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Reland "Revert "Use OpenGL sampler objects when available."""
> 
> This reverts commit bffe4ed34b.
> 
> Reason for revert: <INSERT REASONING HERE>
> 
> Original change's description:
> > Reland "Revert "Use OpenGL sampler objects when available.""
> >
> > This reverts commit d46987bb74.
> >
> > Reason for revert: breaking asan bot in chrome roll
> >
> > Original change's description:
> > > Revert "Revert "Use OpenGL sampler objects when available.""
> > >
> > > Put setting GL min/max texture lod behind caps check.
> > >
> > > Bug: skia:8471
> > >
> > >
> > > This reverts commit 1bccae517a.
> > >
> > > Change-Id: I8b98df6578a678bbb8b283d8203621a992be4ede
> > > Reviewed-on: https://skia-review.googlesource.com/c/163782
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > Commit-Queue: Brian Salomon <bsalomon@google.com>
> >
> > TBR=bsalomon@google.com
> >
> > Change-Id: I8e3a0daea12659721d95967ef94c87f856e21948
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: skia:8471
> > Reviewed-on: https://skia-review.googlesource.com/c/163887
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com
> 
> Change-Id: Ia35bb7ad13527ffbd04173b517f7399e4a486ff1
> Bug: skia:8471
> Reviewed-on: https://skia-review.googlesource.com/c/163891
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ie49071bef7f7c20f0b116cd3a7abfda84728de12
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8471
Reviewed-on: https://skia-review.googlesource.com/c/164241
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-10-22 15:39:26 +00:00
Brian Salomon
bfb3df4cc0 Revert "Reland "Revert "Use OpenGL sampler objects when available."""
This reverts commit bffe4ed34b.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Reland "Revert "Use OpenGL sampler objects when available.""
>
> This reverts commit d46987bb74.
>
> Reason for revert: breaking asan bot in chrome roll
>
> Original change's description:
> > Revert "Revert "Use OpenGL sampler objects when available.""
> >
> > Put setting GL min/max texture lod behind caps check.
> >
> > Bug: skia:8471
> >
> >
> > This reverts commit 1bccae517a.
> >
> > Change-Id: I8b98df6578a678bbb8b283d8203621a992be4ede
> > Reviewed-on: https://skia-review.googlesource.com/c/163782
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com
>
> Change-Id: I8e3a0daea12659721d95967ef94c87f856e21948
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:8471
> Reviewed-on: https://skia-review.googlesource.com/c/163887
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ia35bb7ad13527ffbd04173b517f7399e4a486ff1
Bug: skia:8471
Reviewed-on: https://skia-review.googlesource.com/c/163891
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-10-22 14:12:21 +00:00
Greg Daniel
bffe4ed34b Reland "Revert "Use OpenGL sampler objects when available.""
This reverts commit d46987bb74.

Reason for revert: breaking asan bot in chrome roll

Original change's description:
> Revert "Revert "Use OpenGL sampler objects when available.""
> 
> Put setting GL min/max texture lod behind caps check.
> 
> Bug: skia:8471
> 
> 
> This reverts commit 1bccae517a.
> 
> Change-Id: I8b98df6578a678bbb8b283d8203621a992be4ede
> Reviewed-on: https://skia-review.googlesource.com/c/163782
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com

Change-Id: I8e3a0daea12659721d95967ef94c87f856e21948
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8471
Reviewed-on: https://skia-review.googlesource.com/c/163887
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-10-19 17:58:47 +00:00
Greg Daniel
9ed1a2cd71 Add ability for an SkDevice to handle the drawing of an SkDrawable.
If supported, an Sk*Device can take charge of handling of an SkDrawable.
The specific use case right now will be to use this to execute Vulkan
specific SkDrawable's that need to know information about our Vulkan state
and objects at the time the SkDrawable is executed. If a device does not
support the SkDrawable we fall back to the cavans version like we did
previously.

BUG=skia:

Change-Id: I821fa600a80ff645412f296be36990ef390ae0a9
Reviewed-on: https://skia-review.googlesource.com/c/7740
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-10-19 15:21:54 +00:00
Brian Salomon
d46987bb74 Revert "Revert "Use OpenGL sampler objects when available.""
Put setting GL min/max texture lod behind caps check.

Bug: skia:8471


This reverts commit 1bccae517a.

Change-Id: I8b98df6578a678bbb8b283d8203621a992be4ede
Reviewed-on: https://skia-review.googlesource.com/c/163782
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-10-19 14:47:41 +00:00
Mike Klein
1bccae517a Revert "Use OpenGL sampler objects when available."
This reverts commit 0f7e55a818.

Reason for revert: Chrome roll, even alone (https://chromium-review.googlesource.com/c/chromium/src/+/1290785), maybe Android roll too?

Original change's description:
> Use OpenGL sampler objects when available.
> 
> Bug: skia:8471
> Change-Id: Ida3d08aa72772b8bbd08707048182bee5d27407c
> Reviewed-on: https://skia-review.googlesource.com/c/163123
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: Ieee6823e83b9992a7281806b5a9156cd91fb22b9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8471
Reviewed-on: https://skia-review.googlesource.com/c/163780
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-19 11:38:50 +00:00
Brian Salomon
0f7e55a818 Use OpenGL sampler objects when available.
Bug: skia:8471
Change-Id: Ida3d08aa72772b8bbd08707048182bee5d27407c
Reviewed-on: https://skia-review.googlesource.com/c/163123
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-10-19 01:38:56 +00:00
Chris Dalton
9a986cfd5f ccpr: Use SkMessageBus for thread-safe eviction of cache entries
Bug: skia:
Change-Id: I87725b95761deb689333315ce681a4968d98190a
Reviewed-on: https://skia-review.googlesource.com/c/163511
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-10-19 00:25:20 +00:00
Brian Salomon
a2a94a4c59 Add GrGLInterface support for sampler objects and GrGLCaps detection.
BUGL skia:8471

Change-Id: If67dbbcdca2d3130f6e10720c052c55a3b16482f
Reviewed-on: https://skia-review.googlesource.com/c/162561
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-10-16 20:30:58 +00:00
Greg Daniel
6dd96080d5 Have old GrBackend name still available.
Bug: skia:
Change-Id: Ief77cb6df7b8762a45b30a4b9ca0e7644f830610
Reviewed-on: https://skia-review.googlesource.com/c/161623
Auto-Submit: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-10-12 15:19:39 +00:00
Greg Daniel
bdf12ad8d5 Move GrBackend enum to enum class.
Bug: skia:
Change-Id: I8add2470313549723be6720b543091c444d2eb4f
Reviewed-on: https://skia-review.googlesource.com/c/161680
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-10-12 14:01:58 +00:00
Robert Phillips
46acf9dac3 Add context option to reduce opList splitting
This is split out of: https://skia-review.googlesource.com/c/skia/+/143113 (Reduce arbitrary opList splitting when sorting (take 3)).
It needs to be behind a context option because, without mini-flushes, it can cause OOM on smaller devices (e.g., Nexus7 and AndroidOne).

Change-Id: Icde3302bd033a9c4634bb0ca97c950456e73db7c
Reviewed-on: https://skia-review.googlesource.com/c/160763
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-10-09 17:08:26 +00:00
Jim Van Verth
8bbce0e29e More SkImage_GpuYUV updates
Bug: skia:7901
Change-Id: If5f747ff95c65ac95cfed8c1282cc08019d8006a
Reviewed-on: https://skia-review.googlesource.com/c/160024
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-10-08 20:22:58 +00:00