This makes accessing the GPU resource behind an SkImage a lot more typesafe. Additionally, the GrBackendObject is being deprecated so this is the path forward.
I split the controversial stuff off into https://skia-review.googlesource.com/c/skia/+/118575 (Add SkImage::setLayout call).
Change-Id: I297e72770e8fb360fac7c7cd74f050ae759ae133
Reviewed-on: https://skia-review.googlesource.com/118571
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Check to see if a method is inside a struct or class
before increasing its indentation. Also, add missing
description.
Docs-Preview: https://skia.org/?cl=118381
Bug: skia:6898
Change-Id: I9402442a89dafc96d87bf69f157dcfa40cdf6e2b
Reviewed-on: https://skia-review.googlesource.com/118381
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
- More rigorous symbol identification creates additional
links, and finds spurious errors like unnecessary
parentheses.
- Fixed code to allow preprocessor directives in
#Code blocks (still more to do).
- Fixed examples waiting on fiddle updates.
- Make SkImageInfo officially documented (update in status.json).
- Fixed enum indentation.
Docs-Preview: https://skia.org/?cl=115656
Bug: skia:6898
Change-Id: Ifcf5cfd3f6c03b3b83155c898b2b035a2f3d443c
Reviewed-on: https://skia-review.googlesource.com/115656
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Newly added MakeRenderTarget doesn't have
an example yet, so just mark it as such;
and remove the doxygen style comments.
MakeFormBackendRenderTarget was missing
TBR=robertphillips@google.com
Docs-Preview: https://skia.org/?cl=117629
NOTRY=true
Bug: skia:6898
Change-Id: Icf6fb7195503b54c96cbf3a5785c2c4b3c0f9d8d
Reviewed-on: https://skia-review.googlesource.com/117629
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
fix a couple of fiddles with changed output
rewrite some SkSurface image makers
move towards replacing SkImageInfo.h
R=caryclark@google.com
Docs-Preview: https://skia.org/?cl=115163
Bug: skia:6898
Change-Id: Id9895b051cd457336c30250a69cf95359d1d34d7
Reviewed-on: https://skia-review.googlesource.com/115163
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
If a method in an include is marked deprecated, make sure that
the documentation is marked deprecated.
It's OK for the documentation to mark something deprecated that
is not marked as such in the includes since the documentation may
be ahead of the includes.
Fix a couple of mistakes found around deprecated methods.
Docs-Preview: https://skia.org/?cl=114184TBR=caryclark@google.com
Bug: skia:6898
Change-Id: I2bb4c293d7bf28e5d12f9ae01b7be49ce48b9ee4
Reviewed-on: https://skia-review.googlesource.com/114184
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
more imageinfo text
rewrote many examples to fix newly exposed compiler warnings
marked a couple of YUV method bodies as deprecated
also cleaned up line endings to use the linux style
R=bsalomon@google.comTBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=112302
Bug: skia:6898
Change-Id: I89626a27353aa84526f9b9475d927bd0e9d8f0d5
Reviewed-on: https://skia-review.googlesource.com/112302
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
Remove unused GrBackendObject variants.
Add versions without redundant size param.
Make this work with GrBackendTextures that weren't created with a GrPixelConfig.
Change-Id: Ic1bbf5f2817cebab938b4f31000126a6ab5c44d5
Reviewed-on: https://skia-review.googlesource.com/114460
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
drawTextRSXform should draw the same as drawTextOnPath (as regards shaders)
Bug: b/69904791
Change-Id: I393dd8fd7a5bdc6a018b1ca33592b208c7141868
Reviewed-on: https://skia-review.googlesource.com/114468
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
SkPaint flatten and unflatten rely
on interfaces that are not public,
SkReadBuffer and SkWriteBuffer.
R=reed@google.com
Bug: skia:6172
Change-Id: I487af9f8931c78daf763c51d9e0d3ff8ff440b22
Reviewed-on: https://skia-review.googlesource.com/112561
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
SkDumpCanvas was replaced by SkDebugCanvas as an undefined reference,
but SkDumpCanvas was not added to undocumented.bmh and caused bookmaker
to generate a broken version of site/user/api/SkCanva_Reference.md
The Skia-Commit-Bot detected that the SkCanvas_Reference.md was
changed, and checked it in, causing the online version of SkCanvas
like https://skia.org/user/api/SkCanvas_Reference#SkCanvas_readPixels
to be truncated.
I assume there is a mistake in bookmaker where it wrote an error
to stdout but failed to abort the tool when the *.md file was partially
written. I'll look into that.
This CL adds SkDebugCanvas to undocumented.bmh to fix the documentation.
TBR=brianosman@google.com,rmistry@google.com
Docs-Preview: https://skia.org/?cl=113700
Bug: skia:6898
Change-Id: Ib4e32eea3e56c178d0016f8ae392e28aab5ffafa
Reviewed-on: https://skia-review.googlesource.com/113700
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
This adds the ability to define long phrases
in one place and refer to those phrases in
many places.
Bookmaker has new syntax to support phrase substitution.
When it encounters
#some_phrase_reference#
It substitutes the body of
#PhraseDef some_phrase_reference
text to substitute when encountering the phrase
##
The phrase label must start with a lowercase letter,
and be bracketed by single hash marks, without spaces
between the label and the hash marks.
Docs-Preview: https://skia.org/?cl=111224TBR=caryclark@google.com
Bug: skia:6898
Change-Id: I12c57d916ccedbd86b421377d117399150ada72a
Reviewed-on: https://skia-review.googlesource.com/111224
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
move the #Line directive to make bookmaker happy
Docs-Preview: https://skia.org/?cl=108740
Bug: skia:6898
Change-Id: I8b993bab6b4f69cc266941e281a00a945f32f25e
Reviewed-on: https://skia-review.googlesource.com/108740
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Florin pointed out docs that used SkPoint where
SkIPoint was intended. This was caused by the
original documentation guessing that 'points'
referred to one and not the other.
For now, use IPoint explicitly in the documentation
to get around this.
Docs-Preview: https://skia.org/?cl=108569
Bug: skia:6898
Change-Id: I12bac1d4cf82a614bee98895f12e4f99add2dbd7
Reviewed-on: https://skia-review.googlesource.com/108569
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Recent changes to generate tables of methods
require more parsing to figure things like
indention params for structs.
Fix other stuff that got broken since the last
time all includes were generated.
TBR=caryclark@google.com
Bug: skia:6898
Change-Id: Icd6f5feb5324eb4e0feb307400aa53207109cb29
Reviewed-on: https://skia-review.googlesource.com/108182
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
generating replacement includes exposed
errors mostly dealing with globals like
SkAlphaType and members. Rewrite finding
and resolving links to hopefully make this
area more robust.
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=107160
Bug: skia:6898
Change-Id: I9b8025160203d204286f3f6ca0cebd70da6253b4
Reviewed-on: https://skia-review.googlesource.com/107160
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
This reverts the revert 9ff8c8c073.
Original:
This is a performance-only hint that no one but fuzzers
is using. It's even explicitly filtered out in Android.
The fuzzers have noticed they can trick us into allocating
uninitialized memory and treating it as opaque, blending
uninitialized pixels, etc.
Since no one's using this, we can just kill the bit.
Bug: skia:7566, chromium:808830
Docs-Preview: https://skia.org/?cl=105282
Change-Id: I4326c663f777aa373ff7ec9f319519da9729350d
Reviewed-on: https://skia-review.googlesource.com/105282
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
add self-check looking for #In markup on every method, pointing
to an existing #Subtopic to reference the method.
Docs-Preview: https://skia.org/?cl=104325
Bug: skia:6898
Change-Id: I749a25b9a43033ae68d193249b2c0b810dcf8fc8
Reviewed-on: https://skia-review.googlesource.com/104325
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
This reverts commit 9a7a2ee5ad.
Reason for revert: still need to update blink_headless in Google3
Original change's description:
> remove SkCanvas::kIsOpaque_SaveLayerFlag
>
> This is a performance-only hint that no one but fuzzers
> is using. It's even explicitly filtered out in Android.
>
> The fuzzers have noticed they can trick us into allocating
> uninitialized memory and treating it as opaque, blending
> uninitialized pixels, etc.
>
> Since no one's using this, we can just kill the bit.
>
> Bug: skia:7566, chromium:808830
>
> Change-Id: Id74a85e51bc4d0907b4127eb9ac5b02576f8f0a7
> Reviewed-on: https://skia-review.googlesource.com/104441
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
TBR=mtklein@chromium.org,fmalita@chromium.org,reed@google.com
Change-Id: I10d3c7e5184b9322715a5bfb6a7106292c8876a3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7566, chromium:808830
Reviewed-on: https://skia-review.googlesource.com/104781
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This is a performance-only hint that no one but fuzzers
is using. It's even explicitly filtered out in Android.
The fuzzers have noticed they can trick us into allocating
uninitialized memory and treating it as opaque, blending
uninitialized pixels, etc.
Since no one's using this, we can just kill the bit.
Bug: skia:7566, chromium:808830
Change-Id: Id74a85e51bc4d0907b4127eb9ac5b02576f8f0a7
Reviewed-on: https://skia-review.googlesource.com/104441
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
- mark the interfaces that use SkMask as deprecated
- add more autogenerated subtopics
- make subtopic names singular, avoiding collision with Skia names
- simplify #Deprecated and #Bug tags
- add "#Deprecated soon" to note things to be deprecated
- fix some spelling errors
- refresh web docs
- add self-check functionality to find methods outside subtopics
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=102150
Bug: skia:6898
Change-Id: I0e742a56d49dccd4409bb68eed9167c8ad7611ce
Reviewed-on: https://skia-review.googlesource.com/102150
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Replace manually entered summary tables with ones that are populated
and sorted by bookmaker. This introduces a slight regression for
anonymous enums but fixes a lot of bugs and omissions.
The format is
#Topic somethingTopical
#Populate
##
where somethingTopical is one of Subtopics, Constructors, Constants,
Classes_and_Structs, Members, Member_Functions, and Related_Functions.
Fix the bad formatting in SkCanvas reference. The #Error tag was
was corrupting the markdown table. Remove the tag and replace it
with #NoExample.
Next up: revise self-check to know about populated topics.
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=102080
Bug: skia:6898
Change-Id: Idef5d1c14c740c18a81d6a5106182788dd2a09e1
Reviewed-on: https://skia-review.googlesource.com/102080
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
- make descriptions of table entries phrases instead of sentences;
lower case start, no ending period (not enforced, yet)
- add #Line markup to move one line descriptions to the #Method
body. Later, will generate tables like Member_Functions from this
- add #In markup to associate a #Method with a #Subtopic. Later, will
generate tables of related methods from this
- remove return type from operator overloads in tables
- add new colorTypes to examples that index into arrays of strings
to name them
Docs-Preview: https://skia.org/?cl=100422TBR=caryclark@google.com
Bug: skia:6898
Change-Id: I8558048866369f419f1944832b99c05da3fd52bb
Reviewed-on: https://skia-review.googlesource.com/100422
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Added global enum support. That exposed one
big hole in bookmaker: The topic overview
should not be in the class or struct if
the topic includes multiple objects, which
is the case for SkImageInfo and enums like
SkColorType.
This straightens that out, and then used that
knowledge to strengthen the topics in
SkRect as a test. Now SkRect has more
groups of methods, and can expose and link
to sets of methods with the same name.
This work also is getting ready for tightening
SeeAlso data, to be checked as part of the
bots' tasks soon.
Also, remove links from markup for lowercase
method names unless the reference has
trailing parentheses.
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=98782
Bug: skia:6898
Change-Id: I35419c9789da17e272047bf7b9c95b1cf44bb7fe
Reviewed-on: https://skia-review.googlesource.com/98782
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@google.com>
Add self-checking code that looks to see that overview is populated
and alphabetized. Eventually, this will self-check to see if
methods are collected into subtopics and have reciprocal 'see also'
data.
Standardize phrases so that they don't start with a capital or end
with a period.
Self-check is a work in progress, so it is not yet run by the
bookmaker bots. The self-check should run cleanly, however. To run
it:
./out/skia/bookmaker -b docs -k
The expected output is doc stats. Self-check errors such as missing
methods in the overview would be reported here if there are any.
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=93621
Bug: skia:6898
Change-Id: I8f1f817a7b083b13138ee33d1aa090445e9304c6
Reviewed-on: https://skia-review.googlesource.com/93621
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>