aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DM.cpp
Commit message (Collapse)AuthorAge
...
* Use GrContextFactories that produce a single GrContext in unit tests.Gravatar Brian Salomon2017-11-15
| | | | | | | | | | | | | | | | | | | | | This is to alleviate problems due to the command buffer getting bent out of shape when the current OpenGL context is switched out from under it (because we ran a test with a native GL context). This, however is not a full solution. More changes will be required to ensure that after running each command buffer or native test we bind the null context. This does allow us to take a step in that direction without breaking anything too badly. Moreover, there is no real benefit to reusing a GrContextFactory. Modifies DEF_GPUTEST to take GrContextOptions rather than a factory to use. Tests were already using their own factories anyway. In tests that use GrContextFactory the factory instance is moved to the inner loop. Modifies gpucts and skia_test to not use persistent GrContextFactories. Change-Id: Ie7a36793545c775f2f30653ead6fec93a3d22717 Reviewed-on: https://skia-review.googlesource.com/71861 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add SkColorSpace_Base::makeColorSpinGravatar Brian Osman2017-11-14
| | | | | | | | | | | | This is a utility that creates a version of an existing XYZ color space that performs our color spin operation. Assigning this to a source remaps RGB to GBR. Assigning it to a destination does the opposite (RGB to BRG). Bug: skia: Change-Id: I3528698220bd32aa01dcd3db225e60f151a4b5bd Reviewed-on: https://skia-review.googlesource.com/71280 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* DM: hide DM:FontMgr behind a factoryGravatar Hal Canary2017-11-14
| | | | | | | Change-Id: I4dc745479ceb1d5ca1ddb4a0904f342576e4562c Reviewed-on: https://skia-review.googlesource.com/71240 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Hal Canary <halcanary@google.com>
* streamline GDI botsGravatar Mike Klein2017-11-13
| | | | | | | | | | | | | - Replace build-time GDI support in all of Skia with run-time GDI support only in DM. - Make the GDI bots NativeFont bots paralelling the other NativeFonts bots. Change-Id: I424b20f6983d8a8ba8574650efefea2b8776bbe2 Reviewed-on: https://skia-review.googlesource.com/70721 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* add a SkFontMgr to DM that returns portable fontsGravatar Mike Klein2017-11-06
| | | | | | | | | Controlled by --[no]nativeFonts, and still defaults to native fonts. Change-Id: Ib2879e69fadb63ddb5a17a7e4ae227941893b8cf Reviewed-on: https://skia-review.googlesource.com/67806 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: 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>
* Revert "Revert "Fix GrDefaultPathRender inversely wound path bug""Gravatar Robert Phillips2017-10-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fc28138c0422637741ac2839914ef10c56438054. Reason for revert: Suppression have landed for failing tests Original change's description: > Revert "Fix GrDefaultPathRender inversely wound path bug" > > This reverts commit 511a9d49998ec6a74c375e6cfc55f660f7987c40. > > Reason for revert: vulkan > > Original change's description: > > Fix GrDefaultPathRender inversely wound path bug > > > > Bug: 769898 > > Change-Id: I3b1a43b1e114b35105493a0cfa01a1f01b65fa56 > > Reviewed-on: https://skia-review.googlesource.com/64065 > > Commit-Queue: Robert Phillips <robertphillips@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,robertphillips@google.com > > Change-Id: Ib1a987294d14f0526bf5ff5a8fd90bbd5f6f3a0d > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: 769898 > Reviewed-on: https://skia-review.googlesource.com/65201 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: I3a3543c46b3192f1ffd31a5566cf337dc03561a8 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 769898 Reviewed-on: https://skia-review.googlesource.com/65202 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* remove SkThread, using std::thread insteadGravatar Mike Klein2017-10-30
| | | | | | | Change-Id: I871dd5eea4496e87c206b46d9eae81cb521b11ce Reviewed-on: https://skia-review.googlesource.com/65103 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Fix GrDefaultPathRender inversely wound path bug"Gravatar Robert Phillips2017-10-30
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 511a9d49998ec6a74c375e6cfc55f660f7987c40. Reason for revert: vulkan Original change's description: > Fix GrDefaultPathRender inversely wound path bug > > Bug: 769898 > Change-Id: I3b1a43b1e114b35105493a0cfa01a1f01b65fa56 > Reviewed-on: https://skia-review.googlesource.com/64065 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: Ib1a987294d14f0526bf5ff5a8fd90bbd5f6f3a0d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 769898 Reviewed-on: https://skia-review.googlesource.com/65201 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fix GrDefaultPathRender inversely wound path bugGravatar Robert Phillips2017-10-30
| | | | | | | | Bug: 769898 Change-Id: I3b1a43b1e114b35105493a0cfa01a1f01b65fa56 Reviewed-on: https://skia-review.googlesource.com/64065 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add a tooling flag for path mask cachingGravatar Chris Dalton2017-10-13
| | | | | | | | | | | Adds the flag and a disables caching on the CCPR bots. Bug: skia: Change-Id: Icb85e77f89634dda1d419dacac5b8a93340723f0 Reviewed-on: https://skia-review.googlesource.com/59740 Reviewed-by: Eric Boren <borenet@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* DM: move skiatest functions into separate file.Gravatar Hal Canary2017-10-10
| | | | | | | | | Motivation: allows reuse. Change-Id: I5732305a213acd83de4ba4e84e0ae27d094cf649 Reviewed-on: https://skia-review.googlesource.com/57241 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "Attempt both GL and GLES for GPU unit tests"Gravatar Chris Dalton2017-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 454818b80ae57edfa410f884de3ed31db1e7ea9c. Reason for revert: the GPU unit tests on Chromebook that this change enabled are not surprisingly broken. Original change's description: > Attempt both GL and GLES for GPU unit tests > > The hardcoded logic was not all inclusive and caused Chromebooks to > not run GPU unit tests. > > Bug: skia: > Change-Id: I7688adab314d12234ee03363609a1c4bf8f2edb5 > Reviewed-on: https://skia-review.googlesource.com/55561 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=bsalomon@google.com,brianosman@google.com,csmartdalton@google.com Change-Id: I48a6fdf0b21d3f3a795d9cf20564208f7c35ff5b No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/55960 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Attempt both GL and GLES for GPU unit testsGravatar Chris Dalton2017-10-05
| | | | | | | | | | | The hardcoded logic was not all inclusive and caused Chromebooks to not run GPU unit tests. Bug: skia: Change-Id: I7688adab314d12234ee03363609a1c4bf8f2edb5 Reviewed-on: https://skia-review.googlesource.com/55561 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* 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>
* Fix TSAN issue with atlas expansion.Gravatar Jim Van Verth2017-09-20
| | | | | | | | | | | Removes SkString-related malloc from DM crash handler, and adds null check in ProxyRefTest. Bug: skia:3550 Change-Id: I143c532b5d231a426b1a96b854e1effd6379b673 Reviewed-on: https://skia-review.googlesource.com/48440 Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Fix SkASSERT for convex paths with DAAGravatar Yuqian Li2017-09-07
| | | | | | | | | | | | | | As DAA does not chop edges at Y extrema, it's valid for convex edges to have only one edge (e.g., a single cubic edge with the valley shape \_/). This wasn't an issue for production because DAA is never called for convex paths by default. Bug=skia:7015 Change-Id: Iac79801d6a24188970ef6f7bf723494a25d92a1e Reviewed-on: https://skia-review.googlesource.com/42942 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Yuqian Li <liyuqian@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>
* Suppress file output for the gltestthreading configGravatar Brian Osman2017-08-30
| | | | | | | | Bug: skia: Change-Id: Icd905ea7e60a05bc3903eb85d111dcf73ce2c4dd Reviewed-on: https://skia-review.googlesource.com/40690 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Osman <brianosman@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>
* 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>
* 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>
* Blacklist svgparse_* svgs on non-8888Gravatar Chris Dalton2017-08-15
| | | | | | | | | | | This also required extending the blacklist argument to support negative matching and wildcards. Bug: skia:6918 Change-Id: I915e305c75fe23fc3e11c2dd3e91570967da0aaa Reviewed-on: https://skia-review.googlesource.com/31444 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Eric Boren <borenet@google.com>
* upstream cr/165303354Gravatar Mike Klein2017-08-15
| | | | | | | | | | | | The only interesting difference here is that I've just skipped cd_Documents() on Google3 iOS builds rather than adding a new target to BUILD. We don't run the binary so it's kind of moot what directory it'd run in. Change-Id: I1994e0283d24bcc505fa9b2b7b58307eafa5be92 Reviewed-on: https://skia-review.googlesource.com/34742 Reviewed-by: Ben Wagner <benjaminwagner@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Fix dm when --config not specified.Gravatar Ben Wagner2017-08-14
| | | | | | | | | Broken by https://skia-review.googlesource.com/c/32862. Change-Id: I711057da08793902b50e98b67af9107ac9ead8d2 Reviewed-on: https://skia-review.googlesource.com/33663 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Ben Wagner <benjaminwagner@google.com>
* Abort dm/nanobench on bad configs.Gravatar Ben Wagner2017-08-11
| | | | | | | | | Adjust the configs specified by recipes to avoid the new error. Change-Id: I23e31355e2faaab919d92abdb37a6f70cd2da1ff Reviewed-on: https://skia-review.googlesource.com/32862 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Ben Wagner <benjaminwagner@google.com>
* Add missing newline to initial DM outputGravatar Brian Osman2017-08-03
| | | | | | | | Bug: skia: Change-Id: I505e5c339947e9fc8bbec6acefc48ee9f47c96d2 Reviewed-on: https://skia-review.googlesource.com/30581 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Roll ANGLEGravatar Robert Phillips2017-08-01
| | | | | | | | | | | https://chromium.googlesource.com/angle/angle.git/+log/cce8965d2c58..878c8b1e5e89 ANGLE now crashes (on program compilation) if there isn't a flush between uses of different flavors of ANGLE context (e.g., angle_gl_es2 vs. angle_gl_es3). Change-Id: If59b6ec683e682db5214bb002a70863cee5fe013 Reviewed-on: https://skia-review.googlesource.com/28865 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* New analytic AA scan converter using delta (I call it DAA for now)Gravatar Yuqian Li2017-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DAA is: 1. Much simpler than AAA. SkScan_AAAPath.cpp is about 1700 lines. SkScan_DAAPath.cpp is about 300 lines. The whole DAA CL is only about 800 lines. 2. Much faster than AAA for complicated paths. The speedup applies to GL backend (including ccpr)! Here's the frame time of 'SampleApp --slide Chart' on macbook pro: AAA-raster: 33ms DAA-raster: 21ms AAA-gl: 30ms DAA-gl: 20ms AAA-ccpr: 18ms DAA-ccpr: 12ms My linux desktop doesn't have SSE3 so the speedup is smaller (~25% for Chart). I believe that DAA is so fast that I can enable it for any paths (AAA is not enabled by default for complicated paths because it is slow; hence our older supersampling scan converter is used for stroking on Chart for AAA-xxx config.) 3. The SkCoverageDelta is suitable for threaded backend with out-of-order concurrent scan conversion as commented in the source code. Maybe we can also just send deltas to GPU. 4. Similar to most analytic path renderers, the quality is on the best ground-truth level, unless there are intersections within a pixel. The intersections look good to my eyes although theoretically that could be arbitrary far from the ground truth (see my AAA slides). 5. For simple paths, such as circle, triangle, rrect, etc., DAA is slower than AAA. But DAA is faster than our older supersampling scan converter in most cases. As those simple paths usually don't constitute the bottleneck of a picture (skp or svg), I strongly recommend use DAA. 6. DAA also heavily favors blitMask so it may work quite well with SkRasterPipeline and SkRasterPipelineBlitter. Finally, please check https://skia-review.googlesource.com/c/22420/ which accelerate DAA by specializing blitCoverageDeltas for SkARGB32_Blitter and SkARGB32_Black_Blitter. It brings a little(<5%) speedup. But I couldn't figure out how to reduce the duplicate code so I don't intend to land it. Bug: skia: Change-Id: I3b7ed6a727447922e645b1acb737a506e7c09a4c Reviewed-on: https://skia-review.googlesource.com/19666 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Yuqian Li <liyuqian@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>
* sprinkle more tracing in GM, tests, and ok, and add TRACE_FUNCGravatar Mike Klein2017-07-24
| | | | | | | Change-Id: I562d438bd65e9fd900cfc6831f971b4af25c8ae6 Reviewed-on: https://skia-review.googlesource.com/26361 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Faster, thread-safe implementationGravatar Brian Osman2017-07-24
| | | | | | | | | Bug: skia: Change-Id: I401c5a9885c348aa424ab07b094acecddb209490 Reviewed-on: https://skia-review.googlesource.com/25860 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Don't write .pdfs in DM on the bots.Gravatar Mike Klein2017-07-24
| | | | | | | | | | | They take a long time to upload, and we don't do anything with them. BUG=skia:6821 Change-Id: I16c5fc423953fa3e9d0dcb184ecbbe23f3918357 Reviewed-on: https://skia-review.googlesource.com/26142 Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* 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>
* First stab at JSON event tracerGravatar Brian Osman2017-07-20
| | | | | | | | | | | | | | | | | | | | Not yet thread safe (so it forces threading off). Builds JSON on the fly, so overhead is certainly bad. Plan to fix all of that, but this at least "works". There is now one tracing flag: 'trace'. - 'debugf' installs the SkDebugf tracer. - 'atrace' installs the Android ATrace tracer. - Any other value is interpreted as a filename, and produces a JSON file for chrome://tracing. All three modes work in DM, nanobench, and Viewer. Bug: skia: Change-Id: I3fbc22382b99418a508c670be2770195c0a1c364 Reviewed-on: https://skia-review.googlesource.com/24781 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add option to ignore SIGINT when running DM on Android.Gravatar Derek Sollenberger2017-07-20
| | | | | | | | | Bug: skia:6856 Change-Id: Iaaad2c22988cf8058304b7396c7d24eacd2f3edb Reviewed-on: https://skia-review.googlesource.com/24745 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
* Add SkDebugf trace event handler.Gravatar Brian Salomon2017-07-19
| | | | | | | | | Also adds more trace events to GPU backend. Change-Id: Ifa5f0cd4b1fd582f0cc30d37d9e6414dc498c75d Reviewed-on: https://skia-review.googlesource.com/24622 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@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>
* add --forceRasterPipeline to dm, (already in nanobench)Gravatar Mike Reed2017-07-06
| | | | | | | | Bug: skia: Change-Id: I0e5f7dd2aaa03340687cdfe5578c8697088cd714 Reviewed-on: https://skia-review.googlesource.com/21532 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Remove CodecSrc::kIndex8_Always_DstColorTypeGravatar Leon Scroggins III2017-07-05
| | | | | | | | | | We have removed support for drawing Index8, so stop testing it in DM. Bug: skia: 6828 Change-Id: Ib2c4d3ebd371be704151a9f956c0ca2aaf2926a6 Reviewed-on: https://skia-review.googlesource.com/21525 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* always touch verbose.log, even if --verboseGravatar Mike Klein2017-06-26
| | | | | | | | | | | | This lets us run bots that upload images with --verbose. Today we're getting away with --verbose on some bots because they happen to skip upload. Change-Id: If915a65987b43c945263ada7751bf36aedff605a Reviewed-on: https://skia-review.googlesource.com/20834 Reviewed-by: Ben Wagner <benjaminwagner@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>