aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAge
* Fix Adobe RGB color space in SkiaGravatar Brian Osman2017-12-20
| | | | | | | | | | | | | | | | Our runtime definition of the XYZ matrix was fairly inaccurate. It also didn't round-trip through ICC fixed point correctly. Now, constructing the color space at runtime produces exactly the same matrix as constructing the space from the ICC profile. And the values can then be serialized back to ICC exactly. This eliminates the need for the snapping logic, too. Bug: skia: Change-Id: I69f4a9bfec3eeef153935e21ab3a0630794b1607 Reviewed-on: https://skia-review.googlesource.com/84840 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* Don't canonicalize empty SkRRects. They stroke differently.Gravatar Brian Salomon2017-12-19
| | | | | | | | | | | | Make insetting greater than width or height collapse to a point/line. SkPath::addRRect() doesn't ignore an empty SkRRect. Change-Id: I933a3419a6d75be534f1d8328faa715772045f67 Reviewed-on: https://skia-review.googlesource.com/85680 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Update SkSurface MakeFromBackend* factories to take an SkColorType.Gravatar Greg Daniel2017-12-19
| | | | | | | | Bug: skia: Change-Id: Ib1b03b1181ec937843eac2e8d8cb03ebe53e32c1 Reviewed-on: https://skia-review.googlesource.com/86760 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* fixed a couple of SkSL ushort issuesGravatar Ethan Nicholas2017-12-19
| | | | | | | | | | | This fixes SkSL omitting the 'u' literal on ushort values, and ushorts can now implicitly coerce to ints. Bug: skia: Change-Id: I21e5dc06d34e09a4fc1aa4d746e6e75c0d2d8c7e Reviewed-on: https://skia-review.googlesource.com/85960 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* GOOGLE3 -> SK_BUILD_FOR_GOOGLE3Gravatar Mike Klein2017-12-19
| | | | | | | | | | | | | This is more consistent with our other SK_BUILD_FOR_... macros, and less likely to collide with other preprocessor logic. (Luckily, this was defined in public.bzl, so we can do this all in one CL in the Skia repo.) Change-Id: I5f232888288c9c53fad445545d983d0fb0b4add8 Reviewed-on: https://skia-review.googlesource.com/86940 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add new SkImage factory to create from GrBackendTexture with SkColorTypeGravatar Greg Daniel2017-12-18
| | | | | | | | Bug: skia: Change-Id: I46bdc54b6d9cdacc8f5a06644aa6b110837879f0 Reviewed-on: https://skia-review.googlesource.com/84342 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* remove append_from_srgb()Gravatar Mike Klein2017-12-18
| | | | | | | | | | | It's now no different than append(from_srgb). Bug: skia:7419 Change-Id: I97c59b6987f033ec2f1859db40ca3056b87b370a Reviewed-on: https://skia-review.googlesource.com/86741 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* remove deprecated SkPixelSerializerGravatar Mike Reed2017-12-16
| | | | | | | | Bug: skia: Change-Id: I25d33517f1ec7c08551c79d03763c676d1a662f5 Reviewed-on: https://skia-review.googlesource.com/86360 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Remove SkImage deferred texture image data APIs."Gravatar Eric Karl2017-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4f5e1d4ff3fa9f240398c9a08be94beb1c16dad0. Reason for revert: Unfortunately, we need this in Chrome for a bit longer. Working on understanding why the new path led to regressions. Will re-land this once the new path sticks. Original change's description: > Remove SkImage deferred texture image data APIs. > > These APIs existed for Chrome. Chrome is no longer using them. > > Change-Id: I15a5e2f88c7e8d1356188748fc68d4658f6f1849 > Reviewed-on: https://skia-review.googlesource.com/81021 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Brian Salomon <bsalomon@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. Change-Id: Ic9f683f262f2e1d0469156360f5ffaee977ca44a Reviewed-on: https://skia-review.googlesource.com/86280 Reviewed-by: Eric Karl <ericrk@chromium.org> Commit-Queue: Eric Karl <ericrk@chromium.org>
* Moving extra options/parameters into PDFMetadataGravatar Mike Reed2017-12-14
| | | | | | | | Bug: skia: Change-Id: I29aa69e5765a7f8ba05b0361912d1f5276d77de3 Reviewed-on: https://skia-review.googlesource.com/84501 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Mike Reed <reed@google.com>
* make SkColorSpace_New realGravatar Mike Klein2017-12-14
| | | | | | | | | | | | | | | | | | | Some interesting things are starting to fall out already, like the fact that I needed to add a gamma_dst stage to be able to draw into gamma-transfer-fn destinations. I've also had to pass an SkAlphaType through to the linearize functions so that they can maintain premul invariants. I'm not sure this is actually a good idea... if you can, please double- check my logic at SkRasterPipeline.cpp:128? If it's correct logic, I'm going to need to do it all over the place. But I imagine you don't do this and somehow get away with it. Change-Id: I42cd9b161b54287d674225103ad9e19f8b388959 Reviewed-on: https://skia-review.googlesource.com/84680 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* Remove SkClampRange (unused)Gravatar Brian Osman2017-12-14
| | | | | | | | Bug: skia: Change-Id: I57fbdd39079a92e803902524a7950dd5f571639c Reviewed-on: https://skia-review.googlesource.com/84961 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove SkColorSpace_Base::MakeNamed, along with most uses of Adobe RGBGravatar Brian Osman2017-12-14
| | | | | | | | Bug: skia: Change-Id: Ic914aacc4c47200714d66cf4487932bcb8a7693a Reviewed-on: https://skia-review.googlesource.com/85040 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Revert "Remove SkColorSpace_Base::MakeNamed, along with most uses of Adobe RGB"Gravatar Mike Klein2017-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 411b8ea74d66d08252d9b617d7e7d458604dbc2e. Reason for revert: a couple layout tests in the roll. :/ Original change's description: > Remove SkColorSpace_Base::MakeNamed, along with most uses of Adobe RGB > > Bug: skia: > Change-Id: If5935eac48184bc8cbe4db21dac4d6033a8704e6 > Reviewed-on: https://skia-review.googlesource.com/84200 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Mike Klein <mtklein@chromium.org> TBR=mtklein@chromium.org,brianosman@google.com Change-Id: I6d2eb57b613035ec26da15218182c808bed364ed No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/84920 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Remove SkColorSpace_Base::MakeNamed, along with most uses of Adobe RGBGravatar Brian Osman2017-12-13
| | | | | | | | Bug: skia: Change-Id: If5935eac48184bc8cbe4db21dac4d6033a8704e6 Reviewed-on: https://skia-review.googlesource.com/84200 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Add GrBackendTexture & GrBackendRenderTarget access methods to GrTexture and ↵Gravatar Robert Phillips2017-12-13
| | | | | | | | | GrRenderTarget Change-Id: I627fcc2cab1d04169f49e33a6c17e161e9a9772a Reviewed-on: https://skia-review.googlesource.com/84621 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* move divide by zero inside guardGravatar Cary Clark2017-12-13
| | | | | | | | | | | | speculative fix to see if this helps developer. It's the right thing to do in any case. TBR=reed@google.com Change-Id: I4fa576a096a6188f290957a7f2fabe73668f142d Reviewed-on: https://skia-review.googlesource.com/84521 Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@skia.org>
* converted GrMagnifierEffect to SkSLGravatar Ethan Nicholas2017-12-13
| | | | | | | | Bug: skia: Change-Id: I6dc14ac66d5b911117e71fa23fef49a897082781 Reviewed-on: https://skia-review.googlesource.com/71342 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add stubbed out GrContextGravatar Robert Phillips2017-12-13
| | | | | | | | | | | | This CL mainly just: stores the GrContextOptions in GrContextThreadSafeProxy (so they can be passed on to a stubbed out GrContext) adds a method to create a stubbed out GrContext that has a GrStubGpu - the stubbed out GrContext isn't quite ready for prime time yet Change-Id: I31be6763640e406c5963e6f0714489ac358339e4 Reviewed-on: https://skia-review.googlesource.com/79601 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Revert "impl SkSerial picture procs""Gravatar Mike Reed2017-12-13
| | | | | | | | | | | | This reverts commit 2a3009931d7bb0f5ca31490c4cf19eef205e4e7a. Implement SkSerialProcs for pictures Bug: skia: Change-Id: Icde2d912941a19999e204ac5213f519ed5387e12 Reviewed-on: https://skia-review.googlesource.com/84480 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "impl SkSerial picture procs"Gravatar Mike Reed2017-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c8226728541fdd6434a7f1b97678246202b0edc5. Reason for revert: broke old skps Original change's description: > impl SkSerial picture procs > > The picture serialization code is a bit of a mess, with duplicated functions for streams and buffers. > Could not see how to fix that and land this at the same time, but I will try to circle back and > simplify if possible afterwards. > > Bug: skia: > Change-Id: I9053fdc476c60f483df013d021e248258181c199 > Reviewed-on: https://skia-review.googlesource.com/83943 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Mike Reed <reed@google.com> TBR=mtklein@google.com,fmalita@chromium.org,reed@google.com Change-Id: I68ae019a286691b65cc373cb29c941d6620fd34a No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/84460 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* impl SkSerial picture procsGravatar Mike Reed2017-12-13
| | | | | | | | | | | | The picture serialization code is a bit of a mess, with duplicated functions for streams and buffers. Could not see how to fix that and land this at the same time, but I will try to circle back and simplify if possible afterwards. Bug: skia: Change-Id: I9053fdc476c60f483df013d021e248258181c199 Reviewed-on: https://skia-review.googlesource.com/83943 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Push much of the SkColorSpace_Base interface up to SkColorSpaceGravatar Brian Osman2017-12-12
| | | | | | | | | | | Some pieces still remain, but the next step looks less mechanical, so I wanted to land this piece independently. Bug: skia: Change-Id: Ie63afcfa08af2f6e4996911fa2225c43441dbfb2 Reviewed-on: https://skia-review.googlesource.com/84120 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove GrBackendObject from tests (except image_from_yuv_textures)Gravatar Robert Phillips2017-12-12
| | | | | | | | | This sets the stage for landing https://skia-review.googlesource.com/c/skia/+/82823 (Update SkImage::MakeFromYUVTexturesCopy to GrBackendTexture) Change-Id: I2c62f23dc447b9ad55c0b5f06bcd6d7ca0ec4d2b Reviewed-on: https://skia-review.googlesource.com/83920 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* dm: require tmpDir, reasonable defaultsGravatar Hal Canary2017-12-12
| | | | | | | Change-Id: I9d84ce1ebbe417160a29ca2221b1df04901238e3 Reviewed-on: https://skia-review.googlesource.com/83541 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* converted vertex shaders to device coordsGravatar Ethan Nicholas2017-12-12
| | | | | | | | Bug: skia:6239 Change-Id: I1a3b67fe84d208d426d71deb7aea6b0cd433af37 Reviewed-on: https://skia-review.googlesource.com/75501 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Prefer fullscreen clears on Qualcomm/GLGravatar Chris Dalton2017-12-12
| | | | | | | | | | | | | | | | | Adds Qualcomm to the set of GL devices on which we prefer fullscreen clears. Renames fullscreenClearIsFree in GrCaps to preferFullscreenClears. Replaces 'bool canIgnoreClip' on GrRenderTargetContext::clear with an enum. Bug: skia: Change-Id: I5b30298c4d0b092c398b9fea6060f3e2bea91e46 Reviewed-on: https://skia-review.googlesource.com/83060 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* resources: optionally link them into our binaryGravatar Hal Canary2017-12-11
| | | | | | | | | | | To enable, set skia_embed_resources=true in args.gn. Also add *-EmbededResouces bots. Change-Id: Ia69b26e926a3ad4676a4fa021894432ea2104538 Reviewed-on: https://skia-review.googlesource.com/82626 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* add virtual to confirm flattenable typeGravatar Mike Reed2017-12-11
| | | | | | | | | | | meant to replace https://skia-review.googlesource.com/c/skia/+/83381 Bug:793639 Change-Id: I972dc80725bf5ce5be24769aafa23269735e089c Reviewed-on: https://skia-review.googlesource.com/83444 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Revert "resources: remove most uses of GetResourcePath()""Gravatar Mike Reed2017-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cca230055921d2df8708ed6f9abcc2d43468dc7f. Reason for revert: think I guessed wrong about g32 -- unreverting Original change's description: > Revert "resources: remove most uses of GetResourcePath()" > > This reverts commit 5093a539def3ae09df324018f2343827009b2e05. > > Reason for revert: google3 seems broken > > Original change's description: > > resources: remove most uses of GetResourcePath() > > > > Going forward, we will standardize on GetResourceAsData(), which will > > make it easier to run tests in environments without access to the > > filesystem. > > > > Also: GetResourceAsData() complains when a resource is missing. > > This is usually an error. > > > > Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188 > > Reviewed-on: https://skia-review.googlesource.com/82642 > > Reviewed-by: Hal Canary <halcanary@google.com> > > Commit-Queue: Hal Canary <halcanary@google.com> > > TBR=halcanary@google.com,scroggo@google.com > > Change-Id: Ic5a7c0167c995a672e6b06dc92abe00564432214 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/83001 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> TBR=halcanary@google.com,scroggo@google.com,reed@google.com Change-Id: I5a46e4de61186a8a5eb9cacd3275e24e311d5a07 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/82942 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "resources: remove most uses of GetResourcePath()"Gravatar Mike Reed2017-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5093a539def3ae09df324018f2343827009b2e05. Reason for revert: google3 seems broken Original change's description: > resources: remove most uses of GetResourcePath() > > Going forward, we will standardize on GetResourceAsData(), which will > make it easier to run tests in environments without access to the > filesystem. > > Also: GetResourceAsData() complains when a resource is missing. > This is usually an error. > > Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188 > Reviewed-on: https://skia-review.googlesource.com/82642 > Reviewed-by: Hal Canary <halcanary@google.com> > Commit-Queue: Hal Canary <halcanary@google.com> TBR=halcanary@google.com,scroggo@google.com Change-Id: Ic5a7c0167c995a672e6b06dc92abe00564432214 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/83001 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* resources: resource identifiers don't begin with leading slashGravatar Hal Canary2017-12-08
| | | | | | | Change-Id: I52522ffffbf0f5176ac9156cd563b41d6fdde59f Reviewed-on: https://skia-review.googlesource.com/82940 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* resources: remove most uses of GetResourcePath()Gravatar Hal Canary2017-12-08
| | | | | | | | | | | | | | Going forward, we will standardize on GetResourceAsData(), which will make it easier to run tests in environments without access to the filesystem. Also: GetResourceAsData() complains when a resource is missing. This is usually an error. Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188 Reviewed-on: https://skia-review.googlesource.com/82642 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "Revert "use serialprocs for typefaces""Gravatar Mike Reed2017-12-08
| | | | | | | | | | | | | | This reverts commit 1a104bce20adc47a343fa910899ca6c4f261be40. Change (from first version) is - only signal error in readbuffer for corrupt stream, not default fonts - change test to ensure a non-null typeface (i.e. MakeDefault()) Bug: skia: Change-Id: I325445b56b0a402e1b89a2439df06e92314c793f Reviewed-on: https://skia-review.googlesource.com/82687 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* keep SVG arcs axis aligned with suppressionGravatar Cary Clark2017-12-08
| | | | | | | | | | | | | | another attempt at https://skia-review.googlesource.com/c/skia/+/79423 this time, bracket change with SK_SUPPORT_LEGACY_SVG_ARC_TO to avoid prematurely changing SVG layout test results. R=djsollen@google.com Bug: b:69622768 Change-Id: Ia929f89d4f4292dfead191a381cdb431f743726a Reviewed-on: https://skia-review.googlesource.com/82723 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com>
* resources: orgainize directory.Gravatar Hal Canary2017-12-08
| | | | | | | | | Should make it easier to ask just for images. Change-Id: If821743dc924c4bfbc6b2b2d29b14affde7b3afd Reviewed-on: https://skia-review.googlesource.com/82684 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* minor cleanup to typeface serial testGravatar Mike Reed2017-12-08
| | | | | | | | Bug: skia: Change-Id: I572fbcbb382a665c4e4e27a7cee718c4eaa7743d Reviewed-on: https://skia-review.googlesource.com/82801 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Remove unused private fieldGravatar Brian Osman2017-12-08
| | | | | | | | | | (Found by latest version of clang) Bug: skia: Change-Id: Ia24e023ed0cd8296276dbdd6abff5e0017de02d3 Reviewed-on: https://skia-review.googlesource.com/82741 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* return data instead of boolGravatar Mike Reed2017-12-08
| | | | | | | | Bug: skia: Change-Id: Id7c3044a2fce087703544c624c75a7756b9c62b4 Reviewed-on: https://skia-review.googlesource.com/82602 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Remove instanced renderingGravatar Brian Salomon2017-12-08
| | | | | | | Change-Id: I4219b1d23a647b849ee41fe71b53e1c45edfc3f4 Reviewed-on: https://skia-review.googlesource.com/82241 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add gray_8_as_lum and _as_red private grpixelconfigsGravatar Greg Daniel2017-12-07
| | | | | | | | Bug: skia: Change-Id: I70cbd0bc9f7a7a16fb9f0688d272d7afa607700a Reviewed-on: https://skia-review.googlesource.com/80622 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* sk_spification of GrGpu creation.Gravatar Brian Salomon2017-12-07
| | | | | | | | | | | | Make GrContext::MakeGL take interface as sk_sp. Make GrContext::MakeVulkan take GrVkBackendContext as sk_sp. Change-Id: I13c22a57bd281c51738f503d9ed3418d35a466df Reviewed-on: https://skia-review.googlesource.com/81842 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove SkImage deferred texture image data APIs.Gravatar Brian Salomon2017-12-07
| | | | | | | | | | These APIs existed for Chrome. Chrome is no longer using them. Change-Id: I15a5e2f88c7e8d1356188748fc68d4658f6f1849 Reviewed-on: https://skia-review.googlesource.com/81021 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* upgrade SkReadBuffer to always validateGravatar Mike Reed2017-12-06
| | | | | | | | Bug: skia: Change-Id: I054560b66c6cde346d939015326d8547879d2c4b Reviewed-on: https://skia-review.googlesource.com/81160 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Revert "keep SVG arcs axis aligned"Gravatar Cary Clark2017-12-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c3823848483eba33c3fa36187de7713e87651c1c. Reason for revert: need to add legacy flag to chrome first Original change's description: > keep SVG arcs axis aligned > > Computing the arc width introduces rounding errors that cause the > arc to exceed 1/4 circle and cause integer anchored arcs to start > outside their marks. A round rect may lose convexity as a result. > > Check if arcTo() inputs are integers and arc is 90 degrees; > if so, output conics which are axis-aligned on integers as well. > > This is triggered when using SVG to represent a round rect. > > Possible future enhancements are recorded in bug.skia.org/7383 > > R=​reed@google.com,djsollen@google.com > Change-Id: I6609456fcefabcda6c9560a044533ecb5cda2d31 > Reviewed-on: https://skia-review.googlesource.com/79423 > Reviewed-by: Derek Sollenberger <djsollen@google.com> > Commit-Queue: Derek Sollenberger <djsollen@google.com> TBR=djsollen@google.com,caryclark@google.com,reed@google.com,caryclark@skia.org Change-Id: Ia503ea62def15322df2b11da30d377a9543d6999 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/81281 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* add SkVptr()Gravatar Mike Klein2017-12-06
| | | | | | | | | | I was wondering how feasible using this to make downcasts safe would be. These tests would need to build and pass on all our bots, at least. Change-Id: I1753ba58841bf6c17d6ac3af7374518356e1bb05 Reviewed-on: https://skia-review.googlesource.com/81180 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* keep SVG arcs axis alignedGravatar Cary Clark2017-12-06
| | | | | | | | | | | | | | | | | | | Computing the arc width introduces rounding errors that cause the arc to exceed 1/4 circle and cause integer anchored arcs to start outside their marks. A round rect may lose convexity as a result. Check if arcTo() inputs are integers and arc is 90 degrees; if so, output conics which are axis-aligned on integers as well. This is triggered when using SVG to represent a round rect. Possible future enhancements are recorded in bug.skia.org/7383 R=reed@google.com,djsollen@google.com Change-Id: I6609456fcefabcda6c9560a044533ecb5cda2d31 Reviewed-on: https://skia-review.googlesource.com/79423 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
* CCPR: Eliminate texel buffersGravatar Chris Dalton2017-12-05
| | | | | | | | | | | | | | | | | | Points cost 8 bytes and indices cost 4. If a point is accessed twice, it's a wash whether we duplicate it or index. This change eliminates texel buffers by duplicating points across instance arrays. This reduces our dependence on extensions as well as getting rid of our indirect memory access pattern in vertex shaders. As a result of this change, memory usage by GPU buffers will only be a fraction larger at worst, and slightly better at best. Bug: skia: Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-SKNX_NO_SIMD Change-Id: I3c7f03772edd4f850d5fdd7b55552647335c1b52 Reviewed-on: https://skia-review.googlesource.com/79185 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* add serial procs to picturesGravatar Mike Reed2017-12-05
| | | | | | | | | Bug: skia:7380 Change-Id: Ic1b7e437316c7913711cf5cb119e3fe904cd2c05 Reviewed-on: https://skia-review.googlesource.com/76980 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Reland "Hide SkEncodedInfo"Gravatar Leon Scroggins III2017-12-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially reverts commit 1793e7bb46c1f9d430c1a699a1c3d3168159b659. Hide SkEncodedInfo Bug: skia:7353 Bug: skia:6839 This contains information that is not necessary for clients to know. The Color enum tells the number of components in the input, but this is only interesting internally (to the SkSwizzler). Similarly, the Alpha enum differs from SkAlphaType in that it has kBinary instead of kPremul. This is useful information only internally for determining whether the SkColorSpaceXform needs to premultiply. The bitsPerComponent is potentially useful for a client; Android (in SkAndroidCodec) uses it to determine the SkColorType. Rather than exposing bitsPerComponent, make SkAndroidCodec a friend so it can access the SkEncodedInfo. A future change will change SkCodec to recommend F16 for bitsPerComponent > 8, but that will be more involved; it was the reason for the revert of this CL. Switch conversionSupported to use an SkColorType, which is enough info. Replace the SkEncodedInfo::Alpha field on SkCodec::FrameInfo with an SkAlphaType. SkCodec still needs an SkEncodedInfo, so move its header (which is already not SK_API) to include/private. TBR=mtklein@chromium.org,reed@google.com Change-Id: I928b1f55317602cb37d29da63b53026c8d139cee Reviewed-on: https://skia-review.googlesource.com/80860 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>