Commit Graph

2605 Commits

Author SHA1 Message Date
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
Adrienne Walker
c02165fae1 Add unfold_short_circuit_as_ternary workaround
Bug: chromium: 307751,829614
Change-Id: I1fb347e5470eb2a498192f3fc467a6b744b53a79
Reviewed-on: https://skia-review.googlesource.com/147243
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Adrienne Walker <enne@chromium.org>
2018-08-22 16:54:26 +00:00
Adrienne Walker
ee8295c050 Add add_and_true_to_loop_condition workaround
See https://bugs.chromium.org/p/chromium/issues/detail?id=644669#c4 for
what this is doing and trying to work around.

Bug: chromium: 644669, 829614
Change-Id: I5616eb6f7299c30e5bdf812e55099ac0a8fc9c1d
Reviewed-on: https://skia-review.googlesource.com/146856
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Adrienne Walker <enne@chromium.org>
2018-08-21 20:03:50 +00:00
Adrienne Walker
ca0cdef063 Add flush_on_framebuffer_change workaround
Bug: chromium: 829614
Change-Id: Ibd7ebfd74d95e3119f01a3d6ae40a693368ac3de
Reviewed-on: https://skia-review.googlesource.com/147128
Auto-Submit: Adrienne Walker <enne@chromium.org>
Commit-Queue: Adrienne Walker <enne@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-08-21 01:10:52 +00:00
Adrienne Walker
87785d5573 Add max_fragment_uniform_vectors_32 workaround
Bug: chromium: 829614
Change-Id: I0ce008d8ebadd90758510ea069f0f4384a95751e
Reviewed-on: https://skia-review.googlesource.com/146622
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adrienne Walker <enne@chromium.org>
2018-08-09 21:13:16 +00:00
Greg Daniel
a0651acaf2 Update vulkan features (again) to support extension features.
We need to handle all the possible ways a client is allowed to initialize
features on Vulkan.

Bug: skia:
Change-Id: I98b1dee2efa2c22c26ce093c590c7ccd0b626969
Reviewed-on: https://skia-review.googlesource.com/145530
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-08-08 13:48:38 +00:00
Greg Daniel
c0b03d8dfc Start adding support for some base extensions which others build on.
Many of the other extensions in Vulkan rely on these some just want to
get these landed so we can start building on top of them.

Bug: skia:
Change-Id: Icef82c169cd50ff51b97fe065923531ef2940319
Reviewed-on: https://skia-review.googlesource.com/145362
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-08-06 14:26:15 +00:00
Greg Daniel
92aef4b125 Support using vulkan 1.1.
Bug: skia:
Change-Id: Ic1fc109557f64c748c9ba5427b400795dbde7250
Reviewed-on: https://skia-review.googlesource.com/137882
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-08-02 18:37:02 +00:00
Greg Daniel
3644360c8d Have GrVkBackendContext take a VkPhysicalDeviceFeatures struct.
Bug: skia:
Change-Id: Ic7992c89c06789ee631c9f5b4f047c6486e792a5
Reviewed-on: https://skia-review.googlesource.com/137390
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-08-02 17:24:48 +00:00
Greg Daniel
a31f4e51d5 Make sure we check the version number of Vulkan Extensions.
Bug: skia:
Change-Id: Iff02911491cc61e39f94370c644b6666e5f9118f
Reviewed-on: https://skia-review.googlesource.com/137881
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-08-02 14:57:45 +00:00
Greg Daniel
98bffae9c1 Reland "Reland "Let client pass in full extension to GrVkBackendContext.""
This reverts commit dc13c21b1e.

Reason for revert: fuchsia should be fixed

Original change's description:
> Revert "Reland "Let client pass in full extension to GrVkBackendContext.""
> 
> This reverts commit a782dcb3c4.
> 
> Reason for revert: fuchsia changes reverted
> 
> Original change's description:
> > Reland "Let client pass in full extension to GrVkBackendContext."
> > 
> > This reverts commit cb92b26e5c.
> > 
> > Reason for revert: <INSERT REASONING HERE>
> > 
> > Original change's description:
> > > Revert "Let client pass in full extension to GrVkBackendContext."
> > > 
> > > This reverts commit 45c9dab4c3.
> > > 
> > > Reason for revert: fucshia uses GrVkBackendContext. Need to revert earlier changes
> > > 
> > > Original change's description:
> > > > Let client pass in full extension to GrVkBackendContext.
> > > > 
> > > > Bug: skia:
> > > > Change-Id: I772ab4ccbca0f4f7e7d429d6c421b07d97f0606f
> > > > Reviewed-on: https://skia-review.googlesource.com/131880
> > > > 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: I1a765ff406c83cb234c3614b804fbed677d5a382
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: skia:
> > > Reviewed-on: https://skia-review.googlesource.com/137901
> > > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > 
> > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> > 
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> > 
> > Bug: skia:
> > Change-Id: I0af797c51dde705473e9afaccb1d4b4423e8c41e
> > Reviewed-on: https://skia-review.googlesource.com/138302
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> 
> Change-Id: Idf760d5ac6b82df33a4408079a0223be833058ad
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/138420
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

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

Bug: skia:
Change-Id: Ied1323b7197b600e895d85ac7e85d6f65985dabc
Reviewed-on: https://skia-review.googlesource.com/139002
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-08-01 19:40:45 +00:00
Brian Salomon
e632dfcb36 Use GrTextureType to determine highest supported filter
Change-Id: I8deaa5dea45a2dcc743f781e9ef8f624da1d16c0
Reviewed-on: https://skia-review.googlesource.com/144786
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-08-01 17:24:52 +00:00
Greg Daniel
da16cce7d9 Use our own checked in Vulkan header to build skia source code.
Core Skia will always include our own SkiaVulkan.h which basically just
includes vulkan_core.h. All platform vulkan specific stuff must be
include by the client in their own vulkan.h file. Our public interface
is set up that we only use vulkan objects that will be present in all
versions of vulkan headers that the client could include.

Bug: skia:
Change-Id: I6673fd91498eabcc923d65d20f2b5e0a89b4ccf6
Reviewed-on: https://skia-review.googlesource.com/142985
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-08-01 16:52:20 +00:00
Greg Daniel
d3e65aa758 Move GrVkInterface out of public API.
Bug: skia:
Change-Id: I8b73982e4c9372af1c35bfc5e665c2c146d7d9f5
Reviewed-on: https://skia-review.googlesource.com/141121
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-08-01 13:45:55 +00:00
Brian Salomon
ae5f9534b1 Remove unused GrGpuResourceRef and GrTGpuResourceRef
Change-Id: I8b4b323549f51e4601ccb6612f65d354e163e93c
Reviewed-on: https://skia-review.googlesource.com/144504
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-07-31 16:55:26 +00:00
Ethan Nicholas
0054311bf3 Re-re-land "added GrSkSLFP and converted DitherEffect to use it"
This reverts commit 6c48e4d11c.

Bug: skia:
Change-Id: I7ee78990fc30eec545d1856e59eb6e0573089426
Reviewed-on: https://skia-review.googlesource.com/144348
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-07-31 15:18:03 +00:00
Brian Salomon
7226c232d7 Make GrTextureProxy store a GrTextureType.
Removes flag indicating rectangle or external as its now redundant.

Bug: skia:
Change-Id: Ia475b557390e7a6b0f19f6e189cf8c27090e397c
Reviewed-on: https://skia-review.googlesource.com/144346
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-07-30 19:32:13 +00:00
Brian Salomon
60dd8c7464 Introduce enum class for texture type.
This represents the GL texture "target" but at the API-neutral level. It
will be needed here because proxy's that wrap imported texture's need to
know about sampling restrictions.

Change-Id: Ie811a6f6d04ba1b04faa6908422dca64e8e447c8
Reviewed-on: https://skia-review.googlesource.com/144304
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-07-30 14:54:25 +00:00
Chris Dalton
9acfc6cac2 Add kAAHairline to GpuPathRenderers
With the upcoming ccpr stroking, this will no longer be the only path
renderer that can handle hairlines.

Bug: skia:
Change-Id: I45b30ccd578bee1388a3a07a234af76a19768de6
Reviewed-on: https://skia-review.googlesource.com/142272
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-07-27 13:30:17 +00:00
Ethan Nicholas
6c48e4d11c Reland "Revert "added GrSkSLFP and converted DitherEffect to use it""
This reverts commit 97ae0c8902.

Reason for revert: Breaking ANGLE.

Original change's description:
> Revert "Revert "added GrSkSLFP and converted DitherEffect to use it""
> 
> This reverts commit f203078309.
> 
> Bug: skia:
> Change-Id: Icaaa8b3ea652a8f126bfbcc788a360493a7ebe3e
> Reviewed-on: https://skia-review.googlesource.com/137391
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I65d6d2707fceab0a99121c528d1b848d23e34bfa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/142588
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-07-19 20:10:46 +00:00
Ethan Nicholas
97ae0c8902 Revert "Revert "added GrSkSLFP and converted DitherEffect to use it""
This reverts commit f203078309.

Bug: skia:
Change-Id: Icaaa8b3ea652a8f126bfbcc788a360493a7ebe3e
Reviewed-on: https://skia-review.googlesource.com/137391
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-07-19 19:00:55 +00:00
Ben Wagner
d5148e3314 Move SkNoncopyable to include/private.
Change-Id: I62f60ea52faeebddecacf03d9429ac3f7c516b8e
Reviewed-on: https://skia-review.googlesource.com/141823
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-07-17 21:39:51 +00:00
Brian Salomon
662ea4baba Remove texel buffer support.
Change-Id: Ia6f21afe714208979a5bc384e436b28ea2b9a297
Reviewed-on: https://skia-review.googlesource.com/141051
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-07-13 00:45:54 +00:00
Ben Wagner
9ec70c6bd3 Remove SkSafeSetNull.
Update all users to sk_sp.

Change-Id: I6453b9456b9a8f9e2b756381797f1382ef9e6561
Reviewed-on: https://skia-review.googlesource.com/141052
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2018-07-12 20:59:20 +00:00
Greg Daniel
c8cd45aaf4 Generate GrVkInterface when we make the GrVkGpu.
Also add a GetProc function to the GrVkBackendContext which will be used
to create the GrVkInterface.

This change (and updating clients to use it), will allow us to move GrVkInterface
out of public which is needed to fix vulkan header issues.

Bug: skia:
Change-Id: Id8067943ae27cec8cad29fd31b05f0b8387412d4
Reviewed-on: https://skia-review.googlesource.com/140783
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-07-12 14:35:08 +00:00
Brian Salomon
238069b3f5 Reland "Make GPU cache invalidation SkMessageBus messages go to one GrContext."
This is a reland of f4c5bb9aba

Original change's description:
> Make GPU cache invalidation SkMessageBus messages go to one GrContext.
> 
> Makes it so the template param to SkMessageBus must implement:
> bool shouldSend(uint32_t inboxID) const
> 
> Updates all GPU backend message types to only go to the GrContext that
> is adding a cache entry.
> 
> Bug: skia:
> Change-Id: I3e8a4eb90654b7b8ac57cac9fb508c0ef1d51058
> Reviewed-on: https://skia-review.googlesource.com/140220
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>

Bug: skia:
Change-Id: I8402bfe3ed0170c99936d47050458817030b473b
Reviewed-on: https://skia-review.googlesource.com/140801
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-07-11 20:36:38 +00:00
Brian Salomon
143cf8e599 Revert "Make GPU cache invalidation SkMessageBus messages go to one GrContext."
This reverts commit f4c5bb9aba.

Reason for revert: Accidentally submitted without CQ

Original change's description:
> Make GPU cache invalidation SkMessageBus messages go to one GrContext.
> 
> Makes it so the template param to SkMessageBus must implement:
> bool shouldSend(uint32_t inboxID) const
> 
> Updates all GPU backend message types to only go to the GrContext that
> is adding a cache entry.
> 
> Bug: skia:
> Change-Id: I3e8a4eb90654b7b8ac57cac9fb508c0ef1d51058
> Reviewed-on: https://skia-review.googlesource.com/140220
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>

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

Change-Id: Iadb667d8027341703d254325320ddaa528fb33a1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/140800
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-07-11 20:01:28 +00:00
Brian Salomon
f4c5bb9aba Make GPU cache invalidation SkMessageBus messages go to one GrContext.
Makes it so the template param to SkMessageBus must implement:
bool shouldSend(uint32_t inboxID) const

Updates all GPU backend message types to only go to the GrContext that
is adding a cache entry.

Bug: skia:
Change-Id: I3e8a4eb90654b7b8ac57cac9fb508c0ef1d51058
Reviewed-on: https://skia-review.googlesource.com/140220
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2018-07-11 20:00:11 +00:00
Greg Daniel
f730c1820f Reland "Reland "Make GrVkBackendContext no longer derive from SkRefCnt.""
This reverts commit 007267bdb5.

Reason for revert: Hopefully fuchsia is fixed this time

Original change's description:
> Revert "Reland "Make GrVkBackendContext no longer derive from SkRefCnt.""
> 
> This reverts commit 0db3a8846a.
> 
> Reason for revert: fuchsia change reverted
> 
> Original change's description:
> > Reland "Make GrVkBackendContext no longer derive from SkRefCnt."
> > 
> > This reverts commit 059a9ab4bc.
> > 
> > Reason for revert: Fix landed in Fuchsia
> > 
> > Original change's description:
> > > Revert "Make GrVkBackendContext no longer derive from SkRefCnt."
> > > 
> > > This reverts commit 93ae233773.
> > > 
> > > Reason for revert: <INSERT REASONING HERE>
> > > 
> > > Original change's description:
> > > > Make GrVkBackendContext no longer derive from SkRefCnt.
> > > > 
> > > > Also moves the helper Create functions to VkTestUtils since no clients
> > > > are using them anymore.
> > > > 
> > > > Bug: skia:
> > > > Change-Id: I7e8e4912e7ef6fb00a7e2a00407aed5e83211799
> > > > Reviewed-on: https://skia-review.googlesource.com/135323
> > > > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > > 
> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> > > 
> > > # Not skipping CQ checks because original CL landed > 1 day ago.
> > > 
> > > Bug: skia:
> > > Change-Id: If7201917631dc22753ea3fa6e9d2984463e38e4c
> > > Reviewed-on: https://skia-review.googlesource.com/137903
> > > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > 
> > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> > 
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> > 
> > Bug: skia:
> > Change-Id: Ia4b7c0bb2c7b5dba809d85c69f0b41b473140526
> > Reviewed-on: https://skia-review.googlesource.com/138181
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> 
> Change-Id: I3f7bc4a5e4e09512fe165303685c123ec3527e58
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/138422
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

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

Bug: skia:
Change-Id: I5705f1ae306707fe28559797e1bb8c2d57e12204
Reviewed-on: https://skia-review.googlesource.com/139000
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-07-11 13:54:57 +00:00
Greg Daniel
108bb23277 Reland "Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors."
This reverts commit 34aa059c15.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors."
> 
> This reverts commit ff2181e62e.
> 
> Reason for revert: suspect it's behind Chrome roll failure
> 
> Original change's description:
> > Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors.
> > 
> > Bug: skia:
> > Change-Id: I1466668e3502cd1e6e1f6aed4105e0f626d293dd
> > Reviewed-on: https://skia-review.googlesource.com/138987
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
> 
> Change-Id: I4cba44858aafffbadc45e18349b93c741d7cfc66
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/139220
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

Bug: skia:
Change-Id: Ib1fd10c126862824f3e31c420c697ac749c637f5
Reviewed-on: https://skia-review.googlesource.com/139221
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-07-03 20:46:27 +00:00
Ethan Nicholas
34aa059c15 Revert "Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors."
This reverts commit ff2181e62e.

Reason for revert: suspect it's behind Chrome roll failure

Original change's description:
> Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors.
> 
> Bug: skia:
> Change-Id: I1466668e3502cd1e6e1f6aed4105e0f626d293dd
> Reviewed-on: https://skia-review.googlesource.com/138987
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: I4cba44858aafffbadc45e18349b93c741d7cfc66
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/139220
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-07-03 16:38:45 +00:00
Greg Daniel
ff2181e62e Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors.
Bug: skia:
Change-Id: I1466668e3502cd1e6e1f6aed4105e0f626d293dd
Reviewed-on: https://skia-review.googlesource.com/138987
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-07-03 13:41:13 +00:00
Hal Canary
389abd50fe Simplify GrGLInterface::abandon
Change-Id: I07e0d0670dfc47602394daf68c30d561e543d826
Reviewed-on: https://skia-review.googlesource.com/138995
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-07-02 20:54:52 +00:00
Timothy Liang
4e85e80a5a added Metal support to GrBackendSurface
Bug: skia:
Change-Id: I58c7307f41df4694b0b46014bedd681adefed265
Reviewed-on: https://skia-review.googlesource.com/137891
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Timothy Liang <timliang@google.com>
2018-06-29 13:32:17 +00:00
Greg Daniel
007267bdb5 Revert "Reland "Make GrVkBackendContext no longer derive from SkRefCnt.""
This reverts commit 0db3a8846a.

Reason for revert: fuchsia change reverted

Original change's description:
> Reland "Make GrVkBackendContext no longer derive from SkRefCnt."
> 
> This reverts commit 059a9ab4bc.
> 
> Reason for revert: Fix landed in Fuchsia
> 
> Original change's description:
> > Revert "Make GrVkBackendContext no longer derive from SkRefCnt."
> > 
> > This reverts commit 93ae233773.
> > 
> > Reason for revert: <INSERT REASONING HERE>
> > 
> > Original change's description:
> > > Make GrVkBackendContext no longer derive from SkRefCnt.
> > > 
> > > Also moves the helper Create functions to VkTestUtils since no clients
> > > are using them anymore.
> > > 
> > > Bug: skia:
> > > Change-Id: I7e8e4912e7ef6fb00a7e2a00407aed5e83211799
> > > Reviewed-on: https://skia-review.googlesource.com/135323
> > > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > 
> > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> > 
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> > 
> > Bug: skia:
> > Change-Id: If7201917631dc22753ea3fa6e9d2984463e38e4c
> > Reviewed-on: https://skia-review.googlesource.com/137903
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: skia:
> Change-Id: Ia4b7c0bb2c7b5dba809d85c69f0b41b473140526
> Reviewed-on: https://skia-review.googlesource.com/138181
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: I3f7bc4a5e4e09512fe165303685c123ec3527e58
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/138422
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-06-28 23:34:52 +00:00
Greg Daniel
dc13c21b1e Revert "Reland "Let client pass in full extension to GrVkBackendContext.""
This reverts commit a782dcb3c4.

Reason for revert: fuchsia changes reverted

Original change's description:
> Reland "Let client pass in full extension to GrVkBackendContext."
> 
> This reverts commit cb92b26e5c.
> 
> Reason for revert: <INSERT REASONING HERE>
> 
> Original change's description:
> > Revert "Let client pass in full extension to GrVkBackendContext."
> > 
> > This reverts commit 45c9dab4c3.
> > 
> > Reason for revert: fucshia uses GrVkBackendContext. Need to revert earlier changes
> > 
> > Original change's description:
> > > Let client pass in full extension to GrVkBackendContext.
> > > 
> > > Bug: skia:
> > > Change-Id: I772ab4ccbca0f4f7e7d429d6c421b07d97f0606f
> > > Reviewed-on: https://skia-review.googlesource.com/131880
> > > 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: I1a765ff406c83cb234c3614b804fbed677d5a382
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: skia:
> > Reviewed-on: https://skia-review.googlesource.com/137901
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: skia:
> Change-Id: I0af797c51dde705473e9afaccb1d4b4423e8c41e
> Reviewed-on: https://skia-review.googlesource.com/138302
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: Idf760d5ac6b82df33a4408079a0223be833058ad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/138420
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-06-28 23:29:48 +00:00
Greg Daniel
a782dcb3c4 Reland "Let client pass in full extension to GrVkBackendContext."
This reverts commit cb92b26e5c.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Let client pass in full extension to GrVkBackendContext."
> 
> This reverts commit 45c9dab4c3.
> 
> Reason for revert: fucshia uses GrVkBackendContext. Need to revert earlier changes
> 
> Original change's description:
> > Let client pass in full extension to GrVkBackendContext.
> > 
> > Bug: skia:
> > Change-Id: I772ab4ccbca0f4f7e7d429d6c421b07d97f0606f
> > Reviewed-on: https://skia-review.googlesource.com/131880
> > 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: I1a765ff406c83cb234c3614b804fbed677d5a382
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/137901
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

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

Bug: skia:
Change-Id: I0af797c51dde705473e9afaccb1d4b4423e8c41e
Reviewed-on: https://skia-review.googlesource.com/138302
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-06-28 20:50:17 +00:00
Timothy Liang
036fdfe5aa implemented getting format from texture as virtual in gpu caps
Bug: skia:
Change-Id: If6bbbd212ff472ea322d2bbed61995fe7ba85df7
Reviewed-on: https://skia-review.googlesource.com/138240
Commit-Queue: Timothy Liang <timliang@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-06-28 20:21:17 +00:00
Greg Daniel
0db3a8846a Reland "Make GrVkBackendContext no longer derive from SkRefCnt."
This reverts commit 059a9ab4bc.

Reason for revert: Fix landed in Fuchsia

Original change's description:
> Revert "Make GrVkBackendContext no longer derive from SkRefCnt."
> 
> This reverts commit 93ae233773.
> 
> Reason for revert: <INSERT REASONING HERE>
> 
> Original change's description:
> > Make GrVkBackendContext no longer derive from SkRefCnt.
> > 
> > Also moves the helper Create functions to VkTestUtils since no clients
> > are using them anymore.
> > 
> > Bug: skia:
> > Change-Id: I7e8e4912e7ef6fb00a7e2a00407aed5e83211799
> > Reviewed-on: https://skia-review.googlesource.com/135323
> > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: skia:
> Change-Id: If7201917631dc22753ea3fa6e9d2984463e38e4c
> Reviewed-on: https://skia-review.googlesource.com/137903
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

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

Bug: skia:
Change-Id: Ia4b7c0bb2c7b5dba809d85c69f0b41b473140526
Reviewed-on: https://skia-review.googlesource.com/138181
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-06-28 17:20:27 +00:00
Greg Daniel
059a9ab4bc Revert "Make GrVkBackendContext no longer derive from SkRefCnt."
This reverts commit 93ae233773.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Make GrVkBackendContext no longer derive from SkRefCnt.
> 
> Also moves the helper Create functions to VkTestUtils since no clients
> are using them anymore.
> 
> Bug: skia:
> Change-Id: I7e8e4912e7ef6fb00a7e2a00407aed5e83211799
> Reviewed-on: https://skia-review.googlesource.com/135323
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

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

Bug: skia:
Change-Id: If7201917631dc22753ea3fa6e9d2984463e38e4c
Reviewed-on: https://skia-review.googlesource.com/137903
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-06-27 15:53:55 +00:00
Greg Daniel
cb92b26e5c Revert "Let client pass in full extension to GrVkBackendContext."
This reverts commit 45c9dab4c3.

Reason for revert: fucshia uses GrVkBackendContext. Need to revert earlier changes

Original change's description:
> Let client pass in full extension to GrVkBackendContext.
> 
> Bug: skia:
> Change-Id: I772ab4ccbca0f4f7e7d429d6c421b07d97f0606f
> Reviewed-on: https://skia-review.googlesource.com/131880
> 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: I1a765ff406c83cb234c3614b804fbed677d5a382
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/137901
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-06-27 15:03:46 +00:00
Greg Daniel
45c9dab4c3 Let client pass in full extension to GrVkBackendContext.
Bug: skia:
Change-Id: I772ab4ccbca0f4f7e7d429d6c421b07d97f0606f
Reviewed-on: https://skia-review.googlesource.com/131880
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-06-27 14:29:45 +00:00
Khushal
c421ca1d6e gpu: Expose GrContextPriv::abandoned in the public API.
TBR=bsalomon@google.com

Bug: 854416
Change-Id: Iab71ca6e4724a925b0b9791267aac5ddc34f5b15
Reviewed-on: https://skia-review.googlesource.com/137692
Reviewed-by: Khusal Sagar <khushalsagar@chromium.org>
Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
2018-06-27 01:08:45 +00:00
Chris Dalton
ef12509ff2 ccpr: Add a context option to disable ccpr
TBR=bsalomon@google.com

Bug: skia:856404
Change-Id: Icc6f3d1e7ef97f1853427a3b1cdd405961e6ac26
Reviewed-on: https://skia-review.googlesource.com/137763
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-06-27 00:48:15 +00:00
Greg Daniel
93ae233773 Make GrVkBackendContext no longer derive from SkRefCnt.
Also moves the helper Create functions to VkTestUtils since no clients
are using them anymore.

Bug: skia:
Change-Id: I7e8e4912e7ef6fb00a7e2a00407aed5e83211799
Reviewed-on: https://skia-review.googlesource.com/135323
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-06-25 13:37:45 +00:00
Robert Phillips
752e08b1ae Fix abandonment of programs
Bug: skia:8092
TBR=bsalomon@google.com
Change-Id: If9cf4ed9f8ded4b7fbb58a244ec0b179b8430ca2
Reviewed-on: https://skia-review.googlesource.com/137121
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-06-25 12:09:55 +00:00
Robert Phillips
c994a93b32 Move op memory storage to GrContext (take 2)
TBR=bsalomon@google.com

Change-Id: I4a448694d4114d83cd3a720cfc8bd37de51733d1
Reviewed-on: https://skia-review.googlesource.com/135707
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-06-19 19:51:20 +00:00
Kevin Lubick
f203078309 Revert "added GrSkSLFP and converted DitherEffect to use it"
This reverts commit dfbfc738a9.

Reason for revert: Seems to be breaking DDL/ASAN bots

Original change's description:
> added GrSkSLFP and converted DitherEffect to use it
>
> Bug: skia:
> Change-Id: I84b71165eab1712355f3c7669cee2d33d259f3df
> Reviewed-on: https://skia-review.googlesource.com/124504
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ic4c3978aaba0391f2f8bb1316a456e3821a3a2f2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/135700
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-06-19 12:23:21 +00:00
Ben Wagner
f08d1d0ce1 Stop using SkTSwap.
Use std::swap instead. It does not appear that any external user
specializes SkTSwap, but some may still use it. This removes all use in
Skia so that SkTSwap can later be removed in a smaller CL. After that
the <utility> include can be removed from SkTypes.h.

Change-Id: If03d4ee07dbecda961aa9f0dc34d171ef5168753
Reviewed-on: https://skia-review.googlesource.com/135578
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-06-19 02:06:31 +00:00
Ethan Nicholas
dfbfc738a9 added GrSkSLFP and converted DitherEffect to use it
Bug: skia:
Change-Id: I84b71165eab1712355f3c7669cee2d33d259f3df
Reviewed-on: https://skia-review.googlesource.com/124504
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-06-18 18:40:58 +00:00
Ben Wagner
29f2eaf6e5 Remove string.h from SkTypes.h
Change-Id: I2be84f37ea11a386206a96d2fef6e0fc9464e21b
Reviewed-on: https://skia-review.googlesource.com/135264
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-06-15 20:32:05 +00:00
Robert Phillips
4f6ba2e522 Revert "Move op memory storage to GrContext"
This reverts commit c8cee446bf.

Reason for revert: TSAN issues

Original change's description:
> Move op memory storage to GrContext
> 
> TBR=bsalomon@google.com
> Change-Id: Ifa95bf0073b9d948f2c937d10088b7734b971f90
> Reviewed-on: https://skia-review.googlesource.com/131500
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: Ia0d2b7408314d9b67d57388315376bbea23d3780
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/135181
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-06-15 15:59:45 +00:00
Greg Daniel
0e4a12b525 Don't explicitly include vulkan.h in the vulkan memory allocator.
Bug: skia:
Change-Id: I57dc374822fd22e25ef22d03345bdd2e159c7edd
Reviewed-on: https://skia-review.googlesource.com/135048
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-06-15 13:17:14 +00:00
Robert Phillips
c8cee446bf Move op memory storage to GrContext
TBR=bsalomon@google.com
Change-Id: Ifa95bf0073b9d948f2c937d10088b7734b971f90
Reviewed-on: https://skia-review.googlesource.com/131500
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-06-15 11:33:14 +00:00
Hal Canary
c640d0dc96 Revert "Revert "SkTypes: extract SkTo""
This reverts commit fdcfb8b7c2.

> Original change's description:
> > SkTypes: extract SkTo
> >
> > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09
> > Reviewed-on: https://skia-review.googlesource.com/133620
> > Reviewed-by: Mike Klein <mtklein@google.com>

Change-Id: Ida74fbc5c21248a724a5edbf9fae18a33bcb23aa
Reviewed-on: https://skia-review.googlesource.com/134506
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-06-14 14:55:17 +00:00
Greg Daniel
10a83da287 Add GrContext::MakeVulkan factory that doesn't take a ref'd GrVkBackendContext.
This is the first step towards removing the ref counted ness of GrVkBackendContext.

Bug: skia:
Change-Id: I38f8861dd093a6a6098dd2e421c26c41185320f7
Reviewed-on: https://skia-review.googlesource.com/134783
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-06-14 13:54:47 +00:00
Greg Daniel
da86e2822a Remove unused code that was used for late mip allocations.
This also includes removing code to support changing GrGpuResource's size
since we now have to way to ever change the size.

Bug: skia:
Change-Id: Id27a8bc3cc94f5b954beda528b209727ede10ef6
Reviewed-on: https://skia-review.googlesource.com/134503
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-06-13 18:06:56 +00:00
Hal Canary
fdcfb8b7c2 Revert "SkTypes: extract SkTo"
This reverts commit 2a2f675926.

Reason for revert: this appears to be what is holding up the Chrome roll.

Original change's description:
> SkTypes: extract SkTo
>
> Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09
> Reviewed-on: https://skia-review.googlesource.com/133620
> Reviewed-by: Mike Klein <mtklein@google.com>

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

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Iafd738aedfb679a23c061a51afe4b98a8d4cdfae
Reviewed-on: https://skia-review.googlesource.com/134504
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-06-13 13:45:47 +00:00
Hal Canary
2a2f675926 SkTypes: extract SkTo
Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09
Reviewed-on: https://skia-review.googlesource.com/133620
Reviewed-by: Mike Klein <mtklein@google.com>
2018-06-12 15:03:21 +00:00
Mike Klein
79aea6a147 trim #include <new> from SkPostConfig.h
Change-Id: I693ddcd4ade101ba4eb4102e03adce183aa1d672
Reviewed-on: https://skia-review.googlesource.com/133829
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-06-11 15:55:31 +00:00
Greg Daniel
09c9400695 Reland "Reland "Require mips to be allocated at texture creation time and disable late allocations.""
This reverts commit 01422bc8ef.

Reason for revert: follow on change may be ready

Original change's description:
> Revert "Reland "Require mips to be allocated at texture creation time and disable late allocations.""
> 
> This reverts commit 9eb36b9eb8.
> 
> Reason for revert: Alpha8 isn't renderable on es2 so we end up dropping draws on certain A8 mip requests
> 
> Original change's description:
> > Reland "Require mips to be allocated at texture creation time and disable late allocations."
> > 
> > This reverts commit 0c78238e29.
> > 
> > Reason for revert: <INSERT REASONING HERE>
> > 
> > Original change's description:
> > > Revert "Require mips to be allocated at texture creation time and disable late allocations."
> > > 
> > > This reverts commit cd2c3f9055.
> > > 
> > > Reason for revert: Looks to be causing angle failures on initial clear test
> > > 
> > > Original change's description:
> > > > Require mips to be allocated at texture creation time and disable late allocations.
> > > > 
> > > > If we get a non-mipped texture for a draw that wants to be use mip map filter, we
> > > > will copy the texture into a new mipped texture.
> > > > 
> > > > Clean up of unused code in the GPU backends for reallocating for mips will be done
> > > > in a follow up CL.
> > > > 
> > > > Bug: skia:
> > > > Change-Id: Idab588c1abf4bbbf7eeceb3727d500e5df274188
> > > > Reviewed-on: https://skia-review.googlesource.com/132830
> > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > > 
> > >
> > > 
> > > Change-Id: I49f0ace52f2586d61b451630b2e6aae84b420b81
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: skia:
> > > Reviewed-on: https://skia-review.googlesource.com/133041
> > > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > 
> > Bug: skia:
> > Change-Id: I004447a5f1ec72c3be2318ddea803f57efb12ea4
> > Reviewed-on: https://skia-review.googlesource.com/133340
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
> 
> Change-Id: I9e9718d380c4d9927ec39e46008750ab7396391f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/133680
> 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: Ic3df69f65a89962b21cdb50ee436a29fd121ab1f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/133740
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-06-08 23:01:44 +00:00
Greg Daniel
01422bc8ef Revert "Reland "Require mips to be allocated at texture creation time and disable late allocations.""
This reverts commit 9eb36b9eb8.

Reason for revert: Alpha8 isn't renderable on es2 so we end up dropping draws on certain A8 mip requests

Original change's description:
> Reland "Require mips to be allocated at texture creation time and disable late allocations."
> 
> This reverts commit 0c78238e29.
> 
> Reason for revert: <INSERT REASONING HERE>
> 
> Original change's description:
> > Revert "Require mips to be allocated at texture creation time and disable late allocations."
> > 
> > This reverts commit cd2c3f9055.
> > 
> > Reason for revert: Looks to be causing angle failures on initial clear test
> > 
> > Original change's description:
> > > Require mips to be allocated at texture creation time and disable late allocations.
> > > 
> > > If we get a non-mipped texture for a draw that wants to be use mip map filter, we
> > > will copy the texture into a new mipped texture.
> > > 
> > > Clean up of unused code in the GPU backends for reallocating for mips will be done
> > > in a follow up CL.
> > > 
> > > Bug: skia:
> > > Change-Id: Idab588c1abf4bbbf7eeceb3727d500e5df274188
> > > Reviewed-on: https://skia-review.googlesource.com/132830
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > 
> >
> > 
> > Change-Id: I49f0ace52f2586d61b451630b2e6aae84b420b81
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: skia:
> > Reviewed-on: https://skia-review.googlesource.com/133041
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> Bug: skia:
> Change-Id: I004447a5f1ec72c3be2318ddea803f57efb12ea4
> Reviewed-on: https://skia-review.googlesource.com/133340
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: I9e9718d380c4d9927ec39e46008750ab7396391f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/133680
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-06-08 22:01:23 +00:00
Greg Daniel
9eb36b9eb8 Reland "Require mips to be allocated at texture creation time and disable late allocations."
This reverts commit 0c78238e29.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Require mips to be allocated at texture creation time and disable late allocations."
> 
> This reverts commit cd2c3f9055.
> 
> Reason for revert: Looks to be causing angle failures on initial clear test
> 
> Original change's description:
> > Require mips to be allocated at texture creation time and disable late allocations.
> > 
> > If we get a non-mipped texture for a draw that wants to be use mip map filter, we
> > will copy the texture into a new mipped texture.
> > 
> > Clean up of unused code in the GPU backends for reallocating for mips will be done
> > in a follow up CL.
> > 
> > Bug: skia:
> > Change-Id: Idab588c1abf4bbbf7eeceb3727d500e5df274188
> > Reviewed-on: https://skia-review.googlesource.com/132830
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
>
> 
> Change-Id: I49f0ace52f2586d61b451630b2e6aae84b420b81
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/133041
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

Bug: skia:
Change-Id: I004447a5f1ec72c3be2318ddea803f57efb12ea4
Reviewed-on: https://skia-review.googlesource.com/133340
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-06-08 17:39:33 +00:00
Greg Daniel
0c78238e29 Revert "Require mips to be allocated at texture creation time and disable late allocations."
This reverts commit cd2c3f9055.

Reason for revert: Looks to be causing angle failures on initial clear test

Original change's description:
> Require mips to be allocated at texture creation time and disable late allocations.
> 
> If we get a non-mipped texture for a draw that wants to be use mip map filter, we
> will copy the texture into a new mipped texture.
> 
> Clean up of unused code in the GPU backends for reallocating for mips will be done
> in a follow up CL.
> 
> Bug: skia:
> Change-Id: Idab588c1abf4bbbf7eeceb3727d500e5df274188
> Reviewed-on: https://skia-review.googlesource.com/132830
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: I49f0ace52f2586d61b451630b2e6aae84b420b81
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/133041
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-06-07 20:11:33 +00:00
Greg Daniel
cd2c3f9055 Require mips to be allocated at texture creation time and disable late allocations.
If we get a non-mipped texture for a draw that wants to be use mip map filter, we
will copy the texture into a new mipped texture.

Clean up of unused code in the GPU backends for reallocating for mips will be done
in a follow up CL.

Bug: skia:
Change-Id: Idab588c1abf4bbbf7eeceb3727d500e5df274188
Reviewed-on: https://skia-review.googlesource.com/132830
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-06-07 19:35:01 +00:00
Khushal
fa8ff09457 fonts: Hook up FallbackTextHelper to font remoting.
Use GrContext::FallbackTextHelper in SkTextBlobCacheDiffCanvas to
replicate glyph generation logic for fallback text during analysis. This
ensures that we correctly handle these fallback cases when using
distance field or paths for text rendering.

R=herb@google.com, jvanverth@google.com

Bug: skia:7913
Change-Id: I3067c4f1bd09231a564ac7c4cd89efcb876d2abd
Reviewed-on: https://skia-review.googlesource.com/132285
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
2018-06-07 18:03:11 +00:00
Greg Daniel
dc636203f4 Add guard around GrVkBackendContext::Create function.
Just want to make sure the use of this doesn't leak out to other users
as I work on removing it.

Bug: skia:
Change-Id: I5ecf11615db64bd489065e6f67e0e1d4bb3298eb
Reviewed-on: https://skia-review.googlesource.com/132831
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-06-07 16:32:11 +00:00
Greg Daniel
8683037a2e Always keep buffers in vulkan persistently mapped.
This should hopefully fix (and possibly even improve) some of the perf
regressions we had form switching the memory allocator which were caused
by us now mapping and unmapping the entire VkDeviceMemory instead of just
subsets.

Bug: skia:
Change-Id: Ia8232594f33003e88969bf16febea4e4eec0ac95
Reviewed-on: https://skia-review.googlesource.com/131443
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2018-06-01 18:01:26 +00:00
Brian Osman
2b23c4bf31 Dest color space no longer impacts mipmaps or texture sampling
PS5: Removes SkDestinationSurfaceColorMode, tracking of mipmap
mode on GrTexture, sRGB decode state per-texture. Because we
were often choosing sRGB configs for RGB color types, legacy
rendering would then be incorrect (too dark). So...

PS7: Stops ever using sRGB pixel configs when translating
image info or color type. Also removes a bunch of GrCaps bits
and a GrContextOption that are no longer relevant.

PS9: Adjusts surface creation unit test expectations, and
changes the raster rules accordingly.

At this point, sRGB configs are (obviously) going to be broken.

Locally, I ran 8888, gl, and the gbr- versions of both. Across
all GMs x configs, there are 13 diffs. 12 are GMs that create
surfaces with a color-space attached (and thus, the offscreen
is no longer getting sRGB pixel config). The only remainder
constructs an SkPictureImageGenerator, (with an attached color
space) and renders it to the gbr-gl canvas, which triggers a
a tagged surface inside the generator.

Bug: skia:
Change-Id: Ie5edfa157dd799f3121e8173fc4f97f6c8ed6789
Reviewed-on: https://skia-review.googlesource.com/131282
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-06-01 17:00:26 +00:00
Greg Daniel
81df0414c8 Reland "Use GrVkMemoryAllocator for vulkan memory allocations in ganesh."
This is a reland of 331c266ed7

Original change's description:
> Use GrVkMemoryAllocator for vulkan memory allocations in ganesh.
> 
> Besides using the new allocator, the big logical change is that map
> and unmap calls form GrVkMemory are specc'd to map the entire GrVkAlloc
> instead of a specific offset and size as they did before. As a
> consequence of this, we move the handling of non-coherent alignment
> for flush/invalidate calls to GrVkMemory instead of the callers.
> 
> Bug: skia:
> Change-Id: I794d713106602f27aa7e808c306bbb69fd2b67be
> Reviewed-on: https://skia-review.googlesource.com/130021
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>

Bug: skia:
Change-Id: Ia9a4192d344449fb444d2adaa1d62ff1ede4b21d
Reviewed-on: https://skia-review.googlesource.com/131083
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-05-31 18:21:25 +00:00
Greg Daniel
a9d3dae67a Revert "Use GrVkMemoryAllocator for vulkan memory allocations in ganesh."
This reverts commit 331c266ed7.

Reason for revert: breaking an intel vulkan bot

Original change's description:
> Use GrVkMemoryAllocator for vulkan memory allocations in ganesh.
> 
> Besides using the new allocator, the big logical change is that map
> and unmap calls form GrVkMemory are specc'd to map the entire GrVkAlloc
> instead of a specific offset and size as they did before. As a
> consequence of this, we move the handling of non-coherent alignment
> for flush/invalidate calls to GrVkMemory instead of the callers.
> 
> Bug: skia:
> Change-Id: I794d713106602f27aa7e808c306bbb69fd2b67be
> Reviewed-on: https://skia-review.googlesource.com/130021
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>

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

Change-Id: I5237c00625dc95d3d9b36c1e5591762988d85562
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/131081
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-05-30 22:59:08 +00:00
Greg Daniel
de81143630 Revert "Move include into head to fix build breakage."
This reverts commit fac695317f.

Reason for revert: needed to revert early change

Original change's description:
> Move include into head to fix build breakage.
> 
> Bug: skia:
> Change-Id: I47e182bf18f56c9c0749a1fd79b85d26fce9887e
> Reviewed-on: https://skia-review.googlesource.com/131022
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Auto-Submit: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: Ie396d213c2e43e053a6c6df9cfb18ac4be8b909c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/131080
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-05-30 22:58:28 +00:00
Greg Daniel
fac695317f Move include into head to fix build breakage.
Bug: skia:
Change-Id: I47e182bf18f56c9c0749a1fd79b85d26fce9887e
Reviewed-on: https://skia-review.googlesource.com/131022
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-05-30 21:25:49 +00:00
Greg Daniel
331c266ed7 Use GrVkMemoryAllocator for vulkan memory allocations in ganesh.
Besides using the new allocator, the big logical change is that map
and unmap calls form GrVkMemory are specc'd to map the entire GrVkAlloc
instead of a specific offset and size as they did before. As a
consequence of this, we move the handling of non-coherent alignment
for flush/invalidate calls to GrVkMemory instead of the callers.

Bug: skia:
Change-Id: I794d713106602f27aa7e808c306bbb69fd2b67be
Reviewed-on: https://skia-review.googlesource.com/130021
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2018-05-30 19:52:38 +00:00
Greg Daniel
18dbfd05e4 Reland "Create API for GrVkMemoryAllocator and impliment use of AMD VulkanMemoryAllocator on this API."
This reverts commit 98bddf930e.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Create API for GrVkMemoryAllocator and impliment use of AMD VulkanMemoryAllocator on this API."
> 
> This reverts commit 26c0e4c1f5.
> 
> Reason for revert: breaks roll into fuchsia
> 
> Original change's description:
> > Create API for GrVkMemoryAllocator and impliment use of AMD VulkanMemoryAllocator on this API.
> > 
> > Bug: skia:
> > Change-Id: I1e122e1b11ab308c2f83cb98c36c81511f4507d0
> > Reviewed-on: https://skia-review.googlesource.com/129980
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> 
> 
> 
> Change-Id: I6c74978f778987c422e6162e7dd85ea9c6baa0e4
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/130182
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

Bug: skia:
Change-Id: I422ffb3562da567f2e85c806286ad1a17c3862cd
Reviewed-on: https://skia-review.googlesource.com/130183
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-05-30 13:27:38 +00:00
Greg Daniel
98bddf930e Revert "Create API for GrVkMemoryAllocator and impliment use of AMD VulkanMemoryAllocator on this API."
This reverts commit 26c0e4c1f5.

Reason for revert: breaks roll into fuchsia

Original change's description:
> Create API for GrVkMemoryAllocator and impliment use of AMD VulkanMemoryAllocator on this API.
> 
> Bug: skia:
> Change-Id: I1e122e1b11ab308c2f83cb98c36c81511f4507d0
> Reviewed-on: https://skia-review.googlesource.com/129980
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>

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

Change-Id: I6c74978f778987c422e6162e7dd85ea9c6baa0e4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/130182
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-05-25 17:25:23 +00:00
Greg Daniel
26c0e4c1f5 Create API for GrVkMemoryAllocator and impliment use of AMD VulkanMemoryAllocator on this API.
Bug: skia:
Change-Id: I1e122e1b11ab308c2f83cb98c36c81511f4507d0
Reviewed-on: https://skia-review.googlesource.com/129980
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2018-05-25 15:24:42 +00:00
Khushal
3e7548ca60 Reland fonts: Add support for distance field text to font remoting.
This reverts commit 7257e22e43.

TBR=herb@google.com, bsalomon@google.com
Bug: skia:7913
Change-Id: I51ca5bccdda64cd98e2ad59874e7136ee58cec10
Reviewed-on: https://skia-review.googlesource.com/129809
Reviewed-by: Khusal Sagar <khushalsagar@chromium.org>
Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
2018-05-24 01:11:21 +00:00
Mike Klein
7257e22e43 Revert "fonts: Add support for distance field text to font remoting."
This reverts commit 35e0a1a690.

Reason for revert: looks like we're leaking paths?
https://chromium-swarm.appspot.com/task?id=3da25e2f0cadb210&refresh=10

Original change's description:
> fonts: Add support for distance field text to font remoting.
> 
> R=​jvanverth@google.com, herb@google.com
> 
> Bug: skia:7913
> Change-Id: Id3f5b3e75005be9a7234df774268359b406c99a8
> Reviewed-on: https://skia-review.googlesource.com/128970
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>

TBR=jvanverth@google.com,bsalomon@google.com,bungeman@google.com,herb@google.com,khushalsagar@chromium.org

Change-Id: I37c54c8748db9b20e1f48016d8298808a1999fdb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7913
Reviewed-on: https://skia-review.googlesource.com/129681
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-05-23 00:17:16 +00:00
Khushal
35e0a1a690 fonts: Add support for distance field text to font remoting.
R=jvanverth@google.com, herb@google.com

Bug: skia:7913
Change-Id: Id3f5b3e75005be9a7234df774268359b406c99a8
Reviewed-on: https://skia-review.googlesource.com/128970
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
2018-05-22 19:49:45 +00:00
Ben Wagner
d90cd3b279 Revert "Revert "IWYU for tests starting with 'D'.""
This reverts commit edf8449d2c.

Change-Id: Ibeedd9965855b3ccfe44486d15307bf3da15fd9c
Reviewed-on: https://skia-review.googlesource.com/129516
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-05-22 17:12:35 +00:00
Mike Klein
edf8449d2c Revert "IWYU for tests starting with 'D'."
This reverts commit b5f2897ab5.

Reason for revert: looks like this broke the build for DM in Google3.  Need more include dirs there?

Original change's description:
> IWYU for tests starting with 'D'.
> 
> Change-Id: I9189e4b56ce1635b627119733447c2ed4220753d
> Reviewed-on: https://skia-review.googlesource.com/129319
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

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

Change-Id: I01aac7dae6114685a0652cbde3defccc8a42caea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/129443
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-05-22 12:23:15 +00:00
Ben Wagner
b5f2897ab5 IWYU for tests starting with 'D'.
Change-Id: I9189e4b56ce1635b627119733447c2ed4220753d
Reviewed-on: https://skia-review.googlesource.com/129319
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-05-21 19:34:48 +00:00
Greg Daniel
6d138bf681 Reland "Remove GrBackendObject and all related functions from Skia."
This is a reland of ccd4cfc23e

Original change's description:
> Remove GrBackendObject and all related functions from Skia.
> 
> Bug: skia:
> Change-Id: I59434b7477c0bc26fd982bd81eb97ab94bbba073
> Reviewed-on: https://skia-review.googlesource.com/125822
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

Bug: skia:
Change-Id: Ibd1b9bd04b36840d9d872e2f0970dd6bac378bc9
Reviewed-on: https://skia-review.googlesource.com/129380
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-05-21 18:25:38 +00:00
Adrienne Walker
4ee88511bc Driver bug workaround: unbind_attachments_on_bound_render_fbo_delete
Bug: chromium: 829614
Change-Id: Ic6bc276d1203d24f96fe92b41655871e25f69623
Reviewed-on: https://skia-review.googlesource.com/128395
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adrienne Walker <enne@chromium.org>
2018-05-18 17:26:14 +00:00
Adrienne Walker
c48f776682 Driver bug workaround: pack_parameters_workaround_with_pack_buffer
Bug: chromium: 829614
Change-Id: I3fae2b4181e4a6e37fb31fe2f2e9a6cfacb1860f
Reviewed-on: https://skia-review.googlesource.com/128206
Commit-Queue: Adrienne Walker <enne@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-05-16 19:45:42 +00:00
Adrienne Walker
94f585ed09 Driver bug workaround: gl_clear_broken
Skia does not appear to use depth buffers and this appears to be
identical to ClearFramebufferResourceManager::ClearFramebuffer in
Chromium code.  Therefore, just hook up this workaround to turn
on these internal Skia workarounds.

Bug: chromium: 829614
Change-Id: Icc5f2eb981e39ffef487efa16940d2e50cdbc399
Reviewed-on: https://skia-review.googlesource.com/127220
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adrienne Walker <enne@chromium.org>
2018-05-16 18:31:22 +00:00
Adrienne Walker
3ed3399a93 Driver bug workaround: restore_scissor_on_fbo_change
Bug: chromium: 829614
Change-Id: I333aed9a378ab9b7aafaa96bb495378d1db4a61d
Reviewed-on: https://skia-review.googlesource.com/127118
Commit-Queue: Adrienne Walker <enne@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-05-16 18:19:52 +00:00
Adrienne Walker
d7c7978d8c Driver bug workaround: max_msaa_sample_count_4
Bug: chromium: 829614
Change-Id: I54054191815ace6159585dab7dd811ebdc863095
Reviewed-on: https://skia-review.googlesource.com/126983
Commit-Queue: Adrienne Walker <enne@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-05-15 22:10:43 +00:00
Adrienne Walker
001cae07d3 Driver bug workaround: disallow_large_instanced_draw
Bug: chromium: 829614
Change-Id: I3c64cd360674f08b4ca3c4a2d0ef946e40a5c60a
Reviewed-on: https://skia-review.googlesource.com/126751
Commit-Queue: Adrienne Walker <enne@chromium.org>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2018-05-15 22:06:43 +00:00
Adrienne Walker
724afe8b2d Driver bug workaround: max_texture_size_limit_4096
Bug: chromium: 829614
Change-Id: I127157fa04df2ec6505411aa42f1232910e251d4
Reviewed-on: https://skia-review.googlesource.com/126608
Commit-Queue: Adrienne Walker <enne@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-05-15 19:56:23 +00:00
Adrienne Walker
0e38394ffc Reland "Driver bug workaround: disable_discard_framebuffer"
This is a reland of f31fece658

Original change's description:
> Driver bug workaround: disable_discard_framebuffer
>
> Bug: chromium: 829614
> Change-Id: I285b39b31a370247518e3a0b56ac4ea54f38c0c0
> Reviewed-on: https://skia-review.googlesource.com/126749
> Commit-Queue: Adrienne Walker <enne@chromium.org>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Auto-Submit: Adrienne Walker <enne@chromium.org>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Bug: chromium: 829614
Change-Id: I6cc2de11a6315ff224c90551e8dd3e1d1dd4139a
Reviewed-on: https://skia-review.googlesource.com/128108
Commit-Queue: Adrienne Walker <enne@chromium.org>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Adrienne Walker <enne@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-05-15 18:58:23 +00:00
Adrienne Walker
683148419e Reland "Driver bug workaround: disable_blend_equation_advanced"
This is a reland of f31fece658

Original change's description:
> Driver bug workaround: disable_blend_equation_advanced
>
> Bug: chromium: 829614
> Change-Id: If8eaec6d22412ec36aad8a143f84080be05f2926
> Reviewed-on: https://skia-review.googlesource.com/126748
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Adrienne Walker <enne@chromium.org>

Bug: chromium: 829614
Change-Id: Idd36ff90a99336521ef5d47f0d7baf079c1bda09
Reviewed-on: https://skia-review.googlesource.com/128107
Commit-Queue: Adrienne Walker <enne@chromium.org>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Adrienne Walker <enne@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-05-15 18:09:43 +00:00
Adrienne Walker
ab7181daad Reland "Add driver bug workarounds to GrCaps"
This is a reland of 328490c6a1

Original change's description:
> Add driver bug workarounds to GrCaps
> 
> This moves GrDriverBugWorkarounds to include so that it can be included
> by GrCaps.  This also makes GrContextOptions a nearly empty class in
> the case of !SK_SUPPORT_GPU so that non-gpu builds don't need to build
> in GrDriverBugWorkarounds.cpp.
> 
> Bug: chromium: 829614
> Change-Id: Iedf73677fd09e9a487cfe618a696fd4b25c8703d
> Reviewed-on: https://skia-review.googlesource.com/126581
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Adrienne Walker <enne@chromium.org>

Bug: chromium: 829614
Change-Id: I7b539f99caa3032c8c595dd5068dc3b179747ccd
Reviewed-on: https://skia-review.googlesource.com/127304
Commit-Queue: Adrienne Walker <enne@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-05-14 23:46:49 +00:00
Brian Salomon
79bf7ac3f4 Include SkUnPremultiply.h in GrContext.h to fix Android compile
Change-Id: Iab23ebbc0e3c639d4f0589ab3e8ae458b85b3298
Reviewed-on: https://skia-review.googlesource.com/127396
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
2018-05-11 17:43:57 +00:00
Brian Salomon
103d6f616b Define ~GrContextThreadSafeProxy in GrContext.cpp
Otherwise GrCaps.h may be required in GrContext.h

Change-Id: I67b2116b3bad2e7ebbb2157375c48023d2964f5c
Reviewed-on: https://skia-review.googlesource.com/127394
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
2018-05-11 15:58:17 +00:00
Brian Salomon
c7fe0f708c Make GrCaps and GrShaderCaps private.
Moves getCaps() from GrContext to GrContextPriv and removes unused refCaps().

Change-Id: Ic6a8951b656c0d1b2773eae73bff8e88af819866
Reviewed-on: https://skia-review.googlesource.com/127389
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-05-11 14:47:27 +00:00
Brian Osman
a0ca909142 Revert "Remove GrBackendObject and all related functions from Skia."
This reverts commit ccd4cfc23e.

Reason for revert: Fuchsia not building again. (Flutter roll may have been reverted?)

Original change's description:
> Remove GrBackendObject and all related functions from Skia.
> 
> Bug: skia:
> Change-Id: I59434b7477c0bc26fd982bd81eb97ab94bbba073
> Reviewed-on: https://skia-review.googlesource.com/125822
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ie2c518b84b0c9513c0c622082de2831088b1ad8d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/127480
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-05-10 22:04:20 +00:00
Brian Salomon
52aacd602f Add GrContextThreadSafeProxy and remove most friends of GrContextThreadSafeProxy
A step towards removing GrCaps from GrContext.h

Also adds operator== to GrContextThreadSafeProxy.

Change-Id: Ic0bae12299dfb0ac8817d9f1c56a1219d6df97d9
Reviewed-on: https://skia-review.googlesource.com/127329
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-05-10 19:14:16 +00:00
Greg Daniel
024615e975 Revert "Add driver bug workarounds to GrCaps"
This reverts commit 328490c6a1.

Reason for revert: Breaking compiles inside chrome

Original change's description:
> Add driver bug workarounds to GrCaps
> 
> This moves GrDriverBugWorkarounds to include so that it can be included
> by GrCaps.  This also makes GrContextOptions a nearly empty class in
> the case of !SK_SUPPORT_GPU so that non-gpu builds don't need to build
> in GrDriverBugWorkarounds.cpp.
> 
> Bug: chromium: 829614
> Change-Id: Iedf73677fd09e9a487cfe618a696fd4b25c8703d
> Reviewed-on: https://skia-review.googlesource.com/126581
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Adrienne Walker <enne@chromium.org>

TBR=bsalomon@google.com,enne@chromium.org

Change-Id: I3b35bf65a7b78d2fe16d7c2bcd0e4b3f9bb7fdff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium: 829614
Reviewed-on: https://skia-review.googlesource.com/127303
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-05-10 17:30:00 +00:00
Greg Daniel
636d803322 Revert "Driver bug workaround: disable_blend_equation_advanced"
This reverts commit f31fece658.

Reason for revert: need to revert to revert original change breaking chrome compile

Original change's description:
> Driver bug workaround: disable_blend_equation_advanced
> 
> Bug: chromium: 829614
> Change-Id: If8eaec6d22412ec36aad8a143f84080be05f2926
> Reviewed-on: https://skia-review.googlesource.com/126748
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Adrienne Walker <enne@chromium.org>

TBR=bsalomon@google.com,enne@chromium.org

Change-Id: Ic870fbbad615d13569254c355ef6b8281332d60d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium: 829614
Reviewed-on: https://skia-review.googlesource.com/127301
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-05-10 17:25:26 +00:00
Greg Daniel
0b1e628835 Revert "Driver bug workaround: disable_discard_framebuffer"
This reverts commit 8aa0dca395.

Reason for revert: need to revert to revert original change breaking chrome compile

Original change's description:
> Driver bug workaround: disable_discard_framebuffer
> 
> Bug: chromium: 829614
> Change-Id: I285b39b31a370247518e3a0b56ac4ea54f38c0c0
> Reviewed-on: https://skia-review.googlesource.com/126749
> Commit-Queue: Adrienne Walker <enne@chromium.org>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Auto-Submit: Adrienne Walker <enne@chromium.org>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,enne@chromium.org

Change-Id: I563808025a8f77807478c0f0d42c3009c3b57ea5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium: 829614
Reviewed-on: https://skia-review.googlesource.com/127302
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-05-10 17:24:56 +00:00
Adrienne Walker
8aa0dca395 Driver bug workaround: disable_discard_framebuffer
Bug: chromium: 829614
Change-Id: I285b39b31a370247518e3a0b56ac4ea54f38c0c0
Reviewed-on: https://skia-review.googlesource.com/126749
Commit-Queue: Adrienne Walker <enne@chromium.org>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Adrienne Walker <enne@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-05-10 17:00:25 +00:00
Adrienne Walker
f31fece658 Driver bug workaround: disable_blend_equation_advanced
Bug: chromium: 829614
Change-Id: If8eaec6d22412ec36aad8a143f84080be05f2926
Reviewed-on: https://skia-review.googlesource.com/126748
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adrienne Walker <enne@chromium.org>
2018-05-10 16:01:15 +00:00
Adrienne Walker
328490c6a1 Add driver bug workarounds to GrCaps
This moves GrDriverBugWorkarounds to include so that it can be included
by GrCaps.  This also makes GrContextOptions a nearly empty class in
the case of !SK_SUPPORT_GPU so that non-gpu builds don't need to build
in GrDriverBugWorkarounds.cpp.

Bug: chromium: 829614
Change-Id: Iedf73677fd09e9a487cfe618a696fd4b25c8703d
Reviewed-on: https://skia-review.googlesource.com/126581
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adrienne Walker <enne@chromium.org>
2018-05-10 14:54:15 +00:00
Greg Daniel
ccd4cfc23e Remove GrBackendObject and all related functions from Skia.
Bug: skia:
Change-Id: I59434b7477c0bc26fd982bd81eb97ab94bbba073
Reviewed-on: https://skia-review.googlesource.com/125822
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-05-10 14:44:55 +00:00
Brian Osman
06d374694a Add fPreferExternalImagesOverES3 to GrContextOptions
This forces us to use the ES2 shading language when we have an ES3
context, but the driver claims to only support GL_OES_EGL_image_external
(and not the _essl3 variant). Many of these devices will work correctly
if we blindly enable both extensions, but there are some that won't.

Bug: skia:
Change-Id: Id632003a1905ea61b46166befd30905a57cead69
Reviewed-on: https://skia-review.googlesource.com/126681
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-05-09 17:58:15 +00:00
Greg Daniel
ba2c826038 Implement canCopySurface for GrMock and GrMtl.
Bug: skia:
Change-Id: I60730bacb03b43e872c68fd7eb8e845ac0910f67
Reviewed-on: https://skia-review.googlesource.com/125730
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>
2018-05-03 20:13:02 +00:00
Greg Daniel
b73a9f8b96 Add internal grsurface flag to track if using gl rectangle or external texture.
Bug: skia:
Change-Id: I84963833bbc3ae957c919a19f6e78fce2c9de7ef
Reviewed-on: https://skia-review.googlesource.com/125294
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-05-02 21:34:58 +00:00
Greg Daniel
a070ed7fcc Add InternalSurfaceFlag so we know if RenderTargetProxys and RenderTargets use GL FBO 0.
Bug: skia:7748
Change-Id: I2fda3cde12ccdef19fe06ff287a8024b58d28ef0
Reviewed-on: https://skia-review.googlesource.com/124048
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-04-26 21:44:43 +00:00
Greg Daniel
25af671a3d Add GrCap check for whether we can do a copy or not, and implement in Vk backend
Today, we only know if we fail a copy during the flush so we have no
way to cleanly handle a failed copy. This will allow us to know if we'll
fail a copy during recording and allow us to do some appropriate fallback
and/or dropping of the draw.

Bug: skia:
Change-Id: I38f209dbd4ebb4e762210b4609147d4b0a1b01b1
Reviewed-on: https://skia-review.googlesource.com/123560
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-04-25 19:38:57 +00:00
Chris Dalton
91ab155884 Always call endFlush on opLists that might survive a flush
We were missing a few that got unreffed due to failed proxy
instantiation.

Bug: skia:7655
Bug: skia:7111
Change-Id: I95847a16890f2993a1433d4d9fdaa8a4a6c2f0b6
Reviewed-on: https://skia-review.googlesource.com/122121
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-04-18 20:00:53 +00:00
Brian Osman
061020eab4 With ES3, enable both ES2 and ES3 external image extensions
Bug: skia:7713
Change-Id: If06c0368e91c33bbac9e7715227d619c4834684f
Reviewed-on: https://skia-review.googlesource.com/121884
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-04-18 19:13:13 +00:00
Greg Daniel
7444c3c518 Revert "Delete getRenderTargetHandle call on SkSurface."
This reverts commit c828109ebd.

Reason for revert: Need to fix flutter

Original change's description:
> Delete getRenderTargetHandle call on SkSurface.
> 
> All clients and internal code should be switched (once changes land soon)
> to the new getBackendRenderTarget call instead.
> 
> Bug: skia:
> Change-Id: I6f490b6d26a72f37f97216be04e541483206510d
> Reviewed-on: https://skia-review.googlesource.com/121103
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

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

Bug: skia:
Change-Id: I571298f839757fcdedcd8117519e740ac7ef1344
Reviewed-on: https://skia-review.googlesource.com/121480
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-04-14 18:08:12 +00:00
Greg Daniel
c828109ebd Delete getRenderTargetHandle call on SkSurface.
All clients and internal code should be switched (once changes land soon)
to the new getBackendRenderTarget call instead.

Bug: skia:
Change-Id: I6f490b6d26a72f37f97216be04e541483206510d
Reviewed-on: https://skia-review.googlesource.com/121103
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-04-12 19:41:10 +00:00
Robert Phillips
ba375a8884 Add SK_SUPPORT_LEGACY_BACKEND_OBJECTS
This relies on the Chrome CL: https://chromium-review.googlesource.com/c/chromium/src/+/999796 (Add SK_SUPPORT_LEGACY_BACKEND_OBJECTS to SkUserConfig.h) landing first.

Change-Id: Ie0a2b7b84cc02e46957765a0a7d6444a5320769d
Reviewed-on: https://skia-review.googlesource.com/119140
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-04-12 14:56:10 +00:00
Greg Daniel
323fbcf6d1 Move GrBackendRenderTarget over to new system of getting backed infos
Bug: skia:
Change-Id: I3927390894715e8424b3d0240dad3ee6cd03dc38
Reviewed-on: https://skia-review.googlesource.com/120181
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-04-11 11:14:58 +00:00
Greg Daniel
ff7fa50f0c Add ctor to GrVkImageInfo.
Adds an additional ctor so clients who used brace initialization on the
struct don't break.

Bug: skia:
Change-Id: I78ebdbe8242147e48859f2234265365141fe81b1
Reviewed-on: https://skia-review.googlesource.com/120185
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-04-10 17:41:32 +00:00
Greg Daniel
52e16d9848 Update getBackendInfo calls on GrBackendTexture to support VkImageLayout better.
The big api level change here is that the getBackendInfo calls now return by value
instead of a pointer. These changes are being made in support of Vulkan so that
the client can update the VkImageLayout on the GrBackendTexture and have that
update get reflected in our internal tracking of the image. This is done by storing
a ref counted GrVkImageLayout object on the GrBackendTexture and the GrVkImage.

Bug: skia:
Change-Id: I8c6158fd3a66eb61fef97ebf09ea5364bca3f1ae
Reviewed-on: https://skia-review.googlesource.com/119101
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-04-10 14:20:22 +00:00
Brian Salomon
a7b8e74eb6 Reland "Remove deprectated GrContext::MakeGL overloads that take raw ptr"
This reverts commit 87f852d1a3.

Reason for revert: Google3 updated

Original change's description:
> Revert "Remove deprectated GrContext::MakeGL overloads that take raw ptr"
> 
> This reverts commit efa60a1d13.
> 
> Reason for revert: Surprise! Google3 still uses these.
> 
> Original change's description:
> > Remove deprectated GrContext::MakeGL overloads that take raw ptr
> > 
> > Change-Id: Iae12bf61fa1e2f5d4b13b98198cddb7482656fdf
> > Reviewed-on: https://skia-review.googlesource.com/118660
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com
> 
> Change-Id: Ica09d80e1563924a286a4a6aa8a1f93cb5ca9c5d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/119001
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

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

Change-Id: I87c12253f759a97cb4da3ff35dc1ec846513caef
Reviewed-on: https://skia-review.googlesource.com/119921
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-04-09 17:14:46 +00:00
Brian Salomon
c1b9c1005f Add versions of MakeGL() that don't require include GrGLInterface.h in order to use the GrGLMakeNativeInterface
Change-Id: I77bd3c683c284aecc50a3552bbf1fb901f1bcc44
Reviewed-on: https://skia-review.googlesource.com/119002
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-04-06 14:44:53 +00:00
Greg Daniel
9ca3065ca5 Don't use GrPixelConfig value as proxy for valid on GrBackendSurface.
Bug: skia:
Change-Id: I275b74b915240c9918bb2efa6a9708341f3bb189
Reviewed-on: https://skia-review.googlesource.com/119004
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-04-06 14:42:23 +00:00
Robert Phillips
87f852d1a3 Revert "Remove deprectated GrContext::MakeGL overloads that take raw ptr"
This reverts commit efa60a1d13.

Reason for revert: Surprise! Google3 still uses these.

Original change's description:
> Remove deprectated GrContext::MakeGL overloads that take raw ptr
> 
> Change-Id: Iae12bf61fa1e2f5d4b13b98198cddb7482656fdf
> Reviewed-on: https://skia-review.googlesource.com/118660
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ica09d80e1563924a286a4a6aa8a1f93cb5ca9c5d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/119001
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-04-05 19:37:49 +00:00
Brian Salomon
efa60a1d13 Remove deprectated GrContext::MakeGL overloads that take raw ptr
Change-Id: Iae12bf61fa1e2f5d4b13b98198cddb7482656fdf
Reviewed-on: https://skia-review.googlesource.com/118660
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-04-05 17:23:22 +00:00
Brian Salomon
f932a6328a Add maxTextureSize()/maxRenderTargetSize() to GrContext
This provides an alternative way to access these values which will allow removal GrContext::caps() from public API

Change-Id: I53d3c00563da8847e1fc14aea9750dc9fd90d1e5
Reviewed-on: https://skia-review.googlesource.com/118962
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-04-05 17:21:32 +00:00
Robert Phillips
8caf85f9f4 Add GrBackendTexture/RenderTarget accessors to SkSurface
Change-Id: I63477fd4b8d48dc50af72736f0f8df566cd96d4a
Reviewed-on: https://skia-review.googlesource.com/85220
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-04-05 14:21:07 +00:00
Robert Phillips
c5509955b9 Add GrBackendTexture accessor to SkImage (take 2)
This makes accessing the GPU resource behind an SkImage a lot more typesafe. Additionally, the GrBackendObject is being deprecated so this is the path forward.

I split the controversial stuff off into https://skia-review.googlesource.com/c/skia/+/118575 (Add SkImage::setLayout call).

Change-Id: I297e72770e8fb360fac7c7cd74f050ae759ae133
Reviewed-on: https://skia-review.googlesource.com/118571
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-04-04 20:34:28 +00:00
Robert Phillips
c1267c6051 Add SkSurfaceCharacterization operator== && !=
TBR=bsalomon@google.com
Change-Id: Ic58849dcb3be1f00431f897af328f6f3c3f00d75
Reviewed-on: https://skia-review.googlesource.com/118340
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-04-04 15:41:48 +00:00