Commit Graph

1159 Commits

Author SHA1 Message Date
Jim Van Verth
8664a1d7d7 Add ear-clipping code to triangulate simple polygons.
Use this to fill concave shadows.

Bug: skia:7971
Change-Id: I63dc1ed845f9fa3fcd86f1ad13b03da23cae0313
Reviewed-on: https://skia-review.googlesource.com/135200
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-06-29 13:29:57 +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
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
Timothy Liang
2df9b45ab9 added TextureRenderTarget to Metal gpu backend
Bug: skia:
Change-Id: I5cacdb832deefe0f8d8460ff10b2216d5dec1ed7
Reviewed-on: https://skia-review.googlesource.com/137890
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Timothy Liang <timliang@google.com>
2018-06-28 15:30:57 +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
Ben Wagner
4f0a011bd6 Improve CMakeLists.txt auto regeneration.
Check that the re-generation could actually run ninja.

Specify the gn_deps by absolute path names.

Depend on the gn_to_cmake.py generator.

Change-Id: I5f93031d35f0b239b899fe1716fb1f6a4c67f77e
Reviewed-on: https://skia-review.googlesource.com/137397
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2018-06-26 20:33:29 +00:00
Mike Reed
538e1a10b7 move blurimagefilter.cpp back into effects
Bug: skia:
Change-Id: I5711a9a8fcd135344e75cb4b505bd06044414c85
Reviewed-on: https://skia-review.googlesource.com/137581
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-06-26 15:01:52 +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
Greg Daniel
7454cbdd15 Add legacy flag for vulkan interface for flutter.
Bug: skia:
Change-Id: I50eb5c331b4a5818037155865d477914276a983c
Reviewed-on: https://skia-review.googlesource.com/137194
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-06-23 02:30:22 +00:00
Ben Wagner
37a06c063c Reland "Implement onMakeClone(const SkFontArguments& args) in class SkTypeface_fontconfig."
This reverts commit cce82d2b7c.

Reason for revert: Just add suppression.

Original change's description:
> Revert "Implement onMakeClone(const SkFontArguments& args) in class SkTypeface_fontconfig."
>
> This reverts commit 96b1ecc25d.
>
> Reason for revert: Breaking Google3, I think
>
> Original change's description:
> > Implement onMakeClone(const SkFontArguments& args) in class SkTypeface_fontconfig.
> >
> > Create FontMgrFontConfigTest.cpp file to test the above function.
> >
> > Change-Id: I7716355f702af3d6f25574305914f0b82a4147ce
> > Reviewed-on: https://skia-review.googlesource.com/137133
> > Reviewed-by: Ben Wagner <bungeman@google.com>
> > Commit-Queue: Ben Wagner <bungeman@google.com>
>
> TBR=bungeman@google.com,herb@google.com,brucewang@google.com
>
> Change-Id: I665de46d379f1b533358f0be644814aa4bfffb33
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/137240
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Kevin Lubick <kjlubick@google.com>

TBR=bungeman@google.com,herb@google.com,kjlubick@google.com,brucewang@google.com

Change-Id: I41f0e4505ed0579a77a56212898e9a6caf6f1ed5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/137260
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-06-22 21:12:58 +00:00
Kevin Lubick
cce82d2b7c Revert "Implement onMakeClone(const SkFontArguments& args) in class SkTypeface_fontconfig."
This reverts commit 96b1ecc25d.

Reason for revert: Breaking Google3, I think

Original change's description:
> Implement onMakeClone(const SkFontArguments& args) in class SkTypeface_fontconfig.
> 
> Create FontMgrFontConfigTest.cpp file to test the above function.
> 
> Change-Id: I7716355f702af3d6f25574305914f0b82a4147ce
> Reviewed-on: https://skia-review.googlesource.com/137133
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

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

Change-Id: I665de46d379f1b533358f0be644814aa4bfffb33
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/137240
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2018-06-22 21:07:38 +00:00
Ruiqi Mao
c5c3df6643 renamed samplecode/Nima to samplecode/SampleNimaActor
Bug: skia:
Change-Id: I305ca837d5ed35df4b519e7283201f0a0f87b1c3
Reviewed-on: https://skia-review.googlesource.com/136636
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
2018-06-22 20:36:17 +00:00
Bruce Wang
96b1ecc25d Implement onMakeClone(const SkFontArguments& args) in class SkTypeface_fontconfig.
Create FontMgrFontConfigTest.cpp file to test the above function.

Change-Id: I7716355f702af3d6f25574305914f0b82a4147ce
Reviewed-on: https://skia-review.googlesource.com/137133
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-06-22 17:49:27 +00:00
Hal Canary
e2098c4936 SkFontMgr.h is a core header.
Change-Id: Idad3c8b6961bb617afedb8e353060b9044edaee3
Reviewed-on: https://skia-review.googlesource.com/136066
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2018-06-20 14:46:28 +00:00
Greg Daniel
7d918fde03 Don't destroy VkPipelineLayouts until after command buffer recording.
Bug: skia:
Change-Id: I70be1dc6b29db9a9152e008293a7d0a276384011
Reviewed-on: https://skia-review.googlesource.com/135867
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-06-20 13:37:28 +00:00
Brian Salomon
0560bd612b Move GrSwizzle.h from include/private to src/gpu.
Change-Id: I2d992404f540c7f8a1cd5ff633148d92ec50d4fa
Reviewed-on: https://skia-review.googlesource.com/135860
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
2018-06-19 21:44:28 +00:00
Brian Salomon
23c55b6b18 Move GrGLSL.h from include/private to src/gpu/glsl.
Nothing public was including this and it was included unnecessarily in many places.

Change-Id: Iee960b3e67981ab41af7442cc43391f2f57eb551
Reviewed-on: https://skia-review.googlesource.com/135787
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-06-19 21:23:18 +00:00
Brian Osman
c069a57301 added NIMA sample to showcase animations
improved third_party template to include headers as system headers for non-Windows machines

Bug: skia:
Change-Id: Id2fa74fc31b49f9b07cc83e7f60477c7ab4f8d83
Reviewed-on: https://skia-review.googlesource.com/135450
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-06-19 20:30:28 +00:00
Mike Reed
0917fad2c6 move imagefilters into separate dir and flag for build.gn
Requires https://chromium-review.googlesource.com/c/chromium/src/+/1105062

Bug: skia:
Change-Id: I948056234efa57c0f727a61d5fb3258034de5199
Reviewed-on: https://skia-review.googlesource.com/135566
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-06-19 20:16:38 +00:00
Florin Malita
80452bee11 Fold SkJSON into Skia/utils
It's a tiny, core-ish component -- might as well treat as such to
simplify dependencies.

Change-Id: I6f31ce2d151f9a629d88bfc7f15d64891d5150c0
Reviewed-on: https://skia-review.googlesource.com/135780
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-06-19 18:23:30 +00:00
Ben Wagner
96aa535b78 Remove .bat and .exe from commands where possible.
We expect .BAT and .EXE to be on PATHEXT. Also, although Python
CreateProcess doesn't honor PATHEXT, it will try .EXE. This allows most
commands to be platform-independent, and also resolves the issue with
the cpython package not including python.bat.

No-Tree-Checks: true
Docs-Preview: https://skia.org/?cl=135626
Bug: chromium:852581
Change-Id: Iab4189407df44ff4ad4d37da07ff52414229d397
Reviewed-on: https://skia-review.googlesource.com/135626
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Auto-Submit: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-06-19 17:29:15 +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
Mike Reed
74aa9ab51a add new source list in prep for separating imagefilters from other effects
Future Skia CL: https://skia-review.googlesource.com/c/skia/+/135566
Chrome CL: https://chromium-review.googlesource.com/c/chromium/src/+/1105062

Bug: skia:
Change-Id: I0caee985deb38739267b18fd92f3d0cf9454b8cd
Reviewed-on: https://skia-review.googlesource.com/135622
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-06-19 02:27:18 +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
Mike Klein
0333854e55 clean up defines that do nothing
Change-Id: I0181ddfd7b75cd7ffb7002b7038a99419ea876f2
Reviewed-on: https://skia-review.googlesource.com/135562
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-06-18 17:25:28 +00:00
Brian Osman
47c275133b Remove GrNonlinearColorSpaceXformEffect
Convert all uses to GrColorSpaceXformEffect

Change-Id: Icc9d093a00450001c1b915db7a8676c9c66073b1
Reviewed-on: https://skia-review.googlesource.com/132090
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-06-18 16:25:48 +00:00
Chris Dalton
4da70190aa ccpr: Implement path mask caching
Implement caching as follows:

1) Instead of deleting the mainline ccpr atlas when finished, stash it
   away from flush to flush.

2) On subsequent flushes, check the stashed atlas to see if we can
   reuse any of its cachable paths. Copy reusable paths into 8-bit
   literal coverage atlases and store them in the resource cache.

3) Recycle the stashed atlas texture for the remaining paths in the
   flush.

Bug: skia:
Change-Id: I9b20fbea708646df1df3a5f9c044e2299706b989
Reviewed-on: https://skia-review.googlesource.com/134703
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-06-18 16:14:28 +00:00
Brian Osman
f018b7d607 SkColorSpaceXformSteps improvements and tests
Added some helper functions and put the booleans in a nested struct
(this is motivated by upcoming changes). Added a unit test of steps
against skcms, with round-tripping in both combinations.

Change-Id: Iea3d60cd52edb5259b5576b1422ed6f856cde815
Reviewed-on: https://skia-review.googlesource.com/134660
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-06-14 11:30:47 +00:00
Robert Phillips
7c525e62d4 Plumb GrContext everywhere
There is no good way to split the monster CL up. This breaks out
the GrContext plumbing but doesn't use it.

Change-Id: I90856d428d372bcec3f8821e6364667b367927d4
Reviewed-on: https://skia-review.googlesource.com/133382
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-06-12 14:43:03 +00:00
Florin Malita
46fbf8c97a Disable module deps in Android Framework builds
Module-related functionality is not required in dm/bench at this point.

Let's disable module deps flattening for now.  As an immediate benefit
we can reduce the deps visibility for some internal skjson targets.

Bug: skia:8061
Change-Id: I0e09208964ca94b519121207ba1b6225059ef573
Reviewed-on: https://skia-review.googlesource.com/133822
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-06-11 15:00:31 +00:00
Mike Klein
692e29ebcd remove unused parts of SkTypes.h
Lots of completely unused bits and bobs removed.

I've decided SK_SUPPORT_UNITTEST and its single use are not
very compelling.

tests/CPlusPlusEleven was the only user of Sk32ToBool(),
and no longer generally needed.

Change-Id: I3ee75560f1e1e1cf5ad89ee7df8d7694b5dffdb3
Reviewed-on: https://skia-review.googlesource.com/133622
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-06-08 23:53:57 +00:00
Mike Klein
bfe4db5c79 remove unimportant bench
Change-Id: I98d0a2295c4853e0c07d84e781c8b0236561d307
Reviewed-on: https://skia-review.googlesource.com/133584
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-06-08 20:24:03 +00:00
Robert Phillips
88a32efa75 Add a factory to any GrOp-derived class that lacked one
All GrOp-derived classes are going to have allocate their memory in a GrMemoryPool.

Change-Id: Ifa410b05eecd9b68c39dcc15dd4298d617204c13
Reviewed-on: https://skia-review.googlesource.com/132828
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-06-08 11:55:11 +00:00
Herb Derby
41f4f31cd7 Reland "Have draw(Text|PosText|PosTextH) use a single entry on the device"
This reverts commit 74b390d6b1.

Reason for revert: reverting to add patch for valgrind

Original change's description:
> Revert "Have draw(Text|PosText|PosTextH) use a single entry on the device"
> 
> This reverts commit 4225b3220e.
> 
> Reason for revert: made valgrind unhappy.
> 
> Original change's description:
> > Have draw(Text|PosText|PosTextH) use a single entry on the device
> > 
> > Handle the positioning of drawText at the canvas layer. Simplify
> > the code by removing similar implementations.
> > 
> > Change-Id: I8b711783435072f560e29fca1dd934fa2e345ed2
> > Reviewed-on: https://skia-review.googlesource.com/127131
> > Reviewed-by: Ben Wagner <bungeman@google.com>
> > Commit-Queue: Herb Derby <herb@google.com>
> 
> TBR=jvanverth@google.com,bungeman@google.com,herb@google.com
> 
> Change-Id: I65c9d30ae6ecb1f87e8660e56d8f8ce5daab7551
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/132403
> Reviewed-by: Hal Canary <halcanary@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>

TBR=jvanverth@google.com,halcanary@google.com,bungeman@google.com,herb@google.com

Change-Id: I9bbb73aac447b51eb8215ac42331759fa4c9fa45
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/132580
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-06-06 17:46:05 +00:00
Mike Klein
f454bd3930 rm TestConfigParsing
No test tests, ok?  Gotta draw the line somewhere.

Change-Id: I52284272f74a72a858910a143ecd4ad68fe3f1de
Reviewed-on: https://skia-review.googlesource.com/132410
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-06-06 15:37:54 +00:00
Hal Canary
74b390d6b1 Revert "Have draw(Text|PosText|PosTextH) use a single entry on the device"
This reverts commit 4225b3220e.

Reason for revert: made valgrind unhappy.

Original change's description:
> Have draw(Text|PosText|PosTextH) use a single entry on the device
> 
> Handle the positioning of drawText at the canvas layer. Simplify
> the code by removing similar implementations.
> 
> Change-Id: I8b711783435072f560e29fca1dd934fa2e345ed2
> Reviewed-on: https://skia-review.googlesource.com/127131
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

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

Change-Id: I65c9d30ae6ecb1f87e8660e56d8f8ce5daab7551
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/132403
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-06-06 13:29:57 +00:00
Herb Derby
4225b3220e Have draw(Text|PosText|PosTextH) use a single entry on the device
Handle the positioning of drawText at the canvas layer. Simplify
the code by removing similar implementations.

Change-Id: I8b711783435072f560e29fca1dd934fa2e345ed2
Reviewed-on: https://skia-review.googlesource.com/127131
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-06-05 20:11:39 +00:00
Mike Klein
f105dc71e4 restore headers lost from skia.h
When we updated the script that generates skia.h to look at GN
dependencies, we lost some headers.  Here are two that we have
noticed are missing.

    ~/skia (headers|✚2…) $ git diff --no-index before.h out/gen/skia.h
    diff --git a/before.h b/out/gen/skia.h
    index 1d59746af1..915fffb293 100644
    --- a/before.h
    +++ b/out/gen/skia.h
    @@ -38,6 +38,7 @@
     #include "SkColorMatrix.h"
     #include "SkColorMatrixFilter.h"
     #include "SkColorPriv.h"
    +#include "SkColorSpaceXform.h"
     #include "SkCornerPathEffect.h"
     #include "SkDashPathEffect.h"
     #include "SkData.h"
    @@ -65,6 +66,7 @@
     #include "SkImageInfo.h"
     #include "SkImageSource.h"
     #include "SkInterpolator.h"
    +#include "SkJpegEncoder.h"
     #include "SkLayerDrawLooper.h"
     #include "SkLightingImageFilter.h"
     #include "SkLumaColorFilter.h"

Bug: skia:8039

Change-Id: If59a421a7852dc19123b851798b194a4666c59a3
Reviewed-on: https://skia-review.googlesource.com/132262
Auto-Submit: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-06-05 20:09:09 +00:00
Brian Salomon
7258e97e8e C++14
Change-Id: I4bbf3e5e6d9d4e11e968a0bc88ce43444047a382
Reviewed-on: https://skia-review.googlesource.com/130903
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-06-04 13:22:49 +00:00
Hal Canary
a083404838 Revert "Added support for visual debugging on Android Studio"
This reverts commit 222c9cfd1b.

Reason for revert: Breaks documented workflow.

Original change's description:
> Added support for visual debugging on Android Studio
> 
> Change-Id: Icaf848c31167db10d6fbb13d74c7287b03628fb6
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/130144
> Reviewed-by: Derek Sollenberger <djsollen@google.com>

TBR=djsollen@google.com,mtklein@google.com,bsalomon@google.com,halcanary@google.com,bungeman@google.com,ziadb@google.com

Change-Id: I6e7ac2d16d9a0f267d75cd202fd4975be36da4f5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/131601
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-06-01 20:22:37 +00:00
Mike Klein
804d0f28ba turn on pointer-overflow on ASAN/UBSAN bots
I know SkRasterPipelineBlitter will add back offsets
to the mask pointer to make these fMaskPtr.pixels safe.

SkImageInfo wasn't making out-of-bounds pointers, but was moving
between two in-bounds pointers by subtracting large (negative)
size_t.  Switching to explicit negate and add quiets this down.

Bug: chromium:836282

Change-Id: Ia65e380ec41dbfedce0659106830fbacb1a5cf4a
Reviewed-on: https://skia-review.googlesource.com/131147
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-06-01 20:15:46 +00:00
Brian Osman
bc9f3b0f9c Decorate project names with their relative path in the meta SLN
This doesn't show up in the solution explorer (so there are two entries
for "samples"), but they are both present, and all files are there.
Decorating the names in the explorer is going to be much harder, as we
have to change the actual filename of the generated vcxproj, as well as
the reference to those files in the sln. For now, this works well
enough.

Change-Id: I5b864268a4c56001edbf2c43dbe5563445d5435f
Reviewed-on: https://skia-review.googlesource.com/131580
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-06-01 19:22:08 +00:00
Jim Van Verth
70276915db Set bounds correctly for color emoji that need post-cache transfoms
We need to handle the bounds for transformed color emoji the same
way we handle the bounds for distance field text. Without this
bounds correction, the glyphs were being clipped out.

Also adds a sample to test this case.

Bug: 848616
Change-Id: I39dedbe2fd19331ad67978c95519f5c9d46f59fc
Reviewed-on: https://skia-review.googlesource.com/131523
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
2018-06-01 18:31:47 +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
ziadb
222c9cfd1b Added support for visual debugging on Android Studio
Change-Id: Icaf848c31167db10d6fbb13d74c7287b03628fb6
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/130144
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2018-06-01 14:56:24 +00:00