aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
Commit message (Collapse)AuthorAge
* Convert geometry shaders to operate in Skia device spaceGravatar Chris Dalton2017-10-25
| | | | | | | | | | | | | Defers the transformation to normalized window coordinates until after the geometry shader. Merges vertex and a geometry shader builders into a single compilation unit with a common base class. Updates CCPR geometry shaders accordingly. Bug: skia: Change-Id: If93c90e978b1fdc7120febd05cfb05810fd496b5 Reviewed-on: https://skia-review.googlesource.com/62980 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Print measure info before closeWindowGravatar Yuqian Li2017-10-23
| | | | | | | | | | | The closeWindow function does not guarantee the calling of ~SampleWindow (in Windows and Mac). So we print the info earlier. Bug: skia: Change-Id: Ib8b11cac4fb2fc7b62a02c7fb7f3aaaa48df2da6 Reviewed-on: https://skia-review.googlesource.com/63140 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Yuqian Li <liyuqian@google.com>
* SampleAAGeometry tweaksGravatar Chris Dalton2017-10-20
| | | | | | | | | | | | - Use capital letters avoid conflict with built-in commands, particularly zoom-window ('z') and toggle-backend ('d'). - Increase kHitToleranace for touch screens. Bug: skia: Change-Id: I6feaabd8aa06600bdeb4623ab081d973369c4841 Reviewed-on: https://skia-review.googlesource.com/52528 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* Add a SampleApp flag to automate keystrokes on startupGravatar Chris Dalton2017-10-18
| | | | | | | | | | | | | This is a quick-and-dirty solution to select color mode, backend, etc. from the command line. e.g. 'out/Debug/SampleApp --keys CCd' for opengl and srgb Bug: skia: Change-Id: I61f9e0fd4209a5fadb585c02c71984398f2f0860 Reviewed-on: https://skia-review.googlesource.com/61482 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Remove redundant parentheses.Gravatar Ben Wagner2017-10-17
| | | | | | | | | | | | | | | | Recent clang versions produce output like ../../samplecode/SampleAll.cpp:306:27: error: redundant parentheses surrounding declarator [-Werror,-Wredundant-parens] Remove these to clean up the code a bit. Change-Id: Ib099201f23f83cd712487c238b6a508290e667a7 Reviewed-on: https://skia-review.googlesource.com/60822 Commit-Queue: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Refactor CCPR coverage shaders for a vertex implGravatar Chris Dalton2017-10-16
| | | | | | | | | | | | | Decouples geometry generation and analytic coverage. This paves the way for a vertex shader implementation. TBR=egdaniel@google.com Bug: skia: Change-Id: I2a183401bfe70b9f14b9b1cf035de6020a2135fa Reviewed-on: https://skia-review.googlesource.com/60103 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "Refactor CCPR coverage shaders for a vertex impl"Gravatar Eric Boren2017-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e501033bbdc9143848edde3c3e3b7282169bc11e. Reason for revert: Broke several bots Original change's description: > Refactor CCPR coverage shaders for a vertex impl > > Decouples geometry generation and analytic coverage. This paves the > way for a vertex shader implementation. > > Bug: skia: > Change-Id: I23b79d4397db22bd8fc063b8dfca58ab00037292 > Reviewed-on: https://skia-review.googlesource.com/59200 > Commit-Queue: Chris Dalton <csmartdalton@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,csmartdalton@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia: Change-Id: I314bf03fa6cbeceb1c527d4d9464147b2e8464c6 Reviewed-on: https://skia-review.googlesource.com/59821 Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Eric Boren <borenet@google.com>
* Refactor CCPR coverage shaders for a vertex implGravatar Chris Dalton2017-10-15
| | | | | | | | | | | Decouples geometry generation and analytic coverage. This paves the way for a vertex shader implementation. Bug: skia: Change-Id: I23b79d4397db22bd8fc063b8dfca58ab00037292 Reviewed-on: https://skia-review.googlesource.com/59200 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@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>
* Remove trailing whitespace.Gravatar Ben Wagner2017-10-09
| | | | | | | | | | | Also adds a presubmit to prevent adding trailing whitespace to source code in the future. Change-Id: I41a4df81487f6f00aa19b188f0cac6a3377efde6 Reviewed-on: https://skia-review.googlesource.com/57380 Reviewed-by: Ravi Mistry <rmistry@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Mark ~LuaView as override.Gravatar Ben Wagner2017-10-09
| | | | | | | | | | | | | Newer clang versions report ../../samplecode/SampleLua.cpp:44:13: error: '~LuaView' overrides a destructor but is not marked 'override' [-Werror,-Winconsistent-missing-destructor-override] Change-Id: I6f3e69482a79e9580e51b957fff06e6d4d270735 Reviewed-on: https://skia-review.googlesource.com/57164 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@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>
* Add width and height option to SampleAppGravatar Yuqian Li2017-09-29
| | | | | | | | | | | So we can benchmark with given width/height dimensions. Bug: skia: Change-Id: I881c9f054cdcecc3e0b2bfb600afd778e1c57d95 Reviewed-on: https://skia-review.googlesource.com/51246 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Miscellaneous dynamic atlas fixes.Gravatar Jim Van Verth2017-09-28
| | | | | | | | | | | | | Make Chinese fling sample closer to Android test. Fix a bug in GrDrawOpAtlas::compact(), where the atlas generation wasn't incremented so the client didn't know it changed. Add some debug info for GrDrawOpAtlas. Add a comment in GrDrawOpAtlas::setLastUseTokenBulk. Change-Id: I79192a017870541a79731b1a22f665ec5deeff09 Reviewed-on: https://skia-review.googlesource.com/52761 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add svg support to pathfinder toolGravatar Chris Dalton2017-09-28
| | | | | | | | Bug: skia: Change-Id: I9302491c983fae5e2e84edc4ee135a917b099a42 Reviewed-on: https://skia-review.googlesource.com/52360 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* 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>
* Remove unused functions get_preferred_sizeGravatar Yuqian Li2017-09-26
| | | | | | | | | | Bug: skia: Change-Id: I6a5b5d96ad48b84b07d2e56fbabb870a90c62a97 Reviewed-on: https://skia-review.googlesource.com/51460 Reviewed-by: Yuqian Li <liyuqian@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Yuqian Li <liyuqian@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>
* CCPR: Remove kCombinedTriangleHullsAndEdgesGravatar Chris Dalton2017-09-26
| | | | | | | | | | | | | | Removes the mode that generates edge and hull geometry simultaneously from the geometry shader. Perf was hit and miss and it's not compatible with vertex shaders. We can revisit if geometry shaders still show promise on some platforms after a vertex shader impl is finished. Bug: skia: Change-Id: I984231e9a5bb60fe31d3ba280c7390a74aa5bc27 Reviewed-on: https://skia-review.googlesource.com/51300 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Add animated cowboy sample from WebKit tests, and fix.Gravatar Jim Van Verth2017-09-25
| | | | | | | | Bug: chromium:712455 Change-Id: Ic9bb9b862abe01f112cc41d28589733460b15bc1 Reviewed-on: https://skia-review.googlesource.com/50181 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add measurement command line args to SampleAppGravatar Yuqian Li2017-09-25
| | | | | | | | | | | | | | | | | This way, we may be able to use SampleApp as a performance benchmark tool that's closer to real-world use cases than nanobench. For example, we can now run ./out/Release/SampleApp --slide Chart --backendTiles 8 --measureMS 2000 to test the threaded backend. Bug: skia: Change-Id: I92b177624bc8d16c5b4d3ad122319882e8783101 Reviewed-on: https://skia-review.googlesource.com/50801 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Use shader based blending to clamp kPlus mode w/F16Gravatar Brian Osman2017-09-20
| | | | | | | | Bug: skia:6173 Change-Id: I21042d484d9a7b3eee04aa3301d9793d00ad6908 Reviewed-on: https://skia-review.googlesource.com/48183 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Minor cleanups for CCPRGravatar Chris Dalton2017-09-12
| | | | | | | | Bug: skia: Change-Id: Ic4838f0e242ded0c3d0cb5c86715ed67d8152f5c Reviewed-on: https://skia-review.googlesource.com/44520 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* add L565 to our cycle of color configs in sampleappGravatar Mike Reed2017-09-06
| | | | | | | | Bug: skia: Change-Id: I1fd78b495e2f087096ad5b5db36c15a16514409c Reviewed-on: https://skia-review.googlesource.com/43160 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Reed <reed@google.com>
* CCPR: Remove cubic insets and MSAA bordersGravatar Chris Dalton2017-09-05
| | | | | | | | | | | | | | | Avoids the need for MSAA cubic borders by chopping up the cubic geometry and crossing the inflections points and loop intersections with lines and quadratic(s) instead. This allows us to render the remaining cubic segments with simple hulls and analytic AA, giving better image quality and performance. Bug: skia: Change-Id: If371229f575ee0286c325c230a116d602a9d38ce Reviewed-on: https://skia-review.googlesource.com/41883 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* CCPR: Rewrite path parsingGravatar Chris Dalton2017-09-05
| | | | | | | | | | | | Creates a GrCCPRGeometry class that chops contours up into simple segments that ccpr can render, and rewrites the GPU buffer creation to be able to handle arbitrary lengths of ccpr geometry. Bug: skia: Change-Id: Iaa173a02729e177b0ed7ef7fbb9195d349be689d Reviewed-on: https://skia-review.googlesource.com/41963 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Let SampleApp provide the thread poolGravatar Yuqian Li2017-09-01
| | | | | | | | | | | | | | Otherwise, creating a new thread pool each frame could be a major bottleneck. Somehow, creating new thread pool each frame is good for measuring FPS, so that behavior is maintained when fMeasureFPS is true. I'm still doing experiments with my own schedulers. Once they get more stable, I'll probably apply their changes to the SkExecutor. Bug: skia: Change-Id: Iead96034e0d0abdebb5069dec41215990f71f693 Reviewed-on: https://skia-review.googlesource.com/41845 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* simplify path validateGravatar Cary Clark2017-08-29
| | | | | | | | | | | | | Reduce path validation interfaces, deferring the harder work of rewriting the callers until later. R=reed@google.com,enne@chromium.org Change-Id: Iea56f1cd1be93bb1d96b50836a9bd3cd4872ad23 Reviewed-on: https://skia-review.googlesource.com/37541 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Adrienne Walker <enne@chromium.org>
* 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>
* Add a GrCCPRGeometry fileGravatar Chris Dalton2017-08-28
| | | | | | | | | | | Enough ccpr-specific geometry code is in flight that it feels like it should have its own file. Bug: skia: Change-Id: I99ef620a7dc35178cf774b3a4ec6159d46f401c7 Reviewed-on: https://skia-review.googlesource.com/39162 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Make Copy Ops to go through GpuCommandBuffer instead of straigt to GPU.Gravatar Greg Daniel2017-08-24
| | | | | | | | Bug: skia: Change-Id: I4eae4507e07278997e26419e94586eef0780c423 Reviewed-on: https://skia-review.googlesource.com/38361 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Replace SkFAIL with SK_ABORT.Gravatar Ben Wagner2017-08-16
| | | | | | | | | | | | SkFAIL is a legacy macro which is just SK_ABORT. This CL mechanically changes uses of SkFAIL to SK_ABORT in preparation for its removal. The related sk_throw macro will be changed independently, due to needing to actually clean up its users. Change-Id: Id70b5c111a02d2458dc60c8933f444df27d9cebb Reviewed-on: https://skia-review.googlesource.com/35284 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Add Chinese fling sampleGravatar Robert Phillips2017-08-16
| | | | | | | Change-Id: Id27877c4d816ec83460f50a3a0d9cc0299ea6849 Reviewed-on: https://skia-review.googlesource.com/34780 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove SkTypeface::Style from fuzzers and lua.Gravatar Ben Wagner2017-08-08
| | | | | | | Change-Id: I53be039e21a4c11ec3a4bc54c1424cd3e15afc6a Reviewed-on: https://skia-review.googlesource.com/31643 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* add 'R' to toggle rasterpipeline in sampleappGravatar Mike Reed2017-08-07
| | | | | | | | Bug: skia: Change-Id: I5b198c883140a281d9304fe3c44978cd8fcabce9 Reviewed-on: https://skia-review.googlesource.com/31461 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* CCPR: Process quadratic flat edges without soft msaaGravatar Chris Dalton2017-08-07
| | | | | | | | | | | | | | | | | | | | | | The artifacts previously thought to require msaa can be handled by (1) converting near-linear quadratics into lines, and (2) ensuring all quadratic segments are monotonic with respect to the vector of their closing edge [P2 -> P0]. No. 1 was already in effect. No. 2 is implemented by this change. Now we only fall back on soft msaa for the two corner pixels. This change also does some generic housekeeping in the quadratic processor. Bug: skia: Change-Id: Ib3309c2ed86d3d8bec5f451125a69326e82eeb1c Reviewed-on: https://skia-review.googlesource.com/29721 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Remove SkLightingShader and associated classesGravatar Robert Phillips2017-08-07
| | | | | | | | Change-Id: I8050414c30dfdb5df23ca79955adc5ba3a29d3f5 Reviewed-on: https://skia-review.googlesource.com/31140 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* clang on windows supportGravatar Mike Klein2017-07-31
| | | | | | | | | | | | | | | | | 1) Run python bin/fetch-clang-win 2) Set clang_win = "../bin/clang_win" 3) ??? 4) Profit Most changes here are to pass the right -mfoo flags to Clang to enable advanced instruction sets, or fixed warning-as-errors. BUG=skia:2679 Change-Id: Ieed145d35c209131c7c16fdd3ee11a3de4a1a921 Reviewed-on: https://skia-review.googlesource.com/28740 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Remove internal use of SkTypeface::Style.Gravatar Ben Wagner2017-07-27
| | | | | | | Change-Id: I71cf04b12be95a54b7fb47d048ba1f8672ed9a8f Reviewed-on: https://skia-review.googlesource.com/27760 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Make GrPipeline hold a GrRenderTargetProxy (instead of a GrRenderTarget)Gravatar Robert Phillips2017-07-26
| | | | | | | | | | | In a future world where GrSurface no longer has an origin it will be useful for the GrPipeline to be holding the GrRenderTargetProxy (which will still have an origin). Change-Id: I743a8cc07b6b92f8116227fb77b7c37da43cde8a Reviewed-on: https://skia-review.googlesource.com/26804 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>
* Add Make[backend] calls for creating GrContextsGravatar Greg Daniel2017-07-25
| | | | | | | | | Docs-Preview: https://skia.org/?cl=26369 Bug: skia: Change-Id: I460ee63e466f85b05918479f068a2e5ca2d70550 Reviewed-on: https://skia-review.googlesource.com/26369 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "pass surface to device-manager"Gravatar Ben Wagner2017-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7b215bcad3034aca262ca4eeebe31b5e8868638b. Reason for revert: SampleApp on Linux doesn't ever draw anything. Original change's description: > pass surface to device-manager > > Bug: skia:3216 > Change-Id: I8e00e9eca3763593a4071c16a3ab04c46bf83a3e > Reviewed-on: https://skia-review.googlesource.com/26020 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> TBR=bsalomon@google.com,reed@google.com Change-Id: I55f1292ab772bfe8fb1efb74f591b05bbe24d054 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:3216 Reviewed-on: https://skia-review.googlesource.com/26161 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* remove (unused?) arcto patheffectGravatar Mike Reed2017-07-24
| | | | | | | | Bug: skia: Change-Id: I80943cc495eb1edce839387f4b9512a66a4e5c11 Reviewed-on: https://skia-review.googlesource.com/25981 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
* pass surface to device-managerGravatar Mike Reed2017-07-23
| | | | | | | | Bug: skia:3216 Change-Id: I8e00e9eca3763593a4071c16a3ab04c46bf83a3e Reviewed-on: https://skia-review.googlesource.com/26020 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>