Commit Graph

2532 Commits

Author SHA1 Message Date
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
Greg Daniel
b4d895606f Reland "Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN.""
This reverts commit a55e214bbe.

Reason for revert:google3 should be fixed now

Original change's description:
> Revert "Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN.""
> 
> This reverts commit 55aea84baa.
> 
> Reason for revert: Google3 roll failing like
> 
> third_party/skia/HEAD/include/gpu/vk/GrVkDefines.h:15:10: fatal error: '../../../third_party/vulkan/SkiaVulkan.h' file not found
> #include "../../../third_party/vulkan/SkiaVulkan.h"
> 
> 
> Original change's description:
> > Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
> > 
> > This reverts commit 684b506f35.
> > 
> > Reason for revert: Chrome change has landed to fix broken chrome roll.
> > 
> > Original change's description:
> > > Revert "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
> > >
> > > This reverts commit 6e2d607334.
> > >
> > > Reason for revert: chrome roll
> > >
> > > Original change's description:
> > > > Always include public/include headers for vulkan and just guard src files with SK_VULKAN.
> > > >
> > > > This should allow a client to build a skia library that doesn't use vulkan but still
> > > > has all the public headers defined so that they don't have to build two versions of
> > > > their code.
> > > >
> > > > Bug: chromium:862144
> > > > Change-Id: I0eecbe0bc48123619f217e2cf318eb9a8c77ccb2
> > > > Reviewed-on: https://skia-review.googlesource.com/158661
> > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > >
> > > TBR=egdaniel@google.com,bsalomon@google.com,cblume@chromium.org
> > >
> > > Change-Id: I76ae6f435333755fa5d546fc1e5999a324b4fd05
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: chromium:862144
> > > Reviewed-on: https://skia-review.googlesource.com/c/159000
> > > Reviewed-by: Mike Klein <mtklein@google.com>
> > > Commit-Queue: Mike Klein <mtklein@google.com>
> > 
> > TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org
> > 
> > Change-Id: Id019b428f880efbd7ead8dee4178c6190469a290
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: chromium:862144
> > Reviewed-on: https://skia-review.googlesource.com/c/159145
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org
> 
> Change-Id: I0e5c72e2d79dac28021b02168a9e11ac08db765c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:862144
> Reviewed-on: https://skia-review.googlesource.com/c/159155
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org

Change-Id: I58f7f8ca5281cd5fe0c145c01e9b9465c9b9ec31
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:862144
Reviewed-on: https://skia-review.googlesource.com/159260
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-10-03 18:44:59 +00:00
Mike Klein
a55e214bbe Revert "Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN.""
This reverts commit 55aea84baa.

Reason for revert: Google3 roll failing like

third_party/skia/HEAD/include/gpu/vk/GrVkDefines.h:15:10: fatal error: '../../../third_party/vulkan/SkiaVulkan.h' file not found
#include "../../../third_party/vulkan/SkiaVulkan.h"


Original change's description:
> Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
> 
> This reverts commit 684b506f35.
> 
> Reason for revert: Chrome change has landed to fix broken chrome roll.
> 
> Original change's description:
> > Revert "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
> >
> > This reverts commit 6e2d607334.
> >
> > Reason for revert: chrome roll
> >
> > Original change's description:
> > > Always include public/include headers for vulkan and just guard src files with SK_VULKAN.
> > >
> > > This should allow a client to build a skia library that doesn't use vulkan but still
> > > has all the public headers defined so that they don't have to build two versions of
> > > their code.
> > >
> > > Bug: chromium:862144
> > > Change-Id: I0eecbe0bc48123619f217e2cf318eb9a8c77ccb2
> > > Reviewed-on: https://skia-review.googlesource.com/158661
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> >
> > TBR=egdaniel@google.com,bsalomon@google.com,cblume@chromium.org
> >
> > Change-Id: I76ae6f435333755fa5d546fc1e5999a324b4fd05
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: chromium:862144
> > Reviewed-on: https://skia-review.googlesource.com/c/159000
> > Reviewed-by: Mike Klein <mtklein@google.com>
> > Commit-Queue: Mike Klein <mtklein@google.com>
> 
> TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org
> 
> Change-Id: Id019b428f880efbd7ead8dee4178c6190469a290
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:862144
> Reviewed-on: https://skia-review.googlesource.com/c/159145
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org

Change-Id: I0e5c72e2d79dac28021b02168a9e11ac08db765c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:862144
Reviewed-on: https://skia-review.googlesource.com/c/159155
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-03 16:34:23 +00:00
Greg Daniel
55aea84baa Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
This reverts commit 684b506f35.

Reason for revert: Chrome change has landed to fix broken chrome roll.

Original change's description:
> Revert "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
>
> This reverts commit 6e2d607334.
>
> Reason for revert: chrome roll
>
> Original change's description:
> > Always include public/include headers for vulkan and just guard src files with SK_VULKAN.
> >
> > This should allow a client to build a skia library that doesn't use vulkan but still
> > has all the public headers defined so that they don't have to build two versions of
> > their code.
> >
> > Bug: chromium:862144
> > Change-Id: I0eecbe0bc48123619f217e2cf318eb9a8c77ccb2
> > Reviewed-on: https://skia-review.googlesource.com/158661
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,cblume@chromium.org
>
> Change-Id: I76ae6f435333755fa5d546fc1e5999a324b4fd05
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:862144
> Reviewed-on: https://skia-review.googlesource.com/c/159000
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org

Change-Id: Id019b428f880efbd7ead8dee4178c6190469a290
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:862144
Reviewed-on: https://skia-review.googlesource.com/c/159145
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-10-03 13:30:30 +00:00
Brian Osman
5ea96bf76e Remove unused premul/unpremul FP code
Bug: skia:
Change-Id: I911ee066ce4d0175cee3ee3868a86955d486687c
Reviewed-on: https://skia-review.googlesource.com/159060
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
2018-10-02 19:46:37 +00:00
Mike Klein
684b506f35 Revert "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
This reverts commit 6e2d607334.

Reason for revert: chrome roll

Original change's description:
> Always include public/include headers for vulkan and just guard src files with SK_VULKAN.
> 
> This should allow a client to build a skia library that doesn't use vulkan but still
> has all the public headers defined so that they don't have to build two versions of
> their code.
> 
> Bug: chromium:862144
> Change-Id: I0eecbe0bc48123619f217e2cf318eb9a8c77ccb2
> Reviewed-on: https://skia-review.googlesource.com/158661
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,bsalomon@google.com,cblume@chromium.org

Change-Id: I76ae6f435333755fa5d546fc1e5999a324b4fd05
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:862144
Reviewed-on: https://skia-review.googlesource.com/c/159000
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-02 18:05:54 +00:00
Greg Daniel
6e2d607334 Always include public/include headers for vulkan and just guard src files with SK_VULKAN.
This should allow a client to build a skia library that doesn't use vulkan but still
has all the public headers defined so that they don't have to build two versions of
their code.

Bug: chromium:862144
Change-Id: I0eecbe0bc48123619f217e2cf318eb9a8c77ccb2
Reviewed-on: https://skia-review.googlesource.com/158661
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-10-02 17:41:53 +00:00
Jim Van Verth
f49262d3bc Add SkImage_GpuYUVA
Bug: skia:7903
Change-Id: I06edc155b0a0a0697dc0d0aab74b6876d631ca0d
Reviewed-on: https://skia-review.googlesource.com/156942
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-10-02 16:40:01 +00:00
Brian Salomon
23952e2694 Remove legacy GrGLFunction specialization
Requires https://chromium-review.googlesource.com/c/chromium/src/+/1224660
to land.
Bug: skia:8262
Change-Id: I278360315d408e54e04d2e8e331e0be0b76a0d77
Reviewed-on: https://skia-review.googlesource.com/154501
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-09-28 13:43:37 +00:00
Brian Osman
653c6b5b8e Remove (unused) GrBlend.cpp, and some GrColor helpers
Bug: skia:
Change-Id: I9a99cb28fd239371ca21b4a918e802606afe9da0
Reviewed-on: https://skia-review.googlesource.com/155840
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-09-20 15:25:17 +00:00
Hal Canary
c2d0fb17de include: whitespace changes for clang-format
Change-Id: I76ab59d963cebf6cbb450e1873c3e0c63f3f2da0
Reviewed-on: https://skia-review.googlesource.com/155560
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-09-19 14:54:57 +00:00
Robert Phillips
0790f8a471 Fix DDL reattachment of uniquely keyed proxies
This fix has three parts:
   No longer clear all proxy unique keys in DDL mode
   Handle unique keys appropriately in lazy proxy instantiation
   Handle attaching to cached surfaces for non-lazy proxies

Change-Id: I86b0422a784acaf8c5f9b67cb981b440e08352de
Reviewed-on: https://skia-review.googlesource.com/154502
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-09-18 17:33:30 +00:00
Herb Derby
3c4d533d8e Simplify plots to always be 512x512 and simplify GrDrawOpAtlasConfig
With less stressful tests.

Change-Id: I600cb728f6efca5aab87a16e71039a0ed00c47e1
Reviewed-on: https://skia-review.googlesource.com/153220
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-09-10 21:57:16 +00:00
Brian Osman
086679bc11 Revert "increase Builder's prealloc size after colorspace change"
This reverts commit e53de48393.

Reason for revert: Key size distribution has changed back.

Original change's description:
> increase Builder's prealloc size after colorspace change
> 
> BUG=skia:
> 
> Change-Id: I003dcbde7d987404ae823df6621e13664cf440a1
> Reviewed-on: https://skia-review.googlesource.com/9523
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

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

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:
Change-Id: I506a1ec791e6d99df1836cbf3262747fbfa224a7
Reviewed-on: https://skia-review.googlesource.com/153008
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-09-10 20:49:30 +00:00
Cary Clark
aa5f38f0ba Revert "Simplify plots to always be 512x512 and simplify GrDrawOpAtlasConfig"
This reverts commit a2bc1ca21b.

Reason for revert: see if make chromecast failures go away

Original change's description:
> Simplify plots to always be 512x512 and simplify GrDrawOpAtlasConfig
> 
> Change-Id: I1353d3facf191e3323027fc288715672240d1f87
> Reviewed-on: https://skia-review.googlesource.com/152591
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

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

Change-Id: I970ec86678c97046001889dc436df5307750da1b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/153180
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-09-10 20:28:13 +00:00
Herb Derby
a2bc1ca21b Simplify plots to always be 512x512 and simplify GrDrawOpAtlasConfig
Change-Id: I1353d3facf191e3323027fc288715672240d1f87
Reviewed-on: https://skia-review.googlesource.com/152591
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-09-10 17:49:56 +00:00
Brian Salomon
43b882bced Remove purging of GPU resources based on flush counts.
We've had a better time-based mechanism available for a long time.

Change-Id: I130ab79dc0e8161a6817eb53b83e0988546dfa71
Reviewed-on: https://skia-review.googlesource.com/152668
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-09-10 13:11:07 +00:00
Mike Klein
d9187c085b Revert "SkMath takes some functions from from SkTypes"
This reverts commit 3b347232bc.

Reason for revert: tree done gone red.

Original change's description:
> SkMath takes some functions from from SkTypes
> 
> Moved to include/core/SkMath.h: Sk{Is|}Align{2|4|8|Ptr}, SkLeftShift,
> SkAbs{32|}, SkM{ax|in}32 SkTM{in|ax}, SkTClamp, SkFastMin32, SkTPin.
> 
> Change-Id: Ibcc07be0fc3677731048e7cc86006e7aa493cb92
> Reviewed-on: https://skia-review.googlesource.com/133381
> Auto-Submit: Hal Canary <halcanary@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>

TBR=mtklein@google.com,halcanary@google.com,bungeman@google.com,reed@google.com

Change-Id: I44073cf397e2a3a6a941a90f0aa63c6396d4c742
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/152587
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-09-07 17:32:54 +00:00
Hal Canary
3b347232bc SkMath takes some functions from from SkTypes
Moved to include/core/SkMath.h: Sk{Is|}Align{2|4|8|Ptr}, SkLeftShift,
SkAbs{32|}, SkM{ax|in}32 SkTM{in|ax}, SkTClamp, SkFastMin32, SkTPin.

Change-Id: Ibcc07be0fc3677731048e7cc86006e7aa493cb92
Reviewed-on: https://skia-review.googlesource.com/133381
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-09-07 17:18:46 +00:00
Greg Daniel
ecddbc0126 Add support for switching family queues in vulkan.
Bug: skia:
Change-Id: Ie4f620a96d1a6f7662819590d97073a694159f96
Reviewed-on: https://skia-review.googlesource.com/150483
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2018-08-31 13:25:22 +00:00
Michael Ludwig
10c3776b44 Remove GrTextureStripAtlas, textured gradients use independent textures
The texture strip atlas code path has been disabled without performance
regressions since 8/3/18, so this deletes it completely from the code
base since it is complex and difficult to manage.

GrTextureStripAtlas, GrDynamicTextureStripAtlas, and
GrDDLTextureStripAtlas completely deleted, everything else is cleaning
up references/dead code using the atlas.

Bug: skia:
Change-Id: Ieb967b6e291a1d76da62fce9fa384acbda8c51c0
Reviewed-on: https://skia-review.googlesource.com/150472
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-08-30 20:43:30 +00:00
Brian Salomon
2424ec46e9 Make GrGLInterface great for Win32 x86 again
Bug: skia:8262
Change-Id: I607644198d5dc7992e2b89eb34651eb1dc88c6ba
Reviewed-on: https://skia-review.googlesource.com/149225
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-08-27 16:09:48 +00:00
Adrienne Walker
70e468f93c Add disable_texture_storage workaround
Bug: chromium: 521904, 829614
Change-Id: I808d9c80bac86cbc23982eaefdc7f822fd408a3d
Reviewed-on: https://skia-review.googlesource.com/148659
Commit-Queue: Adrienne Walker <enne@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-08-22 23:56:23 +00:00
Adrienne Walker
2f4c09b5ca Add remove_pow_with_constant_exponent workaround
Bug: chromium: 477306, 829614
Change-Id: If88c57b15a4cfd6f362a2f5171f8e9c0775cb9d4
Reviewed-on: https://skia-review.googlesource.com/148480
Commit-Queue: Adrienne Walker <enne@chromium.org>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2018-08-22 23:09:36 +00:00
Adrienne Walker
8b23ca6406 Add rewrite_do_while_loops workaround
Bug: chromium: 644669, 829614
Change-Id: Ic6a4cbd9f7c73b9b9a78608f1b4ac4ce4c4f2cb9
Reviewed-on: https://skia-review.googlesource.com/148439
Commit-Queue: Adrienne Walker <enne@chromium.org>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2018-08-22 22:45:52 +00:00
Adrienne Walker
92b161fab4 Add emulate_abs_int_function workaround
Bug: chromium: 642227,829614
Change-Id: I23be4105041187a6501f45cd2033ac0143642aa1
Reviewed-on: https://skia-review.googlesource.com/147322
Commit-Queue: Adrienne Walker <enne@chromium.org>
Auto-Submit: Adrienne Walker <enne@chromium.org>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2018-08-22 18:25:13 +00:00