aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkPaint.h
Commit message (Collapse)AuthorAge
* Centralize bitmap glyph positioningGravatar Herb Derby2018-07-26
| | | | | | | | | | | | | | | Centralize all text drawing for bitmap devices into SkGlyphRunListDrawer. All drawing decisions are encapsulated in this class, and its behavior only depends on contant properties of the device. The method drawForBitmap will probably have to be converted to a template based in preliminary performance numbers. Change-Id: Id21567c1511eee9d2e9e20c7ae93544530cfdb81 Reviewed-on: https://skia-review.googlesource.com/143106 Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* SkUtils: remove some versions of UTF routines.Gravatar Hal Canary2018-07-25
| | | | | | | Change-Id: Ib1f776ae472117c23d2145253adf25fceb412b32 Reviewed-on: https://skia-review.googlesource.com/143111 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* refresh generated includesGravatar Cary Clark2018-07-13
| | | | | | | | | | | | | | | 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>
* Fix SkPaint::getTypeface() documentation.Gravatar Ben Wagner2018-06-25
| | | | | | | | | | | | | 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>
* refresh generated includesGravatar Cary Clark2018-06-14
| | | | | | | | | | | | | | Found some bookmaker bugs that were suppressing spelling errors and syntax errors. TBR=reed@google.com Bug: skia:6898 Change-Id: Ie7331dd03723d987cb2df46018a984f42d0ee518 Reviewed-on: https://skia-review.googlesource.com/134942 Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@skia.org> Auto-Submit: Cary Clark <caryclark@skia.org>
* Revert "Revert "SkTypes: extract SkTo""Gravatar Hal Canary2018-06-14
| | | | | | | | | | | | | | | | This reverts commit fdcfb8b7c23fbf18f872d2c31d27978235033876. > Original change's description: > > SkTypes: extract SkTo > > > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > > Reviewed-on: https://skia-review.googlesource.com/133620 > > Reviewed-by: Mike Klein <mtklein@google.com> Change-Id: Ida74fbc5c21248a724a5edbf9fae18a33bcb23aa Reviewed-on: https://skia-review.googlesource.com/134506 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "SkTypes: extract SkTo"Gravatar Hal Canary2018-06-13
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2a2f67592602b18527bc3fd449132d420cd5b62e. Reason for revert: this appears to be what is holding up the Chrome roll. Original change's description: > SkTypes: extract SkTo > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > Reviewed-on: https://skia-review.googlesource.com/133620 > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,halcanary@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Iafd738aedfb679a23c061a51afe4b98a8d4cdfae Reviewed-on: https://skia-review.googlesource.com/134504 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkTypes: extract SkToGravatar Hal Canary2018-06-12
| | | | | | Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 Reviewed-on: https://skia-review.googlesource.com/133620 Reviewed-by: Mike Klein <mtklein@google.com>
* rebaseGravatar Cary Clark2018-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 32a4910e57b1fdd3c8671de1ee85e05ca21d079f. 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 5191880cbf3ee4d122b0d11b4945fbab0784fda7. > > 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>
* update SkColorGravatar Cary Clark2018-06-08
| | | | | | | | | | | | | | | | 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>
* Revert "Reland "remove toString""Gravatar Cary Clark2018-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 92e37b6d79f12ccfaaf7671413316952d182267d. Reason for revert: toString still used by flutter Original change's description: > Reland "remove toString" > > This reverts commit 32a4910e57b1fdd3c8671de1ee85e05ca21d079f. > > 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 5191880cbf3ee4d122b0d11b4945fbab0784fda7. > > > > 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>
* Reland "remove toString"Gravatar Cary Clark2018-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 32a4910e57b1fdd3c8671de1ee85e05ca21d079f. 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 5191880cbf3ee4d122b0d11b4945fbab0784fda7. > > 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>
* include refreshGravatar Cary Clark2018-05-30
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* Rename GrAtlasTextContext -> GrTextContextGravatar Herb Derby2018-05-24
| | | | | | | | Change-Id: I309b39425afc9b45095241eeb299096bc426afed Reviewed-on: https://skia-review.googlesource.com/130029 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Revert "remove toString"Gravatar Cary Clark2018-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5191880cbf3ee4d122b0d11b4945fbab0784fda7. 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>
* remove toStringGravatar Cary Clark2018-05-20
| | | | | | | | | | | | | | 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>
* fonts: Handle fallback to using paths for text rendering for remoting.Gravatar Khushal2018-05-17
| | | | | | | | | | | | | | | | | | SkRemoteGlyphCache only sends images for glyphs, even for cases where the gpu falls back to drawing text as paths. This includes cases in SkDraw::ShouldDrawTextAsPaths and when the glyph exceeds the max bounds that can fit on the atlas. Fix this by identifying these cases in the renderer and sending paths instead. Note: We still don't handle distance field text correctly. R=herb@google.com, bsalomon@google.com Bug: skia:7913 Change-Id: I17d4eccbeaa2e995ae67b61c76cebd27f8280329 Reviewed-on: https://skia-review.googlesource.com/128203 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
* Remove SkPaint::Flags::kDevKernFlag.Gravatar Ben Wagner2018-05-09
| | | | | | | | | It isn't used any more. Change-Id: I79fbbac13bb2595da0ae0cea7e42bca8fcccd8e8 Reviewed-on: https://skia-review.googlesource.com/127127 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Herb Derby <herb@google.com>
* Simplify textToGlyphsGravatar Herb Derby2018-05-02
| | | | | | | | | Change-Id: I9f2ae8e669ab3c22b66f9b10bd2650b5f5ab0bd4 Reviewed-on: https://skia-review.googlesource.com/125345 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com> Auto-Submit: Herb Derby <herb@google.com>
* Reland "Remove devKerning"Gravatar Herb Derby2018-05-02
| | | | | | | | | | | | | | | | | | | | | | This is a reland of c86c5c0144b85d0bc8ec791f9609ee2d4e7d835a Original change's description: > Remove devKerning > > Dev kerning is not supported by any scalers. This is > mostly removed. The remaining fields fRsbDelta and > fLsbDelta are kept to keep Android compiling. > > Change-Id: If1a9ee9bb599d4e1bdf4b3751ac0c65246350809 > Reviewed-on: https://skia-review.googlesource.com/124921 > Reviewed-by: Ben Wagner <bungeman@google.com> > Commit-Queue: Herb Derby <herb@google.com> Change-Id: Ibf5fac5f1442c7e62392d5146ad460da27b10d5c Reviewed-on: https://skia-review.googlesource.com/125300 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Revert "Remove devKerning"Gravatar Mike Klein2018-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c86c5c0144b85d0bc8ec791f9609ee2d4e7d835a. Reason for revert: 4 of 5 Original change's description: > Remove devKerning > > Dev kerning is not supported by any scalers. This is > mostly removed. The remaining fields fRsbDelta and > fLsbDelta are kept to keep Android compiling. > > Change-Id: If1a9ee9bb599d4e1bdf4b3751ac0c65246350809 > Reviewed-on: https://skia-review.googlesource.com/124921 > Reviewed-by: Ben Wagner <bungeman@google.com> > Commit-Queue: Herb Derby <herb@google.com> TBR=bungeman@google.com,herb@google.com,reed@google.com Change-Id: If865f702868192a1b72cd811baa996dd1282bbce No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/125263 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Remove devKerningGravatar Herb Derby2018-05-01
| | | | | | | | | | | Dev kerning is not supported by any scalers. This is mostly removed. The remaining fields fRsbDelta and fLsbDelta are kept to keep Android compiling. Change-Id: If1a9ee9bb599d4e1bdf4b3751ac0c65246350809 Reviewed-on: https://skia-review.googlesource.com/124921 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* alternative no anonymous enumsGravatar Cary Clark2018-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Anonymous enums play havoc with documentation; there's no name to refer to. It may be that all enums may either be named or replaced with constexpr without breaking anything. Try replacing all anonymous enums in include/core to see what happens. This names SkCanvas::SaveLayerFlagsSet but leaves SkCanvas::SaveLayerFlags as a uint32_t, to reduce risk as compared to review.skia.org/123584. There's also some chance that external linkage will break if some client refers to anonymous enum in a way that could require its address: see https://stackoverflow.com/questions/22867654/enum-vs-constexpr-for-actual-static-constants-inside-classes (This CL does not require definitions + declarations) Brought bookmaker docs in line with this change. This also tripped over missing code in bookmaker handling constexpr so added that as well. R=reed@google.com,bsalomon@google.com Docs-Preview: https://skia.org/?cl=123920 Docs-Preview: https://skia.org/?cl=123584 Bug: skia:6898 Change-Id: I14a342edcfd59e139ef9e4501f562417c4c60391 Reviewed-on: https://skia-review.googlesource.com/123920 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Cary Clark <caryclark@skia.org>
* Remove SkPaint::kGenA8FromLCD_Flag.Gravatar Ben Wagner2018-04-16
| | | | | | | | | | | | | The original intent of this flag is now handled by SkPixelGeomety on SkSurfaceProps on SkSurface. BUG=skia:7515 Change-Id: I54bb1be072b5b5b2164a59196bfeacac254823c7 Reviewed-on: https://skia-review.googlesource.com/121346 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* remove SK_IGNORE_TO_STRINGGravatar Cary Clark2018-04-05
| | | | | | | | | | | | | | | | | | | 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>
* Remove SkAutoGlyphCache decls that happen to workGravatar Herb Derby2018-03-22
| | | | | | | | | | ...and fix sample code. Change-Id: I673770125064f8451e3d88ec4929a68409935ad1 Reviewed-on: https://skia-review.googlesource.com/115995 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* make paint flatten unflatten privateGravatar Cary Clark2018-03-12
| | | | | | | | | | | | | 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>
* updated includesGravatar Cary Clark2018-02-27
| | | | | | | | | | | | 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>
* Remove GrStencilAndCoverTextContextGravatar Robert Phillips2018-02-07
| | | | | | | | TBR=bsalomon@google.com Change-Id: Ibbb26e2ba74df43c3156f95bea258cda998500cb Reviewed-on: https://skia-review.googlesource.com/105260 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Move glyph cache and descriptor functions off of SkPaintGravatar Herb Derby2018-01-23
| | | | | | | | | BUG=skia:7515 Change-Id: If17b157db1077a9a3c0f9efd03929f62a3486419 Reviewed-on: https://skia-review.googlesource.com/98841 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Herb Derby <herb@google.com>
* Clean up SkScalerContext descriptor creationGravatar Herb Derby2018-01-23
| | | | | | | | | | | | | | | | Allow a descriptor creation using just a rec and effects. This is the most complex part of the change. Cleanup SkScalerContextFlags to be a real thing. This has spread everywhere. BUG=skia:7515 Change-Id: I67189c9aeb51f1777a1c60145216524d440cb890 Reviewed-on: https://skia-review.googlesource.com/98320 Commit-Queue: Herb Derby <herb@google.com> Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* remove unused SkRasterizerGravatar Mike Reed2018-01-21
| | | | | | | | Bug: skia:7500 Change-Id: Iaa683cf8f0b18887cce4ec676631d1e1efee1712 Reviewed-on: https://skia-review.googlesource.com/97400 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* validate paint setters in readbufferGravatar Mike Reed2018-01-18
| | | | | | | | Bug: skia:7425 Change-Id: I55213bc206cf5cfb8cbf4fbe8a682efd6eae59fa Reviewed-on: https://skia-review.googlesource.com/96860 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Herb Derby <herb@google.com>
* Support scaled color emojis for SDF fallbackGravatar Jim Van Verth2018-01-17
| | | | | | | | | | | | | This patch enables scaling for overlarge color emojis when trying to render with SDFs, i.e. between 162 and 324 point in normal text rendering mode. Also ensures that we only try to render blobs with bitmap/SDF when the text size will fit in the atlas. Bug: skia: Change-Id: Ib675d99ef22bf66368dc8737ef63db4a5d3d5a9f Reviewed-on: https://skia-review.googlesource.com/94361 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* refresh public includesGravatar Cary Clark2018-01-03
| | | | | | | | | | | | | | | 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>
* Update doc and example for SkPaint::FontMetrics.Gravatar Ben Wagner2017-11-09
| | | | | | | | | | | | | | | | The underline position is actually the top of the underline. Also clarify that the strike through position is the bottom of the strike through. This adds documentation that the values are always y-down in a way that will end up in the SkPaint header file for those who look for information there. Change-Id: I40281c0e47557d23291b6a91474e2d3e3b37f09f Docs-Preview: https://skia.org/user/api/SkPaint_Reference?cl=69361#FontMetrics Reviewed-on: https://skia-review.googlesource.com/69361 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* generated include refreshGravatar Cary Clark2017-10-30
| | | | | | | | | | | | 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>
* regenerate includesGravatar Cary Clark2017-09-21
| | | | | | | | | | | | | Fresh off the griddle versions of: SkPaint.h, SkCanvas.h, SkPath.h, and SkPixmap.h. TBR=reed@google.com Bug: skia: 9868 Change-Id: If3f0c1cd7973c53482772c2478b12f1070c9fc4d Reviewed-on: https://skia-review.googlesource.com/46587 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Cary Clark <caryclark@skia.org>
* generated SkCanvas.hGravatar Cary Clark2017-09-01
| | | | | | | | | | | | | | | | | | | SkCanvas.h generated from docs/SkCanvas.bmh using bookmaker. Also added corrections to SkPaint.h, and generated SkPath.h. Once these are functionally correct (e.g., they don't break anything) I plan to check them in -- feel free to continue to review them before and after the check in event. R=brianosman@google.com TBR=reed@google.com Bug: skia:6898 Change-Id: I6d01e9eee422304e5ab871b3870a7ed710efd645 Reviewed-on: https://skia-review.googlesource.com/30460 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@skia.org> Reviewed-by: Yuqian Li <liyuqian@google.com>
* Convert NULL and 0 to nullptr.Gravatar Ben Wagner2017-08-28
| | | | | | | | | | | | | | This was created by looking at warnings produced by clang's -Wzero-as-null-pointer-constant. This updates most issues in Skia code. However, there are places where GL and Vulkan want pointer values which are explicitly 0, external headers which use NULL directly, and possibly more uses in un-compiled sources (for other platforms). Change-Id: Id22fbac04d5c53497a53d734f0896b4f06fe8345 Reviewed-on: https://skia-review.googlesource.com/39521 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* fix self referencesGravatar Cary Clark2017-07-31
| | | | | | | | | | | | | | | try removing self references in method definitions. If this creates awkward wording, it can always be allowed in another CL. Also tighten rules for identifying function references in include comments. R=briansoman@google.com, caryclark@google.com TBR=reed@google.com Bug: skia:6898 Change-Id: I1a0e6b2a76dacfe71d134deb4589fb74e6611a03 Reviewed-on: https://skia-review.googlesource.com/28624 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@skia.org>
* fix capitalizationGravatar Cary Clark2017-07-31
| | | | | | | | | | | | | | | Fix 'arcs' at sentence start to Arcs. This fix corrected other capitalizations as well, and exposed some mis-capitalizations in the bmh doc. R=brianosman@google.com TBR=reed@google.com Bug: skia: Change-Id: I4d51388556f7e8ff868a9236ce76745915560327 Reviewed-on: https://skia-review.googlesource.com/28241 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@skia.org>
* address brianosman feedbackGravatar Cary Clark2017-07-27
| | | | | | | | | | | | | | | | | | comments are here https://skia-review.googlesource.com/c/23061/16 Some bugs pointed out are in the generation code and will take more time to work out; the changes here I could make immediately R=brianosman@google.com TBR=reed@google.com Change-Id: I7497e5a220a5df597d0e881acd3747ee17856cd1 Reviewed-on: https://skia-review.googlesource.com/26901 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@skia.org> Reviewed-by: Brian Osman <brianosman@google.com>
* generated documentation for SkPaintGravatar Cary Clark2017-07-26
| | | | | | | | | | | | | | | | | | | I've uploaded SkPaint.h as written by bookmaker. I'm looking for feedback about the style and content of this generated documentation. One bug I know about: Doxygen has long comments before enum and struct members, and short comments on the same line as those members. If the documentation mixes these, the result looks confusing. Still thinking about how to handle this. Thanks for looking Change-Id: I815825dbd4408542e6f4108538199a303399b5d2 Reviewed-on: https://skia-review.googlesource.com/23061 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Mike Reed <reed@google.com>
* Add strikeout font metrics.Gravatar Ben Wagner2017-07-21
| | | | | | | | | | | | | | This also updates create_test_font so that it can be built, compiles, and uses SkFontStyle instead of SkTypeface::Style. BUG=b/63669723 Change-Id: I6eb0f851853f4721cf8e5052255b5b6750c3257f Reviewed-on: https://skia-review.googlesource.com/24740 Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>
* add API to change max pointsize for font cacheGravatar Mike Reed2017-06-01
| | | | | | | | Bug: skia:6585 Change-Id: I6df8c439dca0a154e8fbfce6d66c536665dff1d7 Reviewed-on: https://skia-review.googlesource.com/18314 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* comment SK_API and add fix paramsGravatar Cary Clark2017-05-18
| | | | | | | | | | | | | | | | | I thought that SK_API on operator== was redundant with SK_API on the enclosing class, and was not needed. Turns out for mac_chromium_debug_ng it is needed. Added comments for history. Meanwhile, bookmaker found some missing and mis-named parameters, so all is not lost. R=reed@google.com Change-Id: I88645666a9d06ec90c5ac133673460d6e6c75528 Reviewed-on: https://skia-review.googlesource.com/17277 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Sort all user-supplied rects before computeFastBoundsGravatar Brian Osman2017-05-13
| | | | | | | | | | | | | | | | https://codereview.chromium.org/908353002 fixed drawRect 2+ years ago, but drawOval and drawArc were still susceptible. This version ensures that all rects are sorted before we do the bounds check. Added a new makeSorted helper to simplify the code, and an assert to catch any future oversight. All other drawing functions compute their bounds rect in some way that already ensures it is sorted. Bug: skia: Change-Id: I8926b2dbe9d496d0876f1ac5313bd058ae4568b7 Reviewed-on: https://skia-review.googlesource.com/16702 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* add parameter namesGravatar Cary Clark2017-05-10
| | | | | | | | | | | | | | | Functions in SkPaint and SkCanvas are easier to write about when all of their parameters are named. Also, move GlyphCacheProc to private since the only interface that returns it is already in private. R=reed@google.com Change-Id: Iaea46213d5614d564c1c3de99e6f96c5efaec4b1 Reviewed-on: https://skia-review.googlesource.com/16175 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* update dox for ditheringGravatar Mike Reed2017-05-09
| | | | | | | | Bug: skia:6604 Change-Id: I21b505c54c1d43abf62b7c577e7dd88e53ed30fd Reviewed-on: https://skia-review.googlesource.com/16156 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>