aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
Commit message (Collapse)AuthorAge
* ccpr: Tessellate fans for very large and/or simple pathsGravatar Chris Dalton2018-02-14
| | | | | | | | | | | | This increases CPU work, but reduces overdraw on the GPU as compared to Redbook fanning. TBR=bsalomon@google.com Change-Id: I396b887075d4422531908c2361ee1e26f076d5c3 Reviewed-on: https://skia-review.googlesource.com/107141 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "ccpr: Tessellate fans for very large and/or simple paths"Gravatar Cary Clark2018-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4138c972effe4eb0227fbb96571df290f3d1979b. Reason for revert: broke android flutter build Original change's description: > ccpr: Tessellate fans for very large and/or simple paths > > This increases CPU work, but reduces overdraw on the GPU as compared to > Redbook fanning. > > Bug: skia: > Change-Id: I47239c964261e0014a94266a71223eab0597bfb8 > Reviewed-on: https://skia-review.googlesource.com/105203 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=bsalomon@google.com,csmartdalton@google.com Change-Id: I98b5c10b97c3fa603de5122d9bb47ca07659242c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/106620 Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@skia.org>
* ccpr: Tessellate fans for very large and/or simple pathsGravatar Chris Dalton2018-02-12
| | | | | | | | | | | This increases CPU work, but reduces overdraw on the GPU as compared to Redbook fanning. Bug: skia: Change-Id: I47239c964261e0014a94266a71223eab0597bfb8 Reviewed-on: https://skia-review.googlesource.com/105203 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* use SkShaper instead of SkTextBoxGravatar Mike Reed2018-02-10
| | | | | | | Change-Id: Ie96d7f65d5826a664f55adcbba829cef2f8248dc Reviewed-on: https://skia-review.googlesource.com/106021 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert "use SkShaper instead of SkTextBox"Gravatar Yuqian Li2018-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 59dad9111792ca1ceebfb444497f81d9eb357b7d. Reason for revert: Possibly breaks Build-Win-Clang-arm64-Release-Android Original change's description: > use SkShaper instead of SkTextBox > > Change-Id: I63fae79007938cb89c122799b8984a88e91ac1e7 > Reviewed-on: https://skia-review.googlesource.com/102863 > Commit-Queue: Hal Canary <halcanary@google.com> > Reviewed-by: Hal Canary <halcanary@google.com> > Reviewed-by: Ben Wagner <bungeman@google.com> TBR=halcanary@google.com,bungeman@google.com,fmalita@chromium.org,reed@google.com Change-Id: Id865d9e9cce03b4166f818c2bad659bdecc4f447 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/105941 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* use SkShaper instead of SkTextBoxGravatar Mike Reed2018-02-08
| | | | | | | | Change-Id: I63fae79007938cb89c122799b8984a88e91ac1e7 Reviewed-on: https://skia-review.googlesource.com/102863 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Hal Canary <halcanary@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* Simplify SkAnimatedImageGravatar Leon Scroggins III2018-01-30
| | | | | | | | | | | | | Bug: b/63908092 Rather than keeping track of the time and whether the animation is running, leave that up to the client. Offer a single method to decode the next frame, allowing the client to stay one frame ahead. Change-Id: I546013e32e3a0874181b0dce1349bbec07aaadd4 Reviewed-on: https://skia-review.googlesource.com/101544 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* [skottie] Hierarchical animatorsGravatar Florin Malita2018-01-29
| | | | | | | | | | | | | | Instead of a flat animator space, introduce animator groups. This allows us to encapsulate layer animators and only dispatch ticks when their owning layer is active. TBR= Change-Id: I1fc8a55abf68a712b71969bb1a11275dbe54c236 Reviewed-on: https://skia-review.googlesource.com/101201 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* eliminate SK_BUILD_FOR_WIN32Gravatar Mike Klein2018-01-26
| | | | | | | | | | SK_BUILD_FOR_WIN and SK_BUILD_FOR_WIN32 have long meant the same thing. Chrome fix is https://chromium-review.googlesource.com/c/chromium/src/+/884007 Change-Id: I0e907b1bcd2a358eabf776f414fd3aeb3c689561 Reviewed-on: https://skia-review.googlesource.com/99340 Reviewed-by: Mike Reed <reed@google.com>
* Use int when possible to calculate atlas indices in shaders.Gravatar Jim Van Verth2018-01-26
| | | | | | | | | | | | | | | | | On certain iOS devices half has a mantissa of only 10 bits, which is not enough to perform the floating point trickery to get the lower bits out of the "texture coordinates". Instead we use int if available, and float if not available. Also re-enables multitexturing for iOS and adds a sample which stresses the issue, and a version of fontcache that tests multitexturing. Bug: skia:7285 Change-Id: Ia541b6a418c1860c941071750ceb26459eb846ea Reviewed-on: https://skia-review.googlesource.com/99800 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* ccpr: Use primitive restart feature on ARMGravatar Chris Dalton2018-01-23
| | | | | | | | Bug: skia: Change-Id: Ia7ab55f8b6ecdd674762f5197d35e8db58f07c01 Reviewed-on: https://skia-review.googlesource.com/98180 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* remove unneeded SkFlattenableSerializationGravatar Mike Reed2018-01-23
| | | | | | | | | Bug: skia: Change-Id: I5cf40b88b05dcd8e83383f6271b046eac8d55e35 Reviewed-on: https://skia-review.googlesource.com/98642 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* IWYU -- SkShader.hGravatar Mike Reed2018-01-23
| | | | | | | | Bug: skia: Change-Id: I57bffc14c4888627a22158e35f3ac3b762138f02 Reviewed-on: https://skia-review.googlesource.com/98520 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Convert SVGPong sample to sksgGravatar Florin Malita2018-01-22
| | | | | | | | | | Use the new scene graph impl instead of old SVG DOM. TBR= Change-Id: I590798b362e953aa3554e85669193f7501ba46de Reviewed-on: https://skia-review.googlesource.com/98441 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Respect repetition count in SkAnimatedImageGravatar Leon Scroggins III2018-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | | Bug: b/63908092 By default use the repetition count stored in the encoded data (if any). Allow setting the repetition count manually, so that the animation will stop after n+1 total cycles (unless -1 is used for infinite). If the animation is complete, make start reset it. When the animation is not running, make update return max double (i.e. no need to update any time soon). Fix a bug where the first call to update returned -1. Share write_bm with CodecAnimTest, for debugging. Update Sample to check isRunning rather than keeping its own record of whether the animation is running. Change-Id: I883e4d7325f7a7b23a422fa9d756f9ea3018f0f8 Reviewed-on: https://skia-review.googlesource.com/97082 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Add Chinese zoom Sample.Gravatar Jim Van Verth2018-01-22
| | | | | | | | | | Bug: skia: Change-Id: Ibe5ffee64fe9fccd6b8d86c1310a78d2d51e424e Reviewed-on: https://skia-review.googlesource.com/97065 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* remove unused SkRasterizerGravatar Mike Reed2018-01-21
| | | | | | | | Bug: skia:7500 Change-Id: Iaa683cf8f0b18887cce4ec676631d1e1efee1712 Reviewed-on: https://skia-review.googlesource.com/97400 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Use SkAndroidCodec in SkAnimatedImageGravatar Leon Scroggins III2018-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | Bug: b/63909536 Bug: b/63908092 SkAnimatedImage is designed around a specific Android use case, so move it into the android folders. Make SkAnimatedImage hold an SkAndroidCodec (instead of an SkCodec). Expose fCodec so that SkAnimatedImage can animate by using the internal SkCodec. Update the sample to use SkAndroidCodec. Allow webp to decode a scaled down animation. For RestoreBG frames, adjust the frameRect (which is erased) to account for the scaling. Add a test to verify that we decode a webp with a RestoreBG frame successfully. Disable scaling for later frames in other formats (GIF, for now), since the code for erasing a RestoreBG frame is currently unaware of the sampling. Change-Id: I5dd2b86138f2c7f6adcd08dce1bd49040f7dc224 Reviewed-on: https://skia-review.googlesource.com/94621 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com>
* Add an SkDrawable for animated images (e.g. GIF)Gravatar Leon Scroggins III2018-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: b/63909536 SkAnimatedImage is a simple drawable for animating a GIF. Thread-safety is left up to the client. At most two bitmaps are stored in the drawable; one for the current frame and one for a frame that may need to be restored. The backup frame prevents some cases where we would otherwise have to re-decode from the beginning of the image. The API lets the client set the time value, and decodes to match that time. TODO: - Callback for when the animation is complete - Ability to use SkAndroidCodec - Modify the loop count (or leave that up to client?) - Better and/or client-specific caching Other changes: - Add a sample which animates a GIF - Reenable SK_CODEC_PRINTF for debug builds and Android Change-Id: I945ffbccdb6008f2a05ed4d9b2af869a261fb300 Reviewed-on: https://skia-review.googlesource.com/93420 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* CCPR: Rename GrCCPR* -> GrCC*Gravatar Chris Dalton2018-01-08
| | | | | | | | | | | Also runs clang-format on the files that don't have special shader builder styling. Bug: skia: Change-Id: I4a67569a7c8472acfb9200644c913844a92e3b2d Reviewed-on: https://skia-review.googlesource.com/92083 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* move largest apis into privateGravatar Mike Reed2018-01-08
| | | | | | | | | Related to https://skia-review.googlesource.com/c/skia/+/91860 Bug: skia: Change-Id: Ia8fd981b422bbab75541b078277d2e09e1fc9d41 Reviewed-on: https://skia-review.googlesource.com/91940 Reviewed-by: Brian Salomon <bsalomon@google.com>
* Reland "CCPR: Initial semi-optimized vertex shader Impl"Gravatar Chris Dalton2018-01-04
| | | | | | | | | | | | | | | | | | | | This is a reland of e3877ce5ceb7842b61d54bebcc51864e5787a2bc Original change's description: > CCPR: Initial semi-optimized vertex shader Impl > > TBR=bsalomon@google.com > > Bug: skia: > Change-Id: I24173e146d8c95cec5f29e8cb4fa5e2c28f9a33c > Reviewed-on: https://skia-review.googlesource.com/89120 > Reviewed-by: Chris Dalton <csmartdalton@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> Bug: skia: Change-Id: I1d194853540e64df9c7b55ceb388a5d2f32bc258 Reviewed-on: https://skia-review.googlesource.com/90963 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* [sksg] Fix paint invalGravatar Florin Malita2017-12-29
| | | | | | | | | | | Paint nodes contribute to invalidation. Hoist the inval logic from geometry nodes to draw nodes. TBR= Change-Id: Iab33086c377ef4940a84dae3cdccb2c9bdbee99c Reviewed-on: https://skia-review.googlesource.com/89901 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Fix leak in GM:RectanizerGravatar Florin Malita2017-12-24
| | | | | | | | | TBR= Change-Id: I0e6135ac7fac433a0539f00a45f569ce4f48aa7c Reviewed-on: https://skia-review.googlesource.com/89421 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "CCPR: Initial semi-optimized vertex shader Impl"Gravatar Chris Dalton2017-12-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e3877ce5ceb7842b61d54bebcc51864e5787a2bc. Reason for revert: Intel crashing again Original change's description: > CCPR: Initial semi-optimized vertex shader Impl > > TBR=bsalomon@google.com > > Bug: skia: > Change-Id: I24173e146d8c95cec5f29e8cb4fa5e2c28f9a33c > Reviewed-on: https://skia-review.googlesource.com/89120 > Reviewed-by: Chris Dalton <csmartdalton@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=bsalomon@google.com,brianosman@google.com,csmartdalton@google.com Change-Id: I2485db30397958722a07c5992c748ab69365ebb6 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/89300 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* CCPR: Initial semi-optimized vertex shader ImplGravatar Chris Dalton2017-12-22
| | | | | | | | | | TBR=bsalomon@google.com Bug: skia: Change-Id: I24173e146d8c95cec5f29e8cb4fa5e2c28f9a33c Reviewed-on: https://skia-review.googlesource.com/89120 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Initial scene graph (SkSG)Gravatar Florin Malita2017-12-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sketching a thin (as in close-to-skia-semantics) scene graph API, focused on external animation, inval tracking and minimal repaint. Only a few concrete classes/features so far: * Rect/Color/Transform/Group * basic inval tracking * a trivial animated sample with inval visualization Pretty much everything (especially naming) is volatile, so treat accordingly. The interesting bits to review are likely in Node.{h,cpp} for inval and SampleSGInval.cpp for usage. Initial class hierarchy: * Node: invalidation/ancestors tracking | -- * RenderNode: onRender(SkCanvas) | | | -- * Draw (concrete): rendering a [geometry, paint] tuple | | | -- * Group (concrete): grouping multiple RenderNodes | | | -- * EffectNode: single-descendant effect wrapper | | | -- * Transform (concrete): transform effect | -- * PaintNode: onMakePaint() | | | -- * Color (concrete): SkColor paint wrapper | -- * GeometryNode: onComputeBounds(), onDraw(SkCanvas, SkPaint) | -- * Rect (concrete): SkRect wrapper TBR= Change-Id: Iacf9b773c181a7582ecd31ee968562f179d1aa1b Reviewed-on: https://skia-review.googlesource.com/85502 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "CCPR: Initial semi-optimized vertex shader Impl"Gravatar Brian Osman2017-12-20
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a8f6aef13d0592305e05baf19ee724f31a53b466. Reason for revert: Looks to failing on ANGLE bots Original change's description: > CCPR: Initial semi-optimized vertex shader Impl > > Bug: skia: > Change-Id: If22f47a3b945ce7336f8e609c2e0c911f09e1d18 > Reviewed-on: https://skia-review.googlesource.com/86820 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=egdaniel@google.com,bsalomon@google.com,csmartdalton@google.com Change-Id: Ic5a73434cba4246a72790db2c27d06e7a50f389a No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/88220 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* CCPR: Initial semi-optimized vertex shader ImplGravatar Chris Dalton2017-12-20
| | | | | | | | Bug: skia: Change-Id: If22f47a3b945ce7336f8e609c2e0c911f09e1d18 Reviewed-on: https://skia-review.googlesource.com/86820 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "efficiently dash very large rectangles and very long lines"Gravatar Cary Clark2017-12-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1ad81981b0027e96ef0cecd78661ab2c22bdc4aa. Reason for revert: broke chrome layout tests Original change's description: > efficiently dash very large rectangles and very long lines > > Speed up dashing when lines and rects are absurdly large. > > Prior to this CL, only horizontal lines were detected. > > The onOnceBeforeDraw changes are there to make debugging easier. > > Also folded in a change to handle dashing of zero length lines. > > R=​reed@google.com, egdaniel@google.com > Bug: skia:7311 > Change-Id: Ia16fb124c7a78a5cc639e612fae29c879a37da1a > Reviewed-on: https://skia-review.googlesource.com/84862 > Commit-Queue: Cary Clark <caryclark@skia.org> > Reviewed-by: Mike Reed <reed@google.com> TBR=egdaniel@google.com,reed@google.com,caryclark@skia.org Change-Id: I5e8f04c54486f8cd1a931f6cade92feaaa4a7647 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7311 Reviewed-on: https://skia-review.googlesource.com/87282 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Fix alpha contribution to tonal color.Gravatar Jim Van Verth2017-12-19
| | | | | | | | | | | Also adds a tonal color GM, a grayscale mode to shadowutils GM, and animated alpha to SampleAndroidShadows. Bug: skia: Change-Id: I1dcb5cab7e53ffa7a3bf1a07b6ebfed38df1a9ed Reviewed-on: https://skia-review.googlesource.com/85002 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* efficiently dash very large rectangles and very long linesGravatar Cary Clark2017-12-19
| | | | | | | | | | | | | | | | | Speed up dashing when lines and rects are absurdly large. Prior to this CL, only horizontal lines were detected. The onOnceBeforeDraw changes are there to make debugging easier. Also folded in a change to handle dashing of zero length lines. R=reed@google.com, egdaniel@google.com Bug: skia:7311 Change-Id: Ia16fb124c7a78a5cc639e612fae29c879a37da1a Reviewed-on: https://skia-review.googlesource.com/84862 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Mike Reed <reed@google.com>
* CCPR: Don't use instanced draw calls with geometry shadersGravatar Chris Dalton2017-12-11
| | | | | | | | | | | | It isn't necessary for the vertex shader to know all the points because everything happens in the geometry shader. It's simpler to use regular vertex arrays instead. Bug: skia: Change-Id: I7bf83180476fbe0ab01492611cd72e72b3f7d4f2 Reviewed-on: https://skia-review.googlesource.com/82881 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Fix SampleLua buildGravatar Florin Malita2017-12-11
| | | | | | | Change-Id: Ie0114ab16b99aed4343f6255dbc86fb15554ea74 Reviewed-on: https://skia-review.googlesource.com/83380 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "Revert "resources: remove most uses of GetResourcePath()""Gravatar Mike Reed2017-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cca230055921d2df8708ed6f9abcc2d43468dc7f. Reason for revert: think I guessed wrong about g32 -- unreverting Original change's description: > Revert "resources: remove most uses of GetResourcePath()" > > This reverts commit 5093a539def3ae09df324018f2343827009b2e05. > > Reason for revert: google3 seems broken > > Original change's description: > > resources: remove most uses of GetResourcePath() > > > > Going forward, we will standardize on GetResourceAsData(), which will > > make it easier to run tests in environments without access to the > > filesystem. > > > > Also: GetResourceAsData() complains when a resource is missing. > > This is usually an error. > > > > Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188 > > Reviewed-on: https://skia-review.googlesource.com/82642 > > Reviewed-by: Hal Canary <halcanary@google.com> > > Commit-Queue: Hal Canary <halcanary@google.com> > > TBR=halcanary@google.com,scroggo@google.com > > Change-Id: Ic5a7c0167c995a672e6b06dc92abe00564432214 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/83001 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> TBR=halcanary@google.com,scroggo@google.com,reed@google.com Change-Id: I5a46e4de61186a8a5eb9cacd3275e24e311d5a07 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/82942 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "resources: remove most uses of GetResourcePath()"Gravatar Mike Reed2017-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5093a539def3ae09df324018f2343827009b2e05. Reason for revert: google3 seems broken Original change's description: > resources: remove most uses of GetResourcePath() > > Going forward, we will standardize on GetResourceAsData(), which will > make it easier to run tests in environments without access to the > filesystem. > > Also: GetResourceAsData() complains when a resource is missing. > This is usually an error. > > Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188 > Reviewed-on: https://skia-review.googlesource.com/82642 > Reviewed-by: Hal Canary <halcanary@google.com> > Commit-Queue: Hal Canary <halcanary@google.com> TBR=halcanary@google.com,scroggo@google.com Change-Id: Ic5a7c0167c995a672e6b06dc92abe00564432214 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/83001 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* CCPR: Combine loops and serpentines back into a single shaderGravatar Chris Dalton2017-12-08
| | | | | | | | Bug: skia: Change-Id: I945471ccd2580a2d39afd9c80acb8d9e5e196435 Reviewed-on: https://skia-review.googlesource.com/82460 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* resources: resource identifiers don't begin with leading slashGravatar Hal Canary2017-12-08
| | | | | | | Change-Id: I52522ffffbf0f5176ac9156cd563b41d6fdde59f Reviewed-on: https://skia-review.googlesource.com/82940 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* resources: remove most uses of GetResourcePath()Gravatar Hal Canary2017-12-08
| | | | | | | | | | | | | | Going forward, we will standardize on GetResourceAsData(), which will make it easier to run tests in environments without access to the filesystem. Also: GetResourceAsData() complains when a resource is missing. This is usually an error. Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188 Reviewed-on: https://skia-review.googlesource.com/82642 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* 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>
* CCPR: Eliminate texel buffersGravatar Chris Dalton2017-12-05
| | | | | | | | | | | | | | | | | | Points cost 8 bytes and indices cost 4. If a point is accessed twice, it's a wash whether we duplicate it or index. This change eliminates texel buffers by duplicating points across instance arrays. This reduces our dependence on extensions as well as getting rid of our indirect memory access pattern in vertex shaders. As a result of this change, memory usage by GPU buffers will only be a fraction larger at worst, and slightly better at best. Bug: skia: Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-SKNX_NO_SIMD Change-Id: I3c7f03772edd4f850d5fdd7b55552647335c1b52 Reviewed-on: https://skia-review.googlesource.com/79185 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Add analytic clip FPs that read from the CCPR atlasGravatar Chris Dalton2017-12-05
| | | | | | | | Bug: skia:7190 Change-Id: Ie31d368f52910e6917efdeb1b024370b06fc11ee Reviewed-on: https://skia-review.googlesource.com/77160 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* turn on extended Clang warnings on Windows tooGravatar Chris Dalton2017-12-04
| | | | | | | | | | Plus some small rearrangements of the various warning lists. Change-Id: Ied58f940341d69ddab971a529fd01b1e96b65641 Reviewed-on: https://skia-review.googlesource.com/67720 Commit-Queue: Chris Dalton <csmartdalton@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Fix SVGPong slide crash in ViewerGravatar Florin Malita2017-12-03
| | | | | | | | | | SVGPong relies on onOnceBeforeDraw() to initialize, but when switching slides via Viewer's UI, onAnimate() is fired before the first paint. Change-Id: I7be133072ec635975f7463538cd42edb69696b3f Reviewed-on: https://skia-review.googlesource.com/79424 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Remove more views code, just to simplify thingsGravatar Brian Osman2017-12-01
| | | | | | | | Bug: skia: Change-Id: Ie31a3c764e4f88f2b08f4198bd253841a2d8c264 Reviewed-on: https://skia-review.googlesource.com/79100 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Delete even more unused views codeGravatar Brian Osman2017-11-29
| | | | | | | | Bug: skia: Change-Id: I41480aa89dfcd8cb7e016e477cbabe354f35ce8a Reviewed-on: https://skia-review.googlesource.com/75480 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove a huge pile of views codeGravatar Brian Osman2017-11-22
| | | | | | | | | | | | | All of this is dead when not using the old SkWindow framework. TBR=reed@google.com Bug: skia: Change-Id: I0f6ab18987a98469bfd367d5bc10967300dfd3ca Reviewed-on: https://skia-review.googlesource.com/75384 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Fix XferDemo by sending push button events directly to parentGravatar Brian Osman2017-11-22
| | | | | | | | Bug: skia: Change-Id: I3141dd34a9a04c7a660000cba9e483191f28ef03 Reviewed-on: https://skia-review.googlesource.com/75362 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove SampleApp and convert HelloWorld to sk_appGravatar Brian Osman2017-11-21
| | | | | | | | | | | | | There is still a large amount of views code that could be trimmed down, but which is used to implement samples (in viewer). Seemed simpler to remove some of this code in pieces. Bug: skia: Change-Id: Ia3415060d03c8de604a154e3dc38379b754daab6 Reviewed-on: https://skia-review.googlesource.com/72801 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove clutter from experimentalGravatar Brian Osman2017-11-21
| | | | | | | | | | | | | SkMatrix has the canonical version of setPolyToPoly, we don't need three other copies sitting around. SkBorder appears to be useless. Bug: skia: Change-Id: Ie747ff7af6cf1d03e6276e8d7fe57e9b3e4ad411 Reviewed-on: https://skia-review.googlesource.com/74141 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Osman <brianosman@google.com>