aboutsummaryrefslogtreecommitdiffhomepage
path: root/gn/samples.gni
Commit message (Collapse)AuthorAge
* Restore SkLightingShader and associated classesGravatar Robert Phillips2018-07-17
| | | | | | | | | This reverts https://skia-review.googlesource.com/c/skia/+/31140 (Remove SkLightingShader and associated classes) and updates the classes to ToT Change-Id: I3b1df1704cca8907aa00f081a7e93339b65ad4fa Reviewed-on: https://skia-review.googlesource.com/141545 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* renamed samplecode/Nima to samplecode/SampleNimaActorGravatar Ruiqi Mao2018-06-22
| | | | | | | | Bug: skia: Change-Id: I305ca837d5ed35df4b519e7283201f0a0f87b1c3 Reviewed-on: https://skia-review.googlesource.com/136636 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
* added NIMA sample to showcase animationsGravatar Brian Osman2018-06-19
| | | | | | | | | | | improved third_party template to include headers as system headers for non-Windows machines Bug: skia: Change-Id: Id2fa74fc31b49f9b07cc83e7f60477c7ab4f8d83 Reviewed-on: https://skia-review.googlesource.com/135450 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Set bounds correctly for color emoji that need post-cache transfomsGravatar Jim Van Verth2018-06-01
| | | | | | | | | | | | | | | We need to handle the bounds for transformed color emoji the same way we handle the bounds for distance field text. Without this bounds correction, the glyphs were being clipped out. Also adds a sample to test this case. Bug: 848616 Change-Id: I39dedbe2fd19331ad67978c95519f5c9d46f59fc Reviewed-on: https://skia-review.googlesource.com/131523 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com> Auto-Submit: Jim Van Verth <jvanverth@google.com>
* "Modularize" SkSGGravatar Florin Malita2018-05-25
| | | | | | | | | | | * relocate all SkSG-related files under modules/sksg/ * fix various tidbits to make non-sksg builds possible * drop obsolete SampleSGInval.cpp Change-Id: I54e6c5bb1a09f45030fa8d607b3eb3f7cba78957 Reviewed-on: https://skia-review.googlesource.com/130025 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@google.com>
* Resurrect pathfinder in viewer and rename to "bisect"Gravatar Chris Dalton2018-02-20
| | | | | | | | Bug: skia: Change-Id: If8d2f46b8f27fefc3a0f983eb649654e0fb4afcb Reviewed-on: https://skia-review.googlesource.com/108685 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Osman <brianosman@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>
* 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>
* 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>
* 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>
* Revert "Use int when possible to calculate atlas indices in shaders."Gravatar Jim Van Verth2017-11-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 999ec57291dc7cf1d8e3a745627670e6cadc1c12. Reason for revert: Causing issues with NexusPlayer Vulkan. Original change's description: > Use int when possible to calculate atlas indices in shaders. > > 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. > > Bug: skia:7285 > Change-Id: I365532c7cbbcca7c7753af209bef46e05be49e11 > Reviewed-on: https://skia-review.googlesource.com/71181 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I82801a73a2a8067588049b213f010ff25f4014f3 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7285 Reviewed-on: https://skia-review.googlesource.com/74001 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Use int when possible to calculate atlas indices in shaders.Gravatar Jim Van Verth2017-11-20
| | | | | | | | | | | | | | | | 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. Bug: skia:7285 Change-Id: I365532c7cbbcca7c7753af209bef46e05be49e11 Reviewed-on: https://skia-review.googlesource.com/71181 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@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 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 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>
* Coverage counting path rendererGravatar Chris Dalton2017-07-14
| | | | | | | | | | | | | | | Initial implementation of a GPU path renderer that draws antialiased paths by counting coverage in an offscreen buffer. Initially disabled until it has had time to soak. Bug: skia: Change-Id: I003d8cfdf8dc62641581b5ea2dc4f0aa00108df6 Reviewed-on: https://skia-review.googlesource.com/21541 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* remove unneeded code for index8 imagseGravatar Mike Reed2017-07-03
| | | | | | | | Bug: skia:6828 Change-Id: I039d6bc35a1ed93ce747247f32fe4e9d5b09da0c Reviewed-on: https://skia-review.googlesource.com/21400 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Add tonal color support for shadows.Gravatar Jim Van Verth2017-06-09
| | | | | | | | Bug: skia: Change-Id: Ib9bd9083da1d8a9fa90ae7c710386e6903541fd5 Reviewed-on: https://skia-review.googlesource.com/18148 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Remove support in GPU backend for distance vector field.Gravatar Brian Salomon2017-06-02
| | | | | | | | | Also, remvoes SkNormalBevelSource as this was the last use case for the distance vector field. Change-Id: Ib0176c78e500e6b5130310934253a75860245812 Reviewed-on: https://skia-review.googlesource.com/18482 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add Material Design shadow reference sampleGravatar Jim Van Verth2017-05-23
| | | | | | | Change-Id: I889a3f508407178c457f675c321880d869caf9ea Reviewed-on: https://skia-review.googlesource.com/17717 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add ShadowUtils sample.Gravatar Jim Van Verth2017-05-04
| | | | | | | | | Also enables mouse support in Viewer. Change-Id: Iaed08d42a64f591f0cd9b24684b3aee43404ed94 Reviewed-on: https://skia-review.googlesource.com/15313 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove EXPERIMENTAL_SHADOWING, Part 1Gravatar Jim Van Verth2017-05-02
| | | | | | | | | Bug: skia:6557 Change-Id: I6482d74be7b360c93141a73dd80c67854530c7a1 Reviewed-on: https://skia-review.googlesource.com/15101 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add a simple tool for isolating a path from an SKPGravatar csmartdalton2017-03-27
| | | | | | | | | BUG=skia: Change-Id: I5ca9bbd43919e3f65ea940847c68f85cc78dfeda Reviewed-on: https://skia-review.googlesource.com/10130 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Add animated text samplesGravatar csmartdalton2017-02-13
| | | | | | | | | BUG=skia: Change-Id: I0b0a00a0d5c5790a1fc963458bc90c968830afd8 Reviewed-on: https://skia-review.googlesource.com/8361 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Create .gni files for samples, tests, gms, and benches.Gravatar Mike Klein2016-10-27
Calling Python to find all these files is convenient, but error-prone. It's easy to forget to call GN again when adding a file. Each of these calls to Python also adds ~50ms to the run time of gn gen, which is small but adds up. On my desktop, gn gen drops from 600ms to 150ms, noticeably faster. This leaves one call to find.py for generating skia.h for fiddle. We're not quite sure how to automate that process to happen entirely inside the :skia.h action while maintaining correct dependencies, so I'm leaving it for now. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4036 Change-Id: Ib9d355b97900f29afebc65311ceef50537e46dda Reviewed-on: https://skia-review.googlesource.com/4036 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>