Commit Graph

8487 Commits

Author SHA1 Message Date
Ben Wagner
e346b1eea4 Add SkTypeface::getVariationDesignParameters
This adds a way for users to query the axis parameters for a typeface.

Change-Id: Idc2ac0d84bc7ae2ca484ae410cba5b01883418e5
Reviewed-on: https://skia-review.googlesource.com/137706
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-07-12 17:30: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
Mike Reed
77c138f2cd remove unneeded scale from procs
Bug: skia:
Change-Id: I85adbbaf0e9d7d23c3f07490a1d323c87e8aa4da
Reviewed-on: https://skia-review.googlesource.com/140980
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-07-12 14:33:20 +00:00
Ben Wagner
2c312c4f58 Remove SkDrawFilter.
Change-Id: I0204a9522e828c87bb7c6c20ae34ce51161442af
Reviewed-on: https://skia-review.googlesource.com/137895
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-07-12 02:36:44 +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
Robert Phillips
e923cccb25 Revert "SkDEBUGF: use __VA_ARGS__"
This reverts commit 2267a09235.

Reason for revert: It looks like Google 3 is failing to compile w/ this CL

Original change's description:
> SkDEBUGF: use __VA_ARGS__
> 
> Change-Id: I42a47e821ff7a7f6cec65b38a8216cabbf0acfce
> Reviewed-on: https://skia-review.googlesource.com/139860
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>

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

Change-Id: I3aab490f3d2fea103fc915ca01cb0e294df86739
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/140660
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-07-11 16:45:18 +00:00
Hal Canary
2267a09235 SkDEBUGF: use __VA_ARGS__
Change-Id: I42a47e821ff7a7f6cec65b38a8216cabbf0acfce
Reviewed-on: https://skia-review.googlesource.com/139860
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-07-11 15:40:18 +00:00
Brian Osman
532b3f944a Remove clamping of kPlus with F16 configs
The most common use-case for F16 is to draw things that are explicitly
outside of [0,1]. We can't prevent out-of-range values in general, users
could just draw out-of-range content in src mode. We've decided that
it's best to avoid surprising behavior, and trust the user in these
situations.

This effectively reverts https://skia-review.googlesource.com/c/skia/+/48183

Bug: skia:
Change-Id: I71c2dd925c567e2862d96ab70c752f19245a69c4
Reviewed-on: https://skia-review.googlesource.com/140500
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-07-11 14:30:58 +00:00
Brian Osman
c87cfb674b Remove old lazy image decoding heuristic logic
This led to removing a lot of transfer function behavior code. There is
more that could be done, and we need to add in decoding to dst color
space, but this CL is almost entirely mechanical.

Change-Id: I91b2169f95aadcfaacdd2b9821bb1a01ce53f9a6
Reviewed-on: https://skia-review.googlesource.com/140349
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-07-11 14:07:08 +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
Brian Osman
d17444d5f3 Remove unused GrPixelConfig functions
Change-Id: I1847a96cb8253a8bd047c06d24cba92c8dc04667
Reviewed-on: https://skia-review.googlesource.com/140440
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-07-11 13:54:08 +00:00
Ruiqi Mao
9a6e42ff18 added caching of SkVertices
SkVertices can now be "volatile", meaning they should not be cached.
SkVertices is volatile by default if the argument is not given.

Pulled from reverted CL: https://skia-review.googlesource.com/c/skia/+/138596

Docs-Preview: https://skia.org/?cl=139545
Bug: skia:
Change-Id: I92cf832efe1c0aaa8f432eedde2678582dd2454e
Reviewed-on: https://skia-review.googlesource.com/139545
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
2018-07-09 20:31:28 +00:00
Yong-Hwan Baek
688a8e5331 More workarounds on Windows Debug DLL crash.
SkData and SkTextBlob overwrites delete operator in header file.
Which causes crash on Windows Debug DLL Builds.

Sample Solution can be found in https://github.com/DevHwan/SkiaDLLTest

Bug: skia:
Change-Id: I36bc9445f5cd17afdf852009a0695036ee18ecf0
Reviewed-on: https://skia-review.googlesource.com/139680
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-07-09 17:20:17 +00:00
Brian Osman
a50205fca5 Add color type to the image filter DAG's OutputProperties
Don't try to guess the pixel config to use for intermediates. Instead,
just make the intermediates in the same color type (and space) as the
final destination. This removes some no-longer-correct logic that was
using sRGB configs, resulting in linear blending and precision loss.

Change-Id: I627c47193a9f2889c3dc121170ff3e7d5d315fa0
Reviewed-on: https://skia-review.googlesource.com/139547
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-07-06 18:34:58 +00:00
Ruiqi Mao
c05aa7d163 Revert "added skeletal animation support to GPU backend"
This reverts commit b6307340e8.

Reason for revert: patch/atlas failing in gold

Original change's description:
> added skeletal animation support to GPU backend
> 
> added caching of SkVertices
> 
> Docs-Preview: https://skia.org/?cl=138596
> Bug: skia:
> Change-Id: Ia750f55f5f6d0de250d9e9c5619f4d1ac856f9f5
> Reviewed-on: https://skia-review.googlesource.com/138596
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Ruiqi Mao <ruiqimao@google.com>

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

Change-Id: Idfaf016a7ff4cdd8af2543d510706f489d04417a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/139281
Reviewed-by: Ruiqi Mao <ruiqimao@google.com>
Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
2018-07-03 21:18:18 +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
Ruiqi Mao
b6307340e8 added skeletal animation support to GPU backend
added caching of SkVertices

Docs-Preview: https://skia.org/?cl=138596
Bug: skia:
Change-Id: Ia750f55f5f6d0de250d9e9c5619f4d1ac856f9f5
Reviewed-on: https://skia-review.googlesource.com/138596
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
2018-07-03 16:07:44 +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
Ruiqi Mao
94d57c477f updated SkCanvas documentation for animation overloads of drawVertices
changed bookmaker ParserCommon::writeBlockTrim limit to 20000

disabled broken SkPaint::containsText example

Docs-Preview: https://skia.org/?cl=138862
Bug: skia:8123
Change-Id: Ib4003bf7b9603bf652f86cd56e0975cd09bcbf71
Reviewed-on: https://skia-review.googlesource.com/138862
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-07-03 13:33:43 +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
Brian Salomon
d818ebf4a3 Revert "Some scissor state cleanup."
This reverts commit a219419c9d.

Reason for revert: breaking things
Original change's description:
> Some scissor state cleanup.
> 
> Separate flushing the enablement of scissor from the rect in GrGLGpu.
> 
> Move GrPipeline::ScissorState to a global enum and use more broadly.
> Rename to GrScissorTest to avoid name conflict with existing
> GrScissorState.
> 
> Change-Id: Ib32160b3300bc12de2d2e1761d152fd1bba8b683
> Reviewed-on: https://skia-review.googlesource.com/137395
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Chris Dalton <csmartdalton@google.com>

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

Change-Id: If71a5c5efc86d4239b40675bad2a6cb1f77460f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/138900
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-07-02 14:09:01 +00:00
Brian Salomon
a219419c9d Some scissor state cleanup.
Separate flushing the enablement of scissor from the rect in GrGLGpu.

Move GrPipeline::ScissorState to a global enum and use more broadly.
Rename to GrScissorTest to avoid name conflict with existing
GrScissorState.

Change-Id: Ib32160b3300bc12de2d2e1761d152fd1bba8b683
Reviewed-on: https://skia-review.googlesource.com/137395
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2018-07-02 13:46:30 +00:00
Ruiqi Mao
f510149da8 skeletal animation support added to API and software backend
SkCanvas::drawVertices now supports overloads that take an array of bone deformation matrices.
SkVertices::MakeCopy and SkVertices::Builder now support two additional optional attributes, boneIndices and boneWeights.

Bug: skia:
Change-Id: I30a3b11691e7cdb13924907cc1401ff86d127aea
Reviewed-on: https://skia-review.googlesource.com/137221
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
2018-06-29 19:34:28 +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
Robert Phillips
385804514e Revert "Remove drawTextBlob from device use drawGlyphRunList"
This reverts commit e2e52e46ca.

Reason for revert: See if this is blocking the Chrome roll

Original change's description:
> Remove drawTextBlob from device use drawGlyphRunList
> 
> Convert all backends to use GlyphRunList instead of
> text blobs. If the device did not originally implement
> drawTextBlob it will be simulated by drawPosText on the
> device.
> 
> Other changes:
> Change to using an origin from absolulte positioning. The GPU
> code uses origin change to update blobs under translation.
> 
> Change cluster to use const uint32_t instead of just
> uint32_t.
> 
> Add SkPaint to runs.
> 
> The draw filter is hosted up to the canavas level and applied there.
> 
> Change-Id: Ib105b6bd26b67db55f1c954e37c79fbdcaa9d4a2
> Reviewed-on: https://skia-review.googlesource.com/137224
> Reviewed-by: Herb Derby <herb@google.com>
> Reviewed-by: Khusal Sagar <khushalsagar@chromium.org>
> Reviewed-by: Hal Canary <halcanary@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

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

Change-Id: I4d93a534990c89deee7d3aaa00ec40d47e0d2ece
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/138120
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-06-28 12:00:47 +00:00
Herb Derby
e2e52e46ca Remove drawTextBlob from device use drawGlyphRunList
Convert all backends to use GlyphRunList instead of
text blobs. If the device did not originally implement
drawTextBlob it will be simulated by drawPosText on the
device.

Other changes:
Change to using an origin from absolulte positioning. The GPU
code uses origin change to update blobs under translation.

Change cluster to use const uint32_t instead of just
uint32_t.

Add SkPaint to runs.

The draw filter is hosted up to the canavas level and applied there.

Change-Id: Ib105b6bd26b67db55f1c954e37c79fbdcaa9d4a2
Reviewed-on: https://skia-review.googlesource.com/137224
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Khusal Sagar <khushalsagar@chromium.org>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-06-28 03:36:16 +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
Cary Clark
224c700a1f sync docs up with tip of tree
Also check in work in progress for blend modes,
round rects, and a placeholder for pictures.

One minor include change to add a parameter name
for SkBlendMode function.

TBR=reed@google.com
R=caryclark@google.com

Docs-Preview: https://skia.org/?cl=134200
Bug: skia:6898
Change-Id: I5d2a9221d61edb32d9c7edbb3193401605b2b513
Reviewed-on: https://skia-review.googlesource.com/134200
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-06-27 15:47:45 +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
Mike Klein
3785471ff6 basic first pass at RGBA F32 support
Draws basically the same as f16.

The existing load_f32, load_f32_dst, and store_f32 stages all had the
same bug that we'd never noticed because dy was always 0 until now.

Change-Id: Ibbd393fa1acc5df414be4cdef0f5a9d11dcccdb3
Reviewed-on: https://skia-review.googlesource.com/137585
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-06-26 19:02:52 +00:00
Leon Scroggins III
a57488a1f5 Expose public factories for platform decoders
Bug: skia:8076

Move SkImageGeneratorCG and SkImageGeneratorWIC to include/ports/,
and make them SK_API.

Remove SkImageGeneratorCG::NewFromEncodedCG. No known clients are using
it, and it was a private API in src/. There is already a
MakeFromEncodedCG to replace it.

Similarly, switch WIC from New to Make.

Add a compile test for using them with
SetImageGeneratorFromEncodedDataFactory.

Change-Id: I897eb7a887b3736a6c614a68e38f38b6a1942cf1
Reviewed-on: https://skia-review.googlesource.com/137387
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-06-26 17:30:52 +00:00
Ben Wagner
6a284b7716 Clean up includes in SkMallocPixelRef
Came across this unnecessary includes while experimenting with WASM

Change-Id: I68061c7bbd18ed5695b94b3b8de6dbb63407b8ee
Reviewed-on: https://skia-review.googlesource.com/137582
Reviewed-by: Mike Klein <mtklein@google.com>
2018-06-26 16:47:39 +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
Ben Wagner
900b5364d1 Fix SkPaint::getTypeface() documentation.
SkPaint::getTypeface() allows the caller to borrow a pointer to its
SkTypeface, it does not affect ownership. The existing documentation would
lead a user to beleive that getTypeface() increments the reference count,
but it does not.

TBR=reed@google.com
Change-Id: Ic1a660b026e3c4295f9f0de28abfde29c3f05524
Reviewed-on: https://skia-review.googlesource.com/137183
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2018-06-25 11:32:25 +00:00
Ben Wagner
4496248117 Remove include/ports/SkFontMgr.h
The SkFontMgr.h header has been moved to core/SkFontMgr.h and the
ports/SkFontMgr.h header is simply a forwarding header. Remove the
forwarding header now that users have been updated.

Change-Id: Icecef2ecb3ac20fc2c885429b06cdb306524303d
Reviewed-on: https://skia-review.googlesource.com/137130
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-06-22 15:43:17 +00:00
Ben Wagner
cd224b17e8 Revert "SkRefCnt, SkTypes: fix includes for clients"
This reverts commit 61582510ee.

Reason for revert: Chromium should now be fixed.

Original change's description:
> SkRefCnt, SkTypes: fix includes for clients
>
> Change-Id: I1cfdc03963eaab9687608974958d20411806cfeb
> Reviewed-on: https://skia-review.googlesource.com/136592
> Commit-Queue: Hal Canary <halcanary@google.com>
> Reviewed-by: Hal Canary <halcanary@google.com>

TBR=halcanary@google.com

Change-Id: I1a3588ed9e19ee5884f8a907abcfc2aa00cfe5e9
Reviewed-on: https://skia-review.googlesource.com/136700
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-06-21 20:06:19 +00:00
Cary Clark
a6c75fda12 make includes available for flutter
temporarily copy SkBase64.h until flutter can
move to using the one in include/util

Copy TRACE_EVENT_PHASE_* into its own file
in include/util; the only part of SkTraceEventCommon.h
that flutter needs.

R=reed@google.com,chinmaygarde@google.com

Bug: skia:7741
Change-Id: I8671edbf1d6b6b868bde98aa9ad04abcb85a43a0
Reviewed-on: https://skia-review.googlesource.com/135870
Reviewed-by: Chinmay Garde <chinmaygarde@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-06-21 18:12:47 +00:00
Cary Clark
472ab81032 abort really big path fuzzing
This adds a couple of special cases
to stop the fuzzer from timing out.

The first occurs when the fuzzer generates
a very large path with very large quads.
Count the subdivisions and stop after a while.

The second occurs with a normal path and
1D path effect with a very small advance.
Count the points and stop after a while.

R=reed@google.com,bsalomon@google.com,kjlubick@google.com
Bug: oss-fuzz:8349,oss-fuzz:8805
Change-Id: I86130e3f512f48e5a39335412435eabc245ed193
Reviewed-on: https://skia-review.googlesource.com/135709
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-06-21 16:42:37 +00:00