Commit Graph

35 Commits

Author SHA1 Message Date
Mike Reed
18aeb5731b Hide legacy drawImage methods
Migrate clients to use drawImage(... sampling)
rather than relying on paint's filter-quality.

This CL just gets started, introducing the build-flag.

Bug: skia:7650
Change-Id: I4afdd964c6f805058afee0a8f3a6887d501ad42b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356076
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-01-20 00:59:26 +00:00
Mike Klein
56957d9ccf remove unimplemented sk_data_new_empty()
Bug: skia:9585
Change-Id: I1fefd3598478d2f2c157d3a91750b5b92479b1b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330278
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-10-29 16:20:06 +00:00
Mike Reed
e9d783c4d2 use pathbuilder
Change-Id: I4b40107b45cd829595e89d75e19fd063acee4221
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/311106
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-17 22:05:00 +00:00
Mike Reed
564d49ec10 Remove subset parameter from making encoded/generator images
Since subsetting may require rasterizing/resolving the generator, we may
also need access to the GrDirectContext. To simplify apis, rely on
makeSubset() for that.

Related: https://skia-review.googlesource.com/c/skia/+/305970

Change-Id: I1980e3c823fb6cf54f197c350942c2f82b03e20f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306136
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-28 17:33:12 +00:00
Stan Iliev
8231031613 Small fixes to C API. Add SK_API and fix function signature mismatch.
Test: Built and linked C API so
Change-Id: I1a4126851fb2e70b7592e0d7d21d771eb9c26440
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/218798
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2019-06-07 01:29:23 +00:00
Stan Iliev
4732dd3158 Fix C API example
Test: built and ran skia-c-example.c
Change-Id: I5691fa474f3efb6198c389180653ccded67e4f7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210633
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2019-04-28 01:09:13 +00:00
Mike Klein
c0bd9f9fe5 rewrite includes to not need so much -Ifoo
Current strategy: everything from the top

Things to look at first are the manual changes:

   - added tools/rewrite_includes.py
   - removed -Idirectives from BUILD.gn
   - various compile.sh simplifications
   - tweak tools/embed_resources.py
   - update gn/find_headers.py to write paths from the top
   - update gn/gn_to_bp.py SkUserConfig.h layout
     so that #include "include/config/SkUserConfig.h" always
     gets the header we want.

No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-04-24 16:27:11 +00:00
Mike Klein
127e519cc4 fix sk_colorspace include guard
Change-Id: Id6db4fd8147ac96d8fecab3b73d50c5098a070f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209897
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-04-23 20:35:04 +00:00
Mike Klein
86e61993a9 Revert "simplify and centralize SK_API"
This reverts commit 7f960d2083.

Reason for revert: Chrome roll again

Original change's description:
> simplify and centralize SK_API
> 
> Attempt two, this time not setting visibility("default")
> unless SKIA_IMPLEMENTATION is defined.
> 
> Bug: skia:8975
> Change-Id: I8d4e2071f1a8ee8a5702ac62ffc4000379d4fc43
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207854
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,brianosman@google.com,chinmaygarde@google.com

Change-Id: I0f9e6e5da2c17f789a4599042b9ae3a1ba412987
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8975
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209680
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-04-22 18:09:45 +00:00
Mike Klein
7f960d2083 simplify and centralize SK_API
Attempt two, this time not setting visibility("default")
unless SKIA_IMPLEMENTATION is defined.

Bug: skia:8975
Change-Id: I8d4e2071f1a8ee8a5702ac62ffc4000379d4fc43
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207854
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-04-22 16:32:03 +00:00
Mike Klein
8ad84f2c1b Revert "simplify and centralize SK_API"
This reverts commit 90c9749bd5.

Reason for revert: breaks chrome builds?

https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8916446857468949360/+/steps/compile/0/stdout

Original change's description:
> simplify and centralize SK_API
> 
> Bug: skia:8975
> Change-Id: Id45738b178b108593cf931ac236505901e97330a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207680
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

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

Change-Id: Iae078e164c2b97fb52b73875e9d8066b749e2de0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8975
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207780
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-04-11 22:14:45 +00:00
Mike Klein
90c9749bd5 simplify and centralize SK_API
Bug: skia:8975
Change-Id: Id45738b178b108593cf931ac236505901e97330a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207680
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-04-11 18:23:02 +00:00
Mike Reed
66c505f6e8 expand imageinfo in C api, start on colorspace
After sk_imageinfo was initially created, we have added a colorspace to it,
and that object is a smart-pointer. In response to that, this CL upgrades
imageinfo to an "object" (like paint), so we can manage the ref-counting of
its colorspace, and to allow for future changes/expansion (like paint).

Bug: skia:
Change-Id: I629ff99c0820fdbe83f062d9fb768c15cda68e18
Reviewed-on: https://skia-review.googlesource.com/157156
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-28 17:52:59 +00:00
Hal Canary
7322b52e61 C API: document sk_matrix_t
Change-Id: I8f35868de6ef7d541cc3c9bcaddad4871bf8d6eb
Reviewed-on: https://skia-review.googlesource.com/2590
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-03-21 18:04:34 +00:00
Brian Salomon
7551898f8e Make C API compatible with -Wstrict-prototypes
Change-Id: I265605e769a12a319d672c491c9ba2d89c02de7e
Reviewed-on: https://skia-review.googlesource.com/6477
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-01-03 17:38:35 +00:00
mtklein
7a1f45f9e5 spin off easy stuff from Herb's windows GN CL
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2209533004

No public API changes.
TBR=reed@google.com

Review-Url: https://codereview.chromium.org/2209533004
2016-08-04 06:19:33 -07:00
mtklein
fa84d94bb0 Make both SK_API definition points identical and order independent.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2189983002

Review-Url: https://codereview.chromium.org/2189983002
2016-07-28 09:45:15 -07:00
reed
4a7940bf5e add drawCircle to c api
BUG=skia:4927
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684763002

TBR=

Review URL: https://codereview.chromium.org/1684763002
2016-02-09 13:25:51 -08:00
halcanary
c9119060a0 Documentation: C API comments
Review URL: https://codereview.chromium.org/1271023002
2015-09-01 10:45:09 -07:00
halcanary
219f18f30d C API: Add SK_API, also documentation of an example.
SK_API = __declspec(dllexport) / __attribute__((visibility("default")))

Also, add documentation in experimental/c-api-example/c.md

Review URL: https://codereview.chromium.org/1307183006
2015-09-01 10:01:38 -07:00
halcanary
65cc3e4644 C API: add radial, sweep, and two-point conical gradient shaders
Review URL: https://codereview.chromium.org/1263773006
2015-08-12 07:37:34 -07:00
halcanary
80a1c54740 C API: remove dead code, simplify boilerplate
Review URL: https://codereview.chromium.org/1261953006
2015-07-31 15:16:23 -07:00
halcanary
7568d0b15e C API: add sk_xfermode.h, impl, test
Review URL: https://codereview.chromium.org/1242403005
2015-07-31 13:38:06 -07:00
robertphillips
702edbd4bc Propagate SkSurfaceProps to more call sites
Start moving to a world where everyone provides surface properties.

Most notably this exposes a portion of SkSurfaceProps to the C API.

BUG=skia:3934

Review URL: https://codereview.chromium.org/1195003003
2015-06-23 06:26:08 -07:00
reed
871872f3f2 change old picture serialization to really handle images
BUG=skia:3965

Review URL: https://codereview.chromium.org/1199473002
2015-06-22 12:48:26 -07:00
reed
f5872d2f41 add stroke params to c api
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/848553002
2015-01-10 17:59:31 -08:00
reed
b2a5d7e02f add image-from-codec to c api
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/822203002
2014-12-25 14:16:21 -08:00
reed
0eafc9b06c add maskfilter to c api
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/822053002
2014-12-23 14:11:11 -08:00
reed
e371989c92 add picture to c api
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/818153002
2014-12-22 17:46:00 -08:00
abarth
9503ac7a3c Add matrix operations to C canvas API
R=reed@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/769123002
2014-12-02 15:47:34 -08:00
abarth
2fc6ea62ce Add scale and skew to C canvas API
R=reed@chromium.org
BUG=skia:

Review URL: https://codereview.chromium.org/762493005
2014-12-01 14:04:03 -08:00
reed
afa278e250 more c
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/736133006
2014-11-24 19:11:48 -08:00
reed
73c2501120 separate c headers
BUG=skia:

Review URL: https://codereview.chromium.org/728323002
2014-11-17 06:15:42 -08:00
stephana
0b5fc9774f Quick and dirty test to call the C interface from GO.
BUG=skia:

Review URL: https://codereview.chromium.org/670303005
2014-10-31 07:11:19 -07:00
reed
e332396d2f move c api into include
BUG=skia:

Review URL: https://codereview.chromium.org/665203004
2014-10-24 11:16:19 -07:00