Commit Graph

294 Commits

Author SHA1 Message Date
Mike Reed
ac9f0c9e27 Bitmap.asImage()
... and lots and lots of IWYU

Change-Id: Ie5157dcdd2e6d29b95c71b39153278ab48ef4eb3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/346778
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-23 15:54:57 +00:00
Mike Reed
5d8f55bfa8 Update last gm to use sampling, hide legacy api
persp_shaders_ gm expected diff (in gpu backends only), due to change
from filterquality (which gpu and cpu interpreted differently for mips)
to samplingoptions (which both backends interpret the same).

Specifically for kMedium:
- gpu treated as SkMipmapMode::kLinear
- cpu treated as SkMipmapMode::kNearest

Bug: skia: 7650
Change-Id: Idc53ad8d01d9c928b425c092b36191153714d347
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343737
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-13 00:36:31 +00:00
Mike Reed
82abeceef9 Bitmap should use sampling options
Change-Id: I611969d4707009411f20b74debad7655ac364eb8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343596
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-12-12 15:36:21 +00:00
John Stiles
7571f9e490 Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'.
Mechanically updated via Xcode "Replace Regular Expression":

  typedef (.*) INHERITED;
    -->
  using INHERITED = $1;

The ClangTidy approach generated an even larger CL which would have
required a significant amount of hand-tweaking to be usable.

Change-Id: I671dc9d9efdf6d60151325c8d4d13fad7e10a15b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314999
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-03 03:41:26 +00:00
Mike Reed
13711ebe68 rename SkMipMap to SkMipmap
Change-Id: I1fa8a0482a717847236a30b4851061f4074b7755
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302644
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-07-15 13:26:13 +00:00
Mike Reed
2fe1569298 Create mipmaps when creating images
Follow-on CLs:
- add serialization for mips to pictures
- implement for other image types (e.g. lazy(?), gpu)
- improve generated mip quality

Bug: skia:10411
Change-Id: Id874f170e9cb8ae4405dc4f6249e1ea6274f20aa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297739
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-14 16:02:26 +00:00
Mike Reed
2955973dca remove helper now that g3 is updated
Change-Id: If14455faac4554729dfc16bb1d5299f2458a2d2b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302260
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-07-13 19:46:28 +00:00
Mike Reed
609ea210e2 more cleanup after removing volatile from bitmap
Change-Id: I3d7b2f59a5657640c3d60f5a2f6e1277d7593096
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302038
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-07-12 19:37:29 +00:00
Mike Reed
1434ce1aa9 Can we remove volatile from skbitmap?
Change-Id: I0faa324b91f2c291be56f5126361ffe7fd54eb65
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302037
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-07-12 17:48:59 +00:00
Leon Scroggins
565f17f29d Reland "Make SkBitmap/SkPixmap::erase* do so in sRGB"
This reverts commit 832c931d5b.

Reason for revert: To confirm whether it was blocking, and update
Chrome if necessary

Bug: skia:8663

Original change's description:
> Revert "Make SkBitmap/SkPixmap::erase* do so in sRGB"
>
> This reverts commit 6f44647e52.
>
> Reason for revert: checking to see if this is blocking the Chrome roll
>
> Original change's description:
> > Make SkBitmap/SkPixmap::erase* do so in sRGB
> >
> > We generally consider untagged colors to be sRGB, so this makes us more
> > consistent with other parts of the API.
> >
> > Add a test.
> >
> > Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
> > Change-Id: I5468c86ad92164797a65ffd9fbe471e01a97a2ca
> > Reviewed-on: https://skia-review.googlesource.com/c/179245
> > Commit-Queue: Leon Scroggins <scroggo@google.com>
> > Reviewed-by: Mike Reed <reed@google.com>
> > Reviewed-by: Mike Klein <mtklein@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
>
> TBR=djsollen@google.com,mtklein@google.com,scroggo@google.com,brianosman@google.com,reed@google.com
>
> Change-Id: Ia592adf2c790d294da1e32c1e83f9f34e81d79cc
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
> Reviewed-on: https://skia-review.googlesource.com/c/182083
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=djsollen@google.com,mtklein@google.com,robertphillips@google.com,scroggo@google.com,brianosman@google.com,reed@google.com

Cq-Include-Trybots: luci.chromium.try:linux-blink-rel;luci.chromium.try:android-kitkat-arm-rel;luci.chromium.try:android-marshmallow-arm64-rel;luci.chromium.try:linux-chromeos-rel;luci.chromium.try:linux_chromium_asan_rel_ng;luci.chromium.try:win7_chromium_rel_ng;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:mac_chromium_rel_ng;luci.chromium.try:linux_chromium_tsan_rel_ng;luci.chromium.try:linux_chromium_rel_ng;

Change-Id: I226fd5b6f298fad648b1d05c8a8e806eac874a46
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/182142
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2020-04-23 20:07:09 +00:00
Mike Klein
1cb5527bc6 remove enum docs
These docs repeat the possible values for these enums at
the time they were written ad nauseum.  They're not kept
up to date.

This is the result of searching for "one of" and deleting most.
I did keep one set of docs where some enum values were permitted
on some platforms and others on others.  And I kept docs for args
that didn't take enums but only accepted a particular range, like
[0,8] for matrix value indices or 0-4 for pixel size shifts.

Change-Id: Ib21ec54ebbc4abe456e9b3f436f3823d7da9097d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270107
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-02-11 21:43:07 +00:00
Mike Reed
55f6fc3064 IWYU -- colorspace no longer includes matrix44
Change-Id: I659552466940b76a339caaf124700303806fd082
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265456
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-01-21 21:37:32 +00:00
Mike Reed
a657b0c590 trim out unneeded references to SkString
Change-Id: I01259b685859e2d95e4b87c0f611ccc074bd5229
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254807
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-11-15 21:01:01 +00:00
Hal Canary
0d4f60c230 Docs: Add links to header files.
Change-Id: I5818b0dcfe58f086a25bd5a28ec2ab2d50c9985a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201398
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2019-10-18 19:24:13 +00:00
Robert Phillips
cc32642882 Fix SkPixmap and SkBitmap dox for computeByteSize
The SIZE_MAX behavior was added in response to https://bugs.chromium.org/p/skia/issues/detail?id=7132

Bug: skia:9242
Change-Id: If4bd0649c738f68967b0aaa83e43cd7930c87823
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225730
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-07-10 19:43:59 +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
930c29511f always zero SkMallocPixelRefs
I'm getting tired of trying to figure out where
clients screw up and forget to clear these buffers,
and I'd like a safer safety net for our own screw ups.

Bug: chromium:934161, many more
Change-Id: I6ada4c821da6dd173e54c6402c17d6946ff05fdf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207857
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-04-15 15:50:58 +00:00
Mike Reed
50acf8f04b add makeShader() to SkBitmap, and deprecate SkShader version
Bug: skia:8937
Change-Id: I42f011e04937a751222bd8ecc6c69b45cf9626a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206681
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-04-08 17:56:34 +00:00
Brian Osman
9fec5d390a Fix doc comment error for allocN32Pixels
Bug: skia:
Change-Id: I93fb561ed0b367c0a207b26aa297b997f06acfa7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203395
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-03-25 19:14:49 +00:00
Brian Osman
4cd0734f4c Remove bookmaker sources and data files
We're moving in a different direction for Skia documentation. We no
longer run bookmaker on the bots, and things have already degraded such
that it can't be run. This leaves the generated markdown in place for
the last set of docs that were generated (which are still useful until
the Doxygen docs catch up).

See also: https://skia-review.googlesource.com/c/skia/+/198162

Docs-Preview: https://skia.org/?cl=203464
Bug: skia:
Change-Id: I2f967a9c17dbc1cc899947d365071ef69cfb8ad7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203464
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-03-25 18:56:29 +00:00
Mike Klein
9707e907ae move some methods out of line
This started because I noticed some repeated symbols while disassembling
object files.  I decided to fix up one or two to kill time while waiting
for Blink layout tests, but then I got a little quixotic.  In the end, I
ran:

    ninja -C out && git add -u && nm -U -j out/obj/gm/gm.*.o | sort | uniq -c | sort -g | c++filt | less

And then outlined things that stuck out as funny, either because they
were big, because they were virtual, because there were many copies of
them, or some combination of those factors.

I'm on the fence about moving a few of SkRefCnt's virtuals out of line,
so I've left SkRefCnt.h unchanged for now.

I'm not sure that this is important.

Change-Id: I425d05aa4beabbae40dd8df465155bfb909ef43a
Reviewed-on: https://skia-review.googlesource.com/c/190422
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-02-08 15:41:36 +00:00
Robert Phillips
832c931d5b Revert "Make SkBitmap/SkPixmap::erase* do so in sRGB"
This reverts commit 6f44647e52.

Reason for revert: checking to see if this is blocking the Chrome roll

Original change's description:
> Make SkBitmap/SkPixmap::erase* do so in sRGB
> 
> We generally consider untagged colors to be sRGB, so this makes us more
> consistent with other parts of the API.
> 
> Add a test.
> 
> Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
> Change-Id: I5468c86ad92164797a65ffd9fbe471e01a97a2ca
> Reviewed-on: https://skia-review.googlesource.com/c/179245
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=djsollen@google.com,mtklein@google.com,scroggo@google.com,brianosman@google.com,reed@google.com

Change-Id: Ia592adf2c790d294da1e32c1e83f9f34e81d79cc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Reviewed-on: https://skia-review.googlesource.com/c/182083
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-01-08 13:04:24 +00:00
Leon Scroggins III
6f44647e52 Make SkBitmap/SkPixmap::erase* do so in sRGB
We generally consider untagged colors to be sRGB, so this makes us more
consistent with other parts of the API.

Add a test.

Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Change-Id: I5468c86ad92164797a65ffd9fbe471e01a97a2ca
Reviewed-on: https://skia-review.googlesource.com/c/179245
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-01-07 22:13:39 +00:00
Cary Clark
abaffd85ab bookmaker does deprecated
Bookmaker does not require documentation for public symbols
described as "deprecated", "private", or "experimental".
Adding one of these words (case-insensitive) to the symbol
description in the include file tells bookmaker that the bmh file
should not include documentation, and the generated markdown
should omit it in its indices and descriptions.

Symbols marked as "to be deprecated" or "may be deprecated"
are still regarded as public and documented.

Private notes in the includes that start with TODO: are
omitted as well.

This CL updated generated includes to describe its symbols
accordingly. The includes will be fully regenerated in a future
CL. The corresponding documentation has been deleted from the
bmh files, and the web markup has been regenerated.

TBR=reed@google.com
Docs-Preview: https://skia.org/?cl=169830
Bug: skia:
Change-Id: Ie6ec3ccdadb7be9ac15db4811823a30948c4af25
Reviewed-on: https://skia-review.googlesource.com/c/169830
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-11-15 14:08:45 +00:00
Leon Scroggins III
e5eb1a5904 Remove SkBitmap::[setH/h]asHardwareMipMap
These are no longer used by Android.

Change-Id: Ie3b9aa60af681f9e076a0d0680fc716ae51f9cd8
Reviewed-on: https://skia-review.googlesource.com/c/168486
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Auto-Submit: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-11-06 21:44:01 +00:00
Cary Clark
82456498d8 give include comments the once over
In preparation for upcoming changes to bookmaker
which validate more include contents, revise
generated files in include/core to fix various
errors.

Fixes include:
- references in comments to other Skia interface elements
- @param names agree with function declarations
- spelling typos
- generic references (e.g. 'x' in place of 'x-axis')
- lines longer than 100 columns

The fix to SkPath::rCubicTo triggered a parallel
fix to SkPath_Reference.bmh; other wed documentation
fixes will be in an upcoming CL.

TBR=reed@google.com

Docs-Preview: https://skia.org/?cl=166680
Bug: skia:
Change-Id: If734696dc64655f1cf40b121a180210c932b1d89
Reviewed-on: https://skia-review.googlesource.com/c/166680
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-10-31 15:37:37 +00:00
Mike Klein
fe5ad67dea remove deprecated SkBitmap::eraseRGB()
Change-Id: I1adf711d39f441154aa1c032d49583d0c45d2568
Reviewed-on: https://skia-review.googlesource.com/c/159482
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2018-10-04 15:37:27 +00:00
Mike Reed
c25f440d53 Reland "add getAlphaf() to pixmap/bitmap"
This is a reland of f3ebd312f2

PS 2: use faster half->float routine
PS 3: relax tolerance to 2^-10 for half, keeping others 2^-12

Original change's description:
> add getAlphaf() to pixmap/bitmap
>
> Convenient for just extracting alpha (and more efficient than getColor()) and
> works for super-normal formats w/o loss of precision.
>
> Somewhat inspired by examining multiple chrome call-sites for getColor(), where
> chrome only really cared about the alpha. This new method runs about twice
> as fast as getColor() for the simple cases (i.e. no colorspace xforms), and
> even faster in the complex cases (since retrieving alpha doesn't care about
> colorspaces).
>
> Bug: skia:
> Change-Id: I7cd5a2c7f78de781aaa69dd1aa0dba3c532fcb73
> Reviewed-on: https://skia-review.googlesource.com/155606
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

Cq-Include-Trybots: skia.primary:Test-Android-Clang-Nexus7-CPU-Tegra3-arm-Debug-All-Android,Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-SK_CPU_LIMIT_SSE2,Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-All,Test-Win2016-MSVC-GCE-CPU-AVX2-x86_64-Release-All,Test-Win8-Clang-Golo-CPU-AVX-x86_64-Debug-All
Bug: skia:
Change-Id: Ie94e5c89e185fde12cbd6c56ed4026c4dc5a1623
Reviewed-on: https://skia-review.googlesource.com/156242
Commit-Queue: Ravi Mistry <rmistry@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-21 17:41:03 +00:00
Robert Phillips
be852e44ef Revert "add getAlphaf() to pixmap/bitmap"
This reverts commit f3ebd312f2.

Reason for revert: unhappy bots

Original change's description:
> add getAlphaf() to pixmap/bitmap
> 
> Convenient for just extracting alpha (and more efficient than getColor()) and
> works for super-normal formats w/o loss of precision.
> 
> Somewhat inspired by examining multiple chrome call-sites for getColor(), where
> chrome only really cared about the alpha. This new method runs about twice
> as fast as getColor() for the simple cases (i.e. no colorspace xforms), and
> even faster in the complex cases (since retrieving alpha doesn't care about
> colorspaces).
> 
> Bug: skia:
> Change-Id: I7cd5a2c7f78de781aaa69dd1aa0dba3c532fcb73
> Reviewed-on: https://skia-review.googlesource.com/155606
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

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

Change-Id: I82ce00c09d16bf3e9b04f1c1bccd8cc6aa706ab2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/156000
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-09-20 19:48:08 +00:00
Mike Reed
f3ebd312f2 add getAlphaf() to pixmap/bitmap
Convenient for just extracting alpha (and more efficient than getColor()) and
works for super-normal formats w/o loss of precision.

Somewhat inspired by examining multiple chrome call-sites for getColor(), where
chrome only really cared about the alpha. This new method runs about twice
as fast as getColor() for the simple cases (i.e. no colorspace xforms), and
even faster in the complex cases (since retrieving alpha doesn't care about
colorspaces).

Bug: skia:
Change-Id: I7cd5a2c7f78de781aaa69dd1aa0dba3c532fcb73
Reviewed-on: https://skia-review.googlesource.com/155606
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-20 19:25:22 +00:00
Cary Clark
9bb34b74f3 update generated includes
This fixes all comments in generated includes
to fit in 100 columns.

TBR=reed@google.com

Bug: skia:6898
Change-Id: I6d28a24d4e2d079e4a9284d4b2a25326dc5f2dc6
Reviewed-on: https://skia-review.googlesource.com/154440
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-09-13 19:03:00 +00:00
Brian Osman
f6db495d2d Remove SkTransferFunctionBehavior
Bug: skia:
Change-Id: Iccbe609b2a8d4c9098ef36aa6530dbc3771e0c11
Reviewed-on: https://skia-review.googlesource.com/141055
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-07-17 14:18:20 +00:00
Cary Clark
7651c1611e refresh generated includes
the newest ones (SkBlendMode.h, SkPicture.h, SkRRect.h)
need additional editing; enough has changed that it is
time to refresh anyway.

TBR=reed@google.com

Docs-Preview: https://skia.org/?cl=141043
Bug: skia:6818
Change-Id: Ic123b02f57005a087f8655cafa1a2537529beca5
Reviewed-on: https://skia-review.googlesource.com/141043
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-07-13 14:23:24 +00:00
Brian Osman
b62f50cf76 Replace nearly all kRespect with kIgnore
- Encoders and decoders always assume kIgnore.
- They are less opinionated about F16 and color space,
  we just trust the color space that's passed in, and
  put that directly in the image (no sRGB encoding).
- SkBitmap and SkPixmap read/write pixels functions were
  defaulting to kResepct, those are now always kIgnore.
- Many other bits of plumbing are simplified, and I
  added a default of kIgnore to SkImage::makeColorSpace,
  so we can phase out that argument entirely.
- Still need to add defaults to other public APIs that
  take SkTransferFunctionBehavior.

- This makes gold think that we've dramatically changed
  the contents of all F16 images, but that's because
  it doesn't understand the (now linear) color space
  that's embedded. Once we triage them all once, they
  will work fine (and they'll look perfect in the browser).

Bug: skia:
Change-Id: I62fa090f96cae1b67d181ce14bd91f34ff2ed747
Reviewed-on: https://skia-review.googlesource.com/140570
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-07-12 20:54:14 +00:00
Cary Clark
27dddae313 rebase
This reverts commit 32a4910e57.

Reason for revert: SkMatrix::toString use has been removed from flutter
and has been picked up in fuchsia

Additionally some bookmaker changes take into account recent
additions of typedef comments and the generated header comment.

Original change's description:
> Revert "remove toString"
>
> This reverts commit 5191880cbf.
>
> Reason for revert: broke flutter
>
> Original change's description:
> > remove toString
> >
> > toString may have been used by obsolete debugger only
> > find out if that is so
> >
> > R=​brianosman@google.com,bsalomon@google.com
> >
> > Docs-Preview: https://skia.org/?cl=119894
> > Bug:830651
> > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd
> > Reviewed-on: https://skia-review.googlesource.com/119894
> > Commit-Queue: Cary Clark <caryclark@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org
>
> Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c

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

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

Reviewed-on: https://skia-review.googlesource.com/129623
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@google.com>
Docs-Preview: https://skia.org/?cl=133583
Bug: 830651
Change-Id: If8499e796be63580ad419e150e94d43e8b89de1b
Reviewed-on: https://skia-review.googlesource.com/133583
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-06-08 20:36:53 +00:00
Cary Clark
9149954e3a update SkColor
SkColor.h generated include.

Also add generated comment for all files.
And, added typedef documentation where missing.

TBR=reed@google.com

Bug: skia:6898
Change-Id: Ib7757d70c1926b5ae04a5de557711756fce631b6
Reviewed-on: https://skia-review.googlesource.com/132827
Auto-Submit: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-06-08 16:36:31 +00:00
Cary Clark
89ad31e97c Revert "Reland "remove toString""
This reverts commit 92e37b6d79.

Reason for revert: toString still used by flutter

Original change's description:
> Reland "remove toString"
> 
> This reverts commit 32a4910e57.
> 
> Reason for revert: SkMatrix::toString use has been removed from flutter and has been picked up in fuchsia
> 
> Original change's description:
> > Revert "remove toString"
> > 
> > This reverts commit 5191880cbf.
> > 
> > Reason for revert: broke flutter
> > 
> > Original change's description:
> > > remove toString
> > > 
> > > toString may have been used by obsolete debugger only
> > > find out if that is so
> > > 
> > > R=​brianosman@google.com,bsalomon@google.com
> > > 
> > > Docs-Preview: https://skia.org/?cl=119894
> > > Bug:830651
> > > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd
> > > Reviewed-on: https://skia-review.googlesource.com/119894
> > > Commit-Queue: Cary Clark <caryclark@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > 
> > TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org
> > 
> > Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: 830651
> > Reviewed-on: https://skia-review.googlesource.com/129340
> > Reviewed-by: Cary Clark <caryclark@google.com>
> > Commit-Queue: Cary Clark <caryclark@google.com>
> 
> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: 830651
> Change-Id: Ida8725b6051132d8c46faf99358a8fcc1bcabf34
> Reviewed-on: https://skia-review.googlesource.com/129623
> Reviewed-by: Cary Clark <caryclark@skia.org>
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Cary Clark <caryclark@google.com>

TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org

Change-Id: Iafc59ffc1b3db67c520ba31bf12d68e1b46c0ea2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 830651
Reviewed-on: https://skia-review.googlesource.com/131082
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2018-05-31 12:27:44 +00:00
Cary Clark
92e37b6d79 Reland "remove toString"
This reverts commit 32a4910e57.

Reason for revert: SkMatrix::toString use has been removed from flutter and has been picked up in fuchsia

Original change's description:
> Revert "remove toString"
> 
> This reverts commit 5191880cbf.
> 
> Reason for revert: broke flutter
> 
> Original change's description:
> > remove toString
> > 
> > toString may have been used by obsolete debugger only
> > find out if that is so
> > 
> > R=​brianosman@google.com,bsalomon@google.com
> > 
> > Docs-Preview: https://skia.org/?cl=119894
> > Bug:830651
> > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd
> > Reviewed-on: https://skia-review.googlesource.com/119894
> > Commit-Queue: Cary Clark <caryclark@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org
> 
> Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 830651
> Reviewed-on: https://skia-review.googlesource.com/129340
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Cary Clark <caryclark@google.com>

TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org

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

Bug: 830651
Change-Id: Ida8725b6051132d8c46faf99358a8fcc1bcabf34
Reviewed-on: https://skia-review.googlesource.com/129623
Reviewed-by: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2018-05-31 11:43:13 +00:00
Cary Clark
462505f310 include refresh
Update the includes to match the bookmaker docs.
All edits are generated; if something looks amiss, I
probably introduced a bug in the generator. Please
let me know.

I was careful to pick up all direct edits to the includes
and add them to their bookmaker counterpart. Please take
a look to see if your favorites are there.

Note that enum and struct members have been shortened
to fit on one line. The intent is to provide more verbose
documentation online. Let me know if this is too terse.

TBR=reed@google.com
Bug: skia:6898
Change-Id: I374673ed884e03e142439d91532efc558deeaccd
Reviewed-on: https://skia-review.googlesource.com/130540
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-05-30 13:51:43 +00:00
Cary Clark
32a4910e57 Revert "remove toString"
This reverts commit 5191880cbf.

Reason for revert: broke flutter

Original change's description:
> remove toString
> 
> toString may have been used by obsolete debugger only
> find out if that is so
> 
> R=​brianosman@google.com,bsalomon@google.com
> 
> Docs-Preview: https://skia.org/?cl=119894
> Bug:830651
> Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd
> Reviewed-on: https://skia-review.googlesource.com/119894
> Commit-Queue: Cary Clark <caryclark@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org

Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 830651
Reviewed-on: https://skia-review.googlesource.com/129340
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2018-05-20 23:15:48 +00:00
Cary Clark
5191880cbf remove toString
toString may have been used by obsolete debugger only
find out if that is so

R=brianosman@google.com,bsalomon@google.com

Docs-Preview: https://skia.org/?cl=119894
Bug:830651
Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd
Reviewed-on: https://skia-review.googlesource.com/119894
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-05-20 21:16:37 +00:00
Cary Clark
99885411ae remove SK_IGNORE_TO_STRING
SK_IGNORE_TO_STRING is not defined anywhere.
The same effect can be had by using a modern
linker.

Removing it simplifies bookmaker and makes
our includes easier to understand.

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

Bug: skia:6898
Change-Id: Ib716f5ef1b42a7fbda0df43ece212d1b7c40289f
Reviewed-on: https://skia-review.googlesource.com/118963
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-04-05 23:52:23 +00:00
Cary Clark
ecf548bf8a update autogenerated includes
SkImageInfo.h is generated for the first time.
Minor corrections in the other includes.

TBR=reed@google.com
Bug: skia:6898
Change-Id: I9a16753e234ace3bfbcc5b58381347fd0e63b1c8
Reviewed-on: https://skia-review.googlesource.com/118168
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-04-03 16:33:10 +00:00
Cary Clark
7595939168 updated includes
update includes to latest
bookmaker docs

TBR=reed@google.com
Bug: skia:6898
Change-Id: If42ab25f98a0f0d8b410ae30ca1cd641e19ce89f
Reviewed-on: https://skia-review.googlesource.com/107021
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-02-27 16:37:39 +00:00
Hal Canary
99578d24c0 SkBitmap now *has* a SkPixmap.
Before:

    class SkBitmap {
        sk_sp<SkPixelRef> fPixelRef;
        void*             fPixels;
        SkImageInfo       fInfo;
        uint32_t          fRowBytes;
        uint8_t           fFlags;
    };

After:

    class SkBitmap {
        sk_sp<SkPixelRef> fPixelRef;
        SkPixmap          fPixmap;
        uint8_t           fFlags;
    };

Change-Id: I62d59ca3e702b7adea022cd3cfbf0cc3186af957
Reviewed-on: https://skia-review.googlesource.com/85560
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2018-01-09 16:46:22 +00:00
Hal Canary
3c7d882c48 SkBitmap::fPixelRefOrigin removed
Motivation: makes SkBitmap 8 bytes smaller.

fPixelRefOrigin is rarely used, and can be recaluated when needed.

Also, remove two of SkBitmap's private methods and fold in their
functions.

Change-Id: I2cddb9e4b5480404bf6da3edfb0155ab82cf47d2
Reviewed-on: https://skia-review.googlesource.com/91300
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-01-08 13:50:59 +00:00
Cary Clark
2823f9f06c refresh public includes
Update includes to fix minor edits
and bookmaker bugs.

Also update SkPoint.h for the first
time to see if that sticks.

TBR=reed@google.com
Bug: skia:6898
Change-Id: I7d11dea45482602248e2d15b05699bb4c86ea4c6
Reviewed-on: https://skia-review.googlesource.com/90541
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-01-03 15:21:49 +00:00
Hal Canary
a088365e2f SkBitmap::pixmap
Change-Id: I6d062b9ae1d242970be140d5a1885639c8c45f77
Reviewed-on: https://skia-review.googlesource.com/85320
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-12-15 01:23:57 +00:00
Mike Reed
efe7c49201 remove read/write rawpixels
Bug: skia:
Change-Id: I000b70414119355fef0d45de4ae9ef996b8a5568
Reviewed-on: https://skia-review.googlesource.com/77903
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-11-30 21:43:08 +00:00
Cary Clark
cc309eb9b1 generated include refresh
The latest, minor changes on includes already
generated, plus four new ones.

TBR=reed@google.com
Bug: skia:6898
Change-Id: If06ae9b9aaa3a0a9fae570aa7a6698ff340c43b8
Reviewed-on: https://skia-review.googlesource.com/62862
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-10-30 16:30:49 +00:00