aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DMSrcSink.cpp
Commit message (Collapse)AuthorAge
...
* Make GrGpu::deleteTestingOnlyBackendTexture() take const GrBackendTexture&Gravatar Brian Salomon2018-03-09
| | | | | | | Change-Id: Ibd00d0dc6d8c73628f26851e102defdbafab149b Reviewed-on: https://skia-review.googlesource.com/113164 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add GM configs that test rendering to a GL backend texture and render targetGravatar Brian Salomon2018-03-09
| | | | | | | | | This also adds GrGpu::create/deleteTestingOnlyBackendRenderTarget. Implemented in GL only for now. Change-Id: I9e5fdc953c4a249959af89e08332f520cefe9d90 Reviewed-on: https://skia-review.googlesource.com/113305 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Move internal calls from GrContext to GrContextPrivGravatar Robert Phillips2018-03-06
| | | | | | | | | | A mechanical bulk move just to get these out of the public API. TBR=bsalomon@google.com Change-Id: I813efbd54a09dd448275697c0e50947753a5cfd3 Reviewed-on: https://skia-review.googlesource.com/112262 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* dm: support printing specific page of mskp to SVGGravatar Bryce Thomas2018-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently with dm, it's possible to convert an .mskp to a multi-page PDF as follows: out/Release/dm --src mskp --mskps /tmp/filename.mskp -w /tmp \ --config pdf --verbose The SVG equivalent partially works, although only outputs the first page: out/Release/dm --src mskp --mskps /tmp/filename.mskp -w /tmp \ --config svg --verbose This CL adds support for passing extended options to SVG. Specifically, the 'page' option , which now determines which page of the source mskp gets converted to the SVG output. The new syntax is as follows: out/Release/dm --src mskp --mskps /tmp/filename.mskp -w /tmp \ --config svg[page=2] --verbose The `[key=value]` syntax is the same extended options syntax currently used by dm with --config gpu, e.g. `gpu[api=gl,color=8888]`. BUG=skia:7601 Change-Id: I3523d79b1cdbbba9e80fd46501331877091bdead Reviewed-on: https://skia-review.googlesource.com/105404 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Add threaded backend sink to DM. Fix a scheduler bug.Gravatar Yuqian Li2018-02-25
| | | | | | | | | | | The bug is spotted by the new sink. I'd expect more bugs to be revealed and fixed using the new sink. Bug: skia: Change-Id: I6b0c9267079fbd6149004f0ecd55ddb179702588 Reviewed-on: https://skia-review.googlesource.com/109720 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* move a bunch of helpers from SkImageInfo.h into privGravatar Mike Reed2018-02-09
| | | | | | | | | Bug: skia: Change-Id: I8c91cfdb89e4f22448d1201d391556fe43d86dca Reviewed-on: https://skia-review.googlesource.com/105289 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Cary Clark <caryclark@google.com>
* [skottie] Render DM frames out-of-orderGravatar Florin Malita2018-01-27
| | | | | | | | | | | To exercise non-monotonic animator progrssions. TBR= Change-Id: I53aead5b11adf59d33c9ca4065976996bd09a1e2 Reviewed-on: https://skia-review.googlesource.com/100900 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* remove obsolete DM test configsGravatar Mike Klein2018-01-26
| | | | | | | | | | | | | | | | ViaSingletonPictures simulates a load pattern that Blink no longer produces. I don't even remember what Via2ndPic and ViaTwice are meant to test, but I imagine they're quite obsolete. There was a lingering reference to ViaMojo, which otherwise doesn't exist. Bug: skia:7544 Change-Id: I033fd344314054ad66c363e5dbd0a373be188069 Reviewed-on: https://skia-review.googlesource.com/88780 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Skotty -> SkottieGravatar Florin Malita2018-01-17
| | | | | | | Change-Id: If8b6516024c69b0fc256208874f6666a4e70e12c Reviewed-on: https://skia-review.googlesource.com/95241 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skotty] Minor tools tweaksGravatar Florin Malita2018-01-09
| | | | | | | | | | | * fix "show inval" persistency in SkottySlide * add frame-stamp to DM film strip TBR= Change-Id: I965b28fa25b4d6ddfa1ddf80f5f9187dff3f943c Reviewed-on: https://skia-review.googlesource.com/92941 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skotty,sksg] Initial image supportGravatar Florin Malita2018-01-08
| | | | | | | | TBR= Change-Id: Ib3c918b1d746e4f190ae05708681f2d5519afdb2 Reviewed-on: https://skia-review.googlesource.com/91980 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skotty] Speculative g3 DM build fixGravatar Florin Malita2017-12-31
| | | | | | | | | | Disable Skotty support in G3 for now. TBR= Change-Id: Ic64f62bc21e9d4a531cdfa2495710edc1ba531f8 Reviewed-on: https://skia-review.googlesource.com/90029 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skotty] Add Json DM sourceGravatar Florin Malita2017-12-31
| | | | | | | | | | Generates a filmstrip with evenly distributed frames for a Skotty animation. TBR= Change-Id: Ia89e0d65d59fd5ab4ef221a231e9b3e0c033828a Reviewed-on: https://skia-review.googlesource.com/90025 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* make InternalOnly_ functions actually privateGravatar Mike Reed2017-12-20
| | | | | | | | Bug: skia: Change-Id: Id06ad4283a0cd9835b3349c783b705b30435855a Reviewed-on: https://skia-review.googlesource.com/87980 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Add a tools flag to suppress geometry shadersGravatar Chris Dalton2017-12-19
| | | | | | | | | Bug: skia: Change-Id: I38736c5d49e3b281c2d23af3908575274ff97b5c Reviewed-on: https://skia-review.googlesource.com/86282 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* 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>
* 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>
* 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: 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>
* clean up SkDeferredCanvasGravatar Mike Klein2017-11-27
| | | | | | | | | | To our knowledge it's not used. Its defer- mode in DM isn't even run on the bots. Change-Id: Ifebfa2a77bfed8370eb421d379697f04fa2c8608 Reviewed-on: https://skia-review.googlesource.com/76420 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Make SkImageGeneratorCG apply encoded originGravatar Leon Scroggins III2017-11-03
| | | | | | | | | | | | | | | | | | | | | | | | | | SkImageGeneratorCG: - Detect the origin and apply it to the output - Deprecate NewFromEncodedCG and add MakeFromEncodedCG SkCodecImageGenerator: - Move code elsewhere for sharing - Apply origin for incomplete decodes SkPixmap.cpp/SkPixmapPriv.h: - Now has the shared code for generators to apply origin DMSrcSink.cpp: - Call MakeFromEncodedCG SkCGUtils.h: - Add a version of SkCopyPixelsFromCGImage that takes an SkPixmap Bug: skia:7138 Bug: skia:3834 Change-Id: Ic6dbc76360c6a84913b67373582f328d3946d637 Reviewed-on: https://skia-review.googlesource.com/63740 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Use color filter to undo GBR (actually BRG)Gravatar Brian Osman2017-10-31
| | | | | | | | | | This allows the via to work with GPU (where we don't render to N32). Change-Id: I42e8457731a5ee51d14f7092eebd6efe72decd84 Reviewed-on: https://skia-review.googlesource.com/65822 Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Revert "gbr- has been brg- this whole time..."Gravatar Mike Klein2017-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5b9a037bf41591e0076843f619ee47c9ad30e42d. Reason for revert: I got confused in here somewhere and everything is drawing wrong. Original change's description: > gbr- has been brg- this whole time... > > Rewrite things to make that a little clearer. > > A red pixel ends up in channel 2, what would naively draw as blue > without a rotation. A green pixel ends up in channel 0, which would > naively draw as red without rotation. A blue pixel ends up in channel > 1, which would naively draw as green without this rotation. > > So this transformation is: > > r -> b > g -> r > b -> g > > i.e. rgb_to_brg > > Change-Id: I12331ff2622194e34a44f421f656fbe4db5d3dca > Reviewed-on: https://skia-review.googlesource.com/65521 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Osman <brianosman@google.com> TBR=mtklein@chromium.org,brianosman@google.com Change-Id: Ib29800b242bf736b20d61375d3c437c8f4ffdce0 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/65781 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* gbr- has been brg- this whole time...Gravatar Mike Klein2017-10-31
| | | | | | | | | | | | | | | | | | | | | | Rewrite things to make that a little clearer. A red pixel ends up in channel 2, what would naively draw as blue without a rotation. A green pixel ends up in channel 0, which would naively draw as red without rotation. A blue pixel ends up in channel 1, which would naively draw as green without this rotation. So this transformation is: r -> b g -> r b -> g i.e. rgb_to_brg Change-Id: I12331ff2622194e34a44f421f656fbe4db5d3dca Reviewed-on: https://skia-review.googlesource.com/65521 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* make color rotating a little less pointlessly slowGravatar Mike Klein2017-10-30
| | | | | | | Change-Id: Ic9e6cfe82dd22ac01be7a51724efa4c00399cfef Reviewed-on: https://skia-review.googlesource.com/65320 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert[4] "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"Gravatar Mike Reed2017-10-03
| | | | | | | | | | This reverts commit 5a2e50edc51006ce91366e177a9d21a16775d7fd. Bug: skia: Change-Id: I8d28b5c07d90130e5a1653923740eaf189ecb954 Reviewed-on: https://skia-review.googlesource.com/53900 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "Revert "guard old apis for querying byte-size of a ↵Gravatar Mike Reed2017-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bitmap/imageinfo/pixmap""" This reverts commit cd284c532376d16fcc4ed75baf3da65c3e4a2e95. Reason for revert: assert fired in SkMallocPixelRef.cpp:61: fatal error: "assert(info.computeByteSize(rowBytes) == info.getSafeSize(rowBytes))" google3 thinks it was from surface_rowbytes Original change's description: > Revert "Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"" > > This reverts commit 809cbedd4b252be221b2ac3b4269d312fd8f53a0. > > Bug: skia: > Change-Id: I680d8daeeeeb15526b44c1305d8fb0c6bfa38e1d > Reviewed-on: https://skia-review.googlesource.com/52665 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Florin Malita <fmalita@chromium.org> TBR=fmalita@chromium.org,reed@google.com Change-Id: I41e3f7a3f791cc8183291847e783ed8a53bc91d2 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/53802 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "guard old apis for querying byte-size of a ↵Gravatar Mike Reed2017-10-02
| | | | | | | | | | | | bitmap/imageinfo/pixmap"" This reverts commit 809cbedd4b252be221b2ac3b4269d312fd8f53a0. Bug: skia: Change-Id: I680d8daeeeeb15526b44c1305d8fb0c6bfa38e1d Reviewed-on: https://skia-review.googlesource.com/52665 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"Gravatar Jim Van Verth2017-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 88757dacd4f532a0f647c02ae0ee596d31ab5c68. Reason for revert: Still seems to be failing Chromium "telemetry_perf_unittests (with patch) on Android" on android_n5x_swarming_rel. Original change's description: > guard old apis for querying byte-size of a bitmap/imageinfo/pixmap > > Now with legacy behavior for allocpixels > > This was reverted, so the current CL is a "fix" on top of ... > https://skia-review.googlesource.com/c/skia/+/50980 > > Related update to Chrome (in preparation for this change) > https://chromium-review.googlesource.com/c/chromium/src/+/685719 > > Bug: skia: > Change-Id: I4b370ee7e95083ab27421f008132219c9c7b86e9 > Reviewed-on: https://skia-review.googlesource.com/51341 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Mike Reed <reed@google.com> TBR=fmalita@chromium.org,reed@google.com Change-Id: I827a0ca1d1e3909e648fde3342cdb8601d34da8d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/52381 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* guard old apis for querying byte-size of a bitmap/imageinfo/pixmapGravatar Mike Reed2017-09-27
| | | | | | | | | | | | | | | | Now with legacy behavior for allocpixels This was reverted, so the current CL is a "fix" on top of ... https://skia-review.googlesource.com/c/skia/+/50980 Related update to Chrome (in preparation for this change) https://chromium-review.googlesource.com/c/chromium/src/+/685719 Bug: skia: Change-Id: I4b370ee7e95083ab27421f008132219c9c7b86e9 Reviewed-on: https://skia-review.googlesource.com/51341 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"Gravatar Greg Daniel2017-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 98a6216b18b57c2f7a0d58f542c60503686aed69. Reason for revert: breaking the chrome roll. Looks like they may be writing data to create an image across all the row bytes and thus writing to unalloced data on the last row. Link to example failing bot: https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/539960 Original change's description: > guard old apis for querying byte-size of a bitmap/imageinfo/pixmap > > Previously we had size_t and uint64_t variations. > > The new (simpler) API always.. > - returns size_t, or 0 if the calculation overflowed > - returns the trimmed size (does not include rowBytes padding for the last row) > > Bug: skia: > Change-Id: I05173e877918327c7b207d2f7f1ab0db36892e2e > Reviewed-on: https://skia-review.googlesource.com/50980 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Florin Malita <fmalita@chromium.org> > Reviewed-by: Leon Scroggins <scroggo@google.com> TBR=mtklein@google.com,herb@google.com,scroggo@google.com,fmalita@chromium.org,reed@google.com Change-Id: I726f6ab1b36b14979ba6f37105e0a469b3f0dbc0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/51262 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* guard old apis for querying byte-size of a bitmap/imageinfo/pixmapGravatar Mike Reed2017-09-26
| | | | | | | | | | | | | | | Previously we had size_t and uint64_t variations. The new (simpler) API always.. - returns size_t, or 0 if the calculation overflowed - returns the trimmed size (does not include rowBytes padding for the last row) Bug: skia: Change-Id: I05173e877918327c7b207d2f7f1ab0db36892e2e Reviewed-on: https://skia-review.googlesource.com/50980 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Output encoded PNGs when gltestthreading or serialize failsGravatar Brian Osman2017-09-07
| | | | | | | | | | | | | | | | | For configs that compare results of two drawing methods, it's helpful to know how the two images differed. This takes both images, PNG encodes them (at maximum compression settings), then base64 encodes them into data URIs so they can be viewed directly from the logs. These kinds of failures are typically very rare, and currently happen infrequently due to flaky GMs - we don't want to be using this kind of facility all the time. Bug: skia:7011 Change-Id: Ib6c271cb8f6cd657cf6ca8ccfee97d0193b4e6ed Reviewed-on: https://skia-review.googlesource.com/43240 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Add FIFO thread pool, use it for most things.Gravatar Mike Klein2017-09-01
| | | | | | | | | | | | | | | | | | | We like a LIFO default thread pool in tools like DM for better memory/time locality... the bots use less memory this way, and generally run faster. But most use cases want a FIFO queue, so that they can get going on the next parts of early work while later work is still running. This splits the implementation into one using SkTArray and pop_back for LIFO, and a new one using std::deque and pop_front for FIFO. Change-Id: Ief203b6869a00f1f8084019431a781d15fc63750 Reviewed-on: https://skia-review.googlesource.com/41849 Commit-Queue: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Move several GrContextOptions fields behind GR_TEST_UTILSGravatar Brian Osman2017-08-30
| | | | | | | | Bug: skia: Change-Id: I35bc08ad72fb94d8e47fe342d314c4496b954226 Reviewed-on: https://skia-review.googlesource.com/40881 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* DeferredDisplayList API proposalGravatar Robert Phillips2017-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Chrome would like to perform cpu-side preprocessing for gpu draws in parallel. They do not want to go through a picture (since they have their own display list format). The general idea is that we add a new SkDeferredDisplayListRecorder class to perform all of Ganesh's cpu-side preprocessing ahead of time and in parallel. The SkDDLRecorder operates like SkPictureRecorder. The user can get an SkCanvas from the SkDDLRecorder and feed it draw operations. Once finished, the user calls 'detach' to get an SkDeferredDisplayList. All the work up to and including the 'detach' call can be done in parallel and will not touch the GPU. To actually get pixels the client must call SkSurface::draw(SkDDL) on an SkSurface that is "compatible" with the surface characterization initially given to the SkDDLMaker. The surface characterization contains the minimum amount of information Ganesh needs to know about the ultimate destination in order to perform its cpu-side work (i.e., caps, width, height, config). Change-Id: I75faa483ab5a6b779c8de56ea56b9d90b990f43a Reviewed-on: https://skia-review.googlesource.com/30140 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Threaded generation of software pathsGravatar Brian Osman2017-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | Re-land of: https://skia-review.googlesource.com/36560 All information needed by the thread is captured by the prepare callback object, the lambda captures a pointer to that, and does the mask render. Once it's done, it signals the semaphore (also owned by the callback). The callback defers the semaphore wait even longer (into the ASAP upload), so the odds of waiting for the thread are REALLY low. Also did a bunch of cleanup along the way, and put in some trace markers so we can monitor how well this is working. Traces of a GM that includes GPU and SW path rendering (path-reverse): Original: https://screenshot.googleplex.com/f5BG3901tQg.png Threaded, with wait in the callback (notice pre flush callback blocking): https://screenshot.googleplex.com/htOSZFE2s04.png Current version, with wait deferred to ASAP upload function: https://screenshot.googleplex.com/GHjD0U3C34q.png Bug: skia: Change-Id: Idb92f385590749f41328a9aec65b2a93f4775079 Reviewed-on: https://skia-review.googlesource.com/40775 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@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>
* Revert "Threaded generation of software paths"Gravatar Brian Salomon2017-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 76323bc0615044a5921afef0e19a350f3d04ffe0. Reason for revert: Breaking NUC bots in threaded gm comparison: https://chromium-swarm.appspot.com/task?id=382e589753187f10&refresh=10 Original change's description: > Threaded generation of software paths > > All information needed by the thread is captured by the prepare > callback object, the lambda captures a pointer to that, and does the > mask render. Once it's done, it signals the semaphore (also owned by the > callback). The callback defers the semaphore wait even longer (into the > ASAP upload), so the odds of waiting for the thread are REALLY low. > > Also did a bunch of cleanup along the way, and put in some trace markers > so we can monitor how well this is working. > > Traces of a GM that includes GPU and SW path rendering (path-reverse): > > Original: > https://screenshot.googleplex.com/f5BG3901tQg.png > Threaded, with wait in the callback (notice pre flush callback blocking): > https://screenshot.googleplex.com/htOSZFE2s04.png > Current version, with wait deferred to ASAP upload function: > https://screenshot.googleplex.com/GHjD0U3C34q.png > > Bug: skia: > Change-Id: I3d5a230bbd68eb35e1f0574b308485c691435790 > Reviewed-on: https://skia-review.googlesource.com/36560 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com Change-Id: Icac0918a3771859f671b69ae07ae0fedd3ebb3db No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/38560 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Threaded generation of software pathsGravatar Brian Osman2017-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | All information needed by the thread is captured by the prepare callback object, the lambda captures a pointer to that, and does the mask render. Once it's done, it signals the semaphore (also owned by the callback). The callback defers the semaphore wait even longer (into the ASAP upload), so the odds of waiting for the thread are REALLY low. Also did a bunch of cleanup along the way, and put in some trace markers so we can monitor how well this is working. Traces of a GM that includes GPU and SW path rendering (path-reverse): Original: https://screenshot.googleplex.com/f5BG3901tQg.png Threaded, with wait in the callback (notice pre flush callback blocking): https://screenshot.googleplex.com/htOSZFE2s04.png Current version, with wait deferred to ASAP upload function: https://screenshot.googleplex.com/GHjD0U3C34q.png Bug: skia: Change-Id: I3d5a230bbd68eb35e1f0574b308485c691435790 Reviewed-on: https://skia-review.googlesource.com/36560 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Plumb GrContextOptions to GPU sinks in DMGravatar Brian Osman2017-08-21
| | | | | | | | | | We were ignoring the path renderer flag when drawing GMs or SKPs. Bug: skia: Change-Id: Iee443fb70f1faec65e46925fa0e3cea3716d448d Reviewed-on: https://skia-review.googlesource.com/36861 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Stop BRD-decoding non-opaque to 565 sinkGravatar Leon Scroggins III2017-08-17
| | | | | | | | | | | | review.skia.org/34361 accidentally started attempting to decode images with transparency to a 565 sink. BRD helpfully decodes to N32 instead, rather than failing. We don't need to test this here, and it draws to a 565 sink, resulting in incorrect images in Gold. Change-Id: I9585b2c0c4526e5f33667bd8f57003449e735372 Reviewed-on: https://skia-review.googlesource.com/35707 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Move calls to conversion_possible to SkCodecGravatar Leon Scroggins III2017-08-17
| | | | | | | | | | | | | | | | | | | | | | | | Move common code into the base class, so subclasses need not call conversion_possible. Use SkEncodedInfo rather than SkImageInfo, and use the proper frame. API Changes: - SkAndroidCodec: - Add getEncodedInfo(), for SkBitmapRegionCodec - SkEncodedInfo: - Add opaque() helper - SkBitmapRegionDecoder: - Remove unused conversionSupported (Split off from skia-review.googlesource.com/c/25746) Bug: skia:5601 Change-Id: If4a40d4b98a3dd0afde2b6058f92315a393a5baf Reviewed-on: https://skia-review.googlesource.com/34361 Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* simplify gm matricesGravatar Mike Reed2017-08-08
| | | | | | | | | | | | rm gm that appears to have been there solely for pdf, but we don't use it for that now. Bug: skia: Change-Id: I3cf88db923c2445b7c95dda14da679a594117643 Reviewed-on: https://skia-review.googlesource.com/31760 Reviewed-by: Derek Sollenberger <djsollen@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* use unique_ptr for codec factoriesGravatar Mike Reed2017-07-25
| | | | | | | | | | Will need guards for android (at least) Bug: skia: Change-Id: I2bb8e656997984489ef1f2e41cd3d301c4e7b947 Reviewed-on: https://skia-review.googlesource.com/26040 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* DM: excercise other SkPDF raster dpisGravatar Hal Canary2017-07-20
| | | | | | | | Change-Id: Ia50661a8391da526d509adbe2d7203866c140b1c Reviewed-on: https://skia-review.googlesource.com/25321 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* convert over to 2d-modeGravatar Mike Klein2017-07-20
| | | | | | | | | | | | [√] convert all stages to use SkJumper_MemoryCtx / be 2d-compatible [√] convert compile to 2d also, remove 1d run/compile [√] convert all call sites [√] no diffs Change-Id: I3b806eb8fe0c3ec043359616409f7cd1211a1e43 Reviewed-on: https://skia-review.googlesource.com/24263 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* guard references to SkColorTableGravatar Mike Reed2017-07-18
| | | | | | | | Bug: skia:6828 Change-Id: I0c8c78e70b118f51cb59dc45675e4ddcd4776108 Reviewed-on: https://skia-review.googlesource.com/24260 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Add support for GL 565 and 4444 configs to test toolsGravatar Brian Salomon2017-07-17
| | | | | | | Change-Id: I395e3387df44cf5370fef6ab73db73228225622f Reviewed-on: https://skia-review.googlesource.com/23946 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>