aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm
Commit message (Collapse)AuthorAge
...
* 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>
* 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>
* 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>
* Revert "Hide SkEncodedInfo"Gravatar Leon Scroggins2017-12-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c6f7a4ffa9522159efc42f7c948bba5e66bb8844. Reason for revert: Causing differences in Gold, stemming from the fact that this changes the recommended SkImageInfo for 16 bits-per-component PNG from N32 to F16. - an F16 bitmap already png-encodes to a 16 bits-per-component PNG, but it does not encode a linear colorspace (possibly a bug?). when we decode this PNG using getInfo(), it fails because it has an F16 color type and non-linear colorspace. (In the encode-srgb-png gm, this results in blank results for F16.) We could correct this on the encoder side, but it seems possible that a 16 bits-per-component PNG could be encoded with a different color space. In that case, we'd want SkCodec to recommend F16/SRGBLinear, but I think we'd want the SkCodec to store the encoded SkColorSpace so that we can Xform between the two. Currently SkCodec only stores one color space, so that will require a refactor. - When decoding 16-bits-per-component PNGs, we are now decoding them to F16. This shows differences in Gold. The srgb/gpu results now look more like F16. I think this is fine. Original change's description: > 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, use it to make the same decision that Android > would have made - 16 bits per component means to set the info to F16. Add > a test that computeOutputColorType behaves as expected. > > 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. > > Change-Id: Ie2cf11339bf999ebfd4390c0f448f7edd6feabda > Reviewed-on: https://skia-review.googlesource.com/79260 > Reviewed-by: Mike Reed <reed@google.com> > Reviewed-by: Mike Klein <mtklein@chromium.org> > Commit-Queue: Leon Scroggins <scroggo@google.com> TBR=mtklein@chromium.org,scroggo@google.com,reed@google.com Change-Id: I0c5dd1461e1b70d1e55349a8e7ee6b029c3f556e No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7353, skia:6839 Reviewed-on: https://skia-review.googlesource.com/80660 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Hide SkEncodedInfoGravatar Leon Scroggins III2017-12-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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, use it to make the same decision that Android would have made - 16 bits per component means to set the info to F16. Add a test that computeOutputColorType behaves as expected. 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. Change-Id: Ie2cf11339bf999ebfd4390c0f448f7edd6feabda Reviewed-on: https://skia-review.googlesource.com/79260 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Leon Scroggins <scroggo@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>
* 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>
* Drop support for OSMesa in test tools and remove build botGravatar Brian Salomon2017-11-13
| | | | | | | | Change-Id: Ic85ee05fe292a36a053ca7a20ccce24a4da4fae2 Reviewed-on: https://skia-review.googlesource.com/70026 Reviewed-by: Joe Gregorio <jcgregorio@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* DM FontMgr updatesGravatar Mike Klein2017-11-10
| | | | | | | | | | | | | | | | | | | - return nullptr for the various makeFromFoo() that we can't support, and tweak a few unit tests to bail out early when they do - create FontStyleSet and SkTypefaces once - abort early from FontHostStream if we can't openStream() - implement SkTestTypeface::onCreateFamilyNameIterator() with SkOTUtils::LocalizedStrings_SingleName() so FontNames passes - pin out-of-range glyph IDs to zero in SkTestTypeface Change-Id: Iac53265e331fc1c5c507513af3ab299063e6610a Reviewed-on: https://skia-review.googlesource.com/69501 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>
* 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 "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>
* 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>
* 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>
* 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>