Commit Graph

70 Commits

Author SHA1 Message Date
Robert Phillips
06273bcb8a Prepare headers for making all ops V1-only
Basically, ensure all the headers about to become V1-only only appear in contexts that are currently or will soon be V1-only.

This is almost all fallout from retracting some of the moving headers from other headers i.e.:

GrMeshDrawOp.h from GrOpFlushState.h
GrDrawOp.h from GrOpsRenderPass.h
GrDrawOp.h from GrOpsTask.h
GrSimpleMeshDrawOpHelper.h from GrTessellationShader.h


Bug: skia:11837
Change-Id: I939f5c82c3042e9ab00571b5796ab82dbe968085
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438677
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-08-12 15:09:11 +00:00
Robert Phillips
024668cf7f Rename gn options to skgpu_v1 and skgpu_v2
Bug: skia:11837
Change-Id: Ie9221d2cd8e42bebb6a8a9a8ef51ba4a488ce6ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/424036
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-07-01 17:09:33 +00:00
Robert Phillips
3674f589ee Make GrPathRenderer and all derived class be OGA-only
Bug: skia:11837
Change-Id: I92aacf8b412d0158036a5f27aa767590e426bd5c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417657
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-06-16 17:09:37 +00:00
Mike Reed
ec87dc1b76 Just expose factories for patheffects
bug: skia:11957
Change-Id: If2983fcd1b520a7ae77650d7e5ab226af9db52e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/410782
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2021-05-20 23:01:45 +00:00
Chris Dalton
a9f759d022 Rewrite the path tessellation sample
Use the GrPathTessellators directly instead of going through
GrPathStencilFillOp. Add keyboard shortcuts to toggle between the
different path tessellators.

Bug: skia:10419
Change-Id: I5d80731d26c9a77fb0eca07a7023c50848e29f7c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409556
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2021-05-18 19:34:24 +00:00
Mike Reed
e58231ae8f Removed unused SkInterpolator
Bug: skia:11852
Change-Id: I7a9eb2e0594bc1bdf6e7ba5355b6f00cc177253f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395476
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-04-13 00:50:11 +00:00
Chris Dalton
9ff7eef906 Rename SampleCCPRGeometry.cpp -> SampleStrokeVerb.cpp
Also removes the CCPR stuff prior to its deletion.

Change-Id: I63db69ed4a66a11a2006c82e403d89c89af153eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/380596
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-03-08 16:37:09 +00:00
Brian Salomon
4878b3e33c Remove Improved Perlin Noise
Is not used by a major client and can be implemented using runtime
effects for users who want this noise.

Bug: skia:10536
Change-Id: Iaa06e6e1406b808c7f8dc0f76621fecf2becabf5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/352057
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-01-11 15:27:26 +00:00
Mike Reed
80dc74b30b Remove obsolete samples (esp. using drawBitmap)
Change-Id: I3808c1889a08c08a6056ca98558aae141d4081e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345172
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-19 16:14:40 +00:00
Jim Van Verth
c819bb16ee Add material shadows sample.
Duplicates one of their elevation references.

Bug: skia:10781
Change-Id: I89b64807baed6742d3c4b0a5712078e01b44e0d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345421
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-12-17 22:33:26 +00:00
Tyler Denniston
189ecd485a Add toy variable-width stroker sample
- Currently supports single-segment paths (lines or quads). Doesn't
  handle joins.
- Cubics are easy to add but not supported yet.
- No effort was made on performance optimization.
- Will likely be relocated eventually into an experimental SkPathEffect.

Change-Id: I35073d1d9dbc03a5423fda3bb20da005964c97d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329256
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-10-26 14:43:03 +00:00
Michael Ludwig
6aaecfb7f7 Update image filter debug samples to use new APIs
For clarity, this renames skif::Mapping::Make to skif::Mapping::DecomposeCTM
to really emphasize when it should be used over just a constructor.

Renames SampleBackdropBounds to SampleFilterBounds since the operations and
coordinate spaces that it visualizes are the same for regular or backdrop
filtering (we just swap the notion of src and dst devices, really).
Technically, this is not quite true yet since regular filtering modifies the
DAG with a matrix transform right now, but that's going away soon (tm).

The "new" SampleFilterBounds example is updated to use the new bounds APIs
that use the coord-space safe types in the skif namespace. It also visualizes
a filter, and simplifies some of the bounds being drawn and reported to
only those most interesting.

The SampleImageFilterDAG has been updated to match the soon-to-be state
of how SkCanvas processes regular image filters for a saveLayer. All
implicit matrix-transform node code is removed. The bounds calculation
code is similarly updated to use the new 'skif' types and functions. To
simplify the visualization of each node, the 'isolated' versions of the
bounds were dropped.

Bug: skia:9282, skia:9283
Change-Id: If2ad2c302e5165ae009bba93cea52bf0566a543a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326718
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-10-14 20:45:41 +00:00
Mike Klein
5c612ade3b create a sample to demonstrate a timing attack
This sample attempts to re-create an image's alpha channel by drawing it
one pixel at a time and timing how long each pixel takes to draw.

The "abc" text should appear twice normally, and the third and fourth
versions are reconstructed from timing, one by timing 1:1 pixel draws,
the other by timing 1x1:1024x1024 upscale into an offscreen.  It's not
meant to be an exact reconstruction, but you can easily see the shapes,
particularly at -O0, -O1, and -Os.  Auto-vectorization from -O2/-O3 do
a good amount to cover up the problem.

The legacy CPU backend is the main place to look.  I haven't been able
to reconstruct any images using SkRasterPipelineBlitter or SkVMBlitter,
and while on the GPU I do see non-random patterns in the timing, it
appears to be the same single pattern across devices, OSes, GPUs, GPU
APIs and content... I assume it's something like our resource caching
policy.

This can't really be a GM, given how it draws non-deterministically.

Bug: chromium:1088224
Change-Id: I2ec79c8dd407ecb104fd9bf0c8039cb6dd1fe436
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313466
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-08-28 16:17:39 +00:00
Mike Reed
8a8be22597 audio player (for mac)
Change-Id: I491df748d22dfa566000c265a61f62f81755e5a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309792
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-13 15:09:32 +00:00
Tyler Denniston
324578b553 Add toy stroker sample
I figure we can use this as an area for prototyping new/different
stroker ideas.

Currently the sample does line segments with butt caps. Miter joins
aren't correct, as it's not adding the inner loop geometry that
SkPathStroker does.  On the sample slide, any red pixels are ones that
Skia filled but the toy stroker didn't.

Change-Id: Iea5eb320d88dd1dc5c60fbb2a997f56eec4f4f1f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303588
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-07-21 20:04:58 +00:00
Chris Dalton
392fa03a1b Add an interactive sample that fits cubics to circular arcs
Fits a cubic to an arc on the unit circle using the following
constraints:

  1) The endpoints and tangent directions at the endpoints must match
     the arc.
  2) The cubic must be symmetric (length(p1 - p0) == length(p3 - p2)).
  3) The height of the cubic must match the height of the arc.

Using the above constraints, we arrive at the following formula for the
control length (c) (i.e., lengths of (p1 - p0) and (p3 - p2)):

  d = x0*x1 + y0*y1
  c = (sqrt(1 + d) * kM + kA) * rsqrt(1 - d)

(Where x0,y0,x1,y1 are the endpoints, kM = -4/3, and kA = 4/3 * sqrt(2).)

The sample also comes with a root finder that finds the max error value
of the curve, which ends up serving as a semi-formal proof that:

  1) Max error always occurs at T=0.21132486540519, regardless of
     endpoints.
  2) Error is reduced by exactly 64x each time we halve the arc angle

Change-Id: I29ad60dda06743d79f71275c38ffdd97261159ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295303
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-06-09 23:04:03 +00:00
Brian Salomon
2eb7b57d14 Remove unused GrTextureDomain
Bug: skia:10139

Change-Id: I20cd95fcf5f11832366c32e48ed4d442c82b0719
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284082
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-04-21 18:51:24 +00:00
Mike Klein
96f6401789 harmonize rewrite-includes and gn-format checks
The CheckGeneratedFiles bot only required rewriting
.gn files, while the presubmit wants both .gn and .gni files.

It also appears that the #includes rewrite script runs on
both the presubmit and CheckGeneratedFiles bots.

These presubmits run on the CQ before landing right?
If so, no need for them in the CheckGeneratedFIles bot at all.

And of course, format .gni files.

Change-Id: Icd4526d62f85088862ad93566cc9ace11dc3e33f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281505
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-03 17:00:54 +00:00
Mike Reed
853c15cdaa remove unused SkLightingShader
Change-Id: I60a3569b47b599b710c0f3a9522241748f15360d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280409
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-30 20:55:34 +00:00
Chris Dalton
2b5989005c Bootstrap a very simple viewer implementation in CanvasKit
Adds a "viewer" option to the build system that brings in tooling code
and sample code. Adds a very simple "MakeSlide" binding that knows
how to create the WavyPathText sample slide. Adds viewer.html with
code to animate viewer slides.

This can hopefully be the starting point for future work on bringing
viewer to CanvasKit.

Change-Id: Ia26e08726384b40b3f544fe8254f430dc9db08db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278892
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-25 17:31:56 +00:00
Mike Reed
69ace2a0ad sample3d
Change-Id: Idae6792f0ed1150c1cd167690403c7b97795e5ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263817
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-11 21:23:27 +00:00
Chris Dalton
b832ce61ee Add a path renderer that uses GPU tessellation
Implements a simple first pass for a path renderer that uses the
classic Red Book "stencil then cover" method, and linearizes curves
with GPU tessellation shaders.

The new path renderer is disabled by default, and can only be enabled
in the viewer UI or by passing the "--pr gtess" flag.

Change-Id: Ic9354952e93c8b108577961760b4f0daa82d35aa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261715
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-01-07 20:00:22 +00:00
Michael Ludwig
6d1c0d4196 Avoid use of SkMatrixImageFilter to handle CTM for backdrop filtering
The DrawDeviceWithFilter function used to rely on SkImageFilter's
applyCTMForBackdrop, which would create a new DAG and use an
SkMatrixImageFilter node to account for the transformation. However,
that filter is really meant to perform a transformation prior to the
CTM matrix. Abusing matrix math to instead have it map the backdrop
contents back into the CTM local space grossly inflated the size of the
temporary images needed when under many perspective transforms.

This CL instead takes over control of the CTM decomposition and draws
the backdrop (src) content into a temporary layer directly, and then
feeds that through the image filtering. The code is somewhat cumbersome
to follow because of the combination of coordinate spaces and need to
make everything relative to the top left corner of the images.

When the rest of my image filter refactor is more underway, I believe that
a lot of the coordinate space math and image origin accounting will
be much cleaner, but the overall backdrop filtering strategy would remain
similar to this new implementation.

Bug: skia:9074
Change-Id: Ibd2995e81d2b308c74b2d298da5e38daa74c8677
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239108
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-09-05 16:35:18 +00:00
Jim Van Verth
220988189b Add adjustable max size for Metal dynamic allocation ring buffer.
Maximum ring buffer size is based on the maxBufferLength of
the system. Also includes a sample for testing upload pressure.

Bug: skia:8243
Change-Id: I36863b725ba9cbcb02d575b2ab9695d186fcd529
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232759
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-08-07 15:59:42 +00:00
Mike Reed
9dc0b9e2f8 remove code now that loopers are dead (w.r.t. canvas and paint)
We can't remove the loopers themselves, as they are still used
by android and chrome (they just don't ever pass them to skia).

Eventually each of those clients will resolve this, but for now
we just keep the classes (and tests) in skia.

Bug: skia:4783
Change-Id: I5f507e6bb82280f2bc7c0b21eebe59c287aa9265
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230579
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-07-30 12:49:28 +00:00
Michael Ludwig
43c6da2a15 First pass at ImageFilter DAG visualizer sample
Change-Id: I04493af0a6ce1425c4acf68365135722dd3c218b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227857
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-07-17 20:59:37 +00:00
Hal Canary
a1e88e7fb3 Sample/Lines remove boring sample
Change-Id: I8d266641d283af298a5d44b2889d4fdd4173aeee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225722
Auto-Submit: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-07-08 19:09:43 +00:00
Hal Canary
8010c17dc1 SamplePdfFileViewer: delete dead code
Change-Id: I4ba5f22e4370665699546c82f0948a14f9396526
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225543
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-07-03 20:15:44 +00:00
Ben Wagner
2b4dcd381c Remove duplicate simple samples, make one a gm.
SampleBigBlur is super simple and now covered by gms and AnimBlur
sample.

SampleBigGradient now has a gm shallow_gradient_linear.

SampleConcavePaths has a more complete gm concavepaths.

SamplePoints now has an almost exact gm.

RasterAllocatorSample is made into a gm so that it will be run by d. It
appears to be the only test of SkRasterHandleAllocator, so it should
probably run.

Change-Id: Iad7b99d0f92898fc4b2fdccc5aae35d0277f2fff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/219400
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-06-07 01:39:32 +00:00
Brian Osman
c6568afa0b Remove Nima from DEPS, experiments, Viewer, etc.
Change-Id: Ide69d3c9f0f02e886bd0d52723d425a548edd2e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214187
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-05-16 17:02:11 +00:00
Michael Ludwig
e6266a2d16 Handle arbitrary and degenerate quadrilaterals in GrQuadPerEdgeAA
Updates the handling of perspective quads to calculate the correct,
degenerate-safe projected quad and then derive from that the proper
perspective quad.

In 2D, updated to determine if the optimized outset/inset procedure
is valid, and if not goes through a more robust procedure that is
based on line equation intersections. In particular, the degenerate
inset/outset approach is used when the quad has a zero-length edge,
if insetting/outsetting normally would create a self-intersecting shape,
or if near parallel edge angles would create numerical instabilities.

Performance testing by forcing all rectangle draws through the degenerate
code path suggests that it is about 10% slower than the optimal approach,
at least on my workstation...

Bug: skia:
Change-Id: I2973da8d97949eacebb09a1b27c334d62c1c948e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/194008
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-03-11 20:04:03 +00:00
Ben Wagner
7465943b1e Remove fuzz samples.
We now have a real fuzzer, and these samples only run on local dev
machine anyway, so their current utility is quite low since they don't
demonstrate any specific behavior.

Bug: skia:8259
Change-Id: If44a0eaa161b1d7688dd3de6431414a84b7bd6c6
Reviewed-on: https://skia-review.googlesource.com/c/194862
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-02-25 16:55:26 +00:00
Florin Malita
f2965060c3 add mixer colorfilter
BUG=skia:

Change-Id: Icbee96056b17c5396a9d3783055ddd0b7d4fd3ff
Reviewed-on: https://skia-review.googlesource.com/c/9514
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-02-15 19:22:33 +00:00
Mike Reed
ec80d901b9 starter sample for playing with SG.
will flesh out more over time.

Bug: skia:
Change-Id: If5eaf0a7c404b9209b93871eb3ac3d74da8c65dd
Reviewed-on: https://skia-review.googlesource.com/c/191003
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-02-12 17:03:40 +00:00
Michael Ludwig
d20cf33472 Add new thin anti-aliasing demo
Bug: skia:
Change-Id: I3c29dee38f6fb43a2d1d5d429193fcf4a719a2cb
Reviewed-on: https://skia-review.googlesource.com/c/186863
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-01-31 14:55:52 +00:00
Mike Reed
023403ba99 hide setTextEncoding
Bug: skia:
Change-Id: Ia9d3acadc1ef8a9b3c175dba501a5324179d27e9
Reviewed-on: https://skia-review.googlesource.com/c/181566
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-07 18:34:55 +00:00
Mike Reed
89126e4550 use drawSimpleText
Bug: skia:
Change-Id: I4aa6190e66478595a409f93a406fd42f19394302
Reviewed-on: https://skia-review.googlesource.com/c/180927
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-03 18:27:23 +00:00
Mike Reed
919191365b use font instead of paint for text
Bug: skia:
Change-Id: I508ecbd6c4dad41f67f5f2ce6da6c0065dacba6c
Reviewed-on: https://skia-review.googlesource.com/c/180365
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-02 17:45:30 +00:00
Mike Reed
212e9060ed don't use drawPosText
Skia can now build if we mark drawPosText as private,
Will hide/remove next (after Chrome CL)

Bug: skia:
Change-Id: I156560b025c119af302545bb5bd60678f7b8e8f7
Reviewed-on: https://skia-review.googlesource.com/c/179985
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2018-12-25 23:07:35 +00:00
Ben Wagner
06602e7b73 Remove FontScalerTest sample.
This sample has had a gm counterpart for a long time now, and is also full
of dead code. It isn't adding anything to our understanding of Skia, so
remove it.

Change-Id: I6f3b0ff454b603815d66480ec11c8426717578be
Reviewed-on: https://skia-review.googlesource.com/c/173764
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
2018-11-30 21:30:34 +00:00
Kevin Lubick
d969932474 Refactor Nima code
There were two copies of a Nima "player" and this moves them out of
samplecode/ and viewer/ to experimental/ where it is a bit more
accessible (e.g. for WebAssembly).

Bug: skia:
Change-Id: I05419a352f0d13d16b462a374578107513eb1243
Reviewed-on: https://skia-review.googlesource.com/c/166441
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-10-30 19:32:52 +00:00
Brian Osman
82e0e444a5 Remove a largue quantity of 4444 and/or dithering code
Most of this was entirely unused. Some was only used by the dithering
sample (which is now also deleted).

Bug: skia:
Change-Id: Ibafe61e9b19cae8738fd8df2c94dca182722e2e6
Reviewed-on: https://skia-review.googlesource.com/155921
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-09-21 00:50:06 +00:00
Cary Clark
db16001d6a add circles to stroked cubics with cusps
Add a circle at the cusp to match Adobe Illustrator,
Microsoft Edge, and our own CCPR implementation.

R=reed@google.com,csmartdalton@google.com
Bug: skia:5623
Change-Id: Ia46c910643f373e50c4b30303fcac5f79d77be62
Reviewed-on: https://skia-review.googlesource.com/150370
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Mike Reed <reed@google.com>
2018-08-31 19:55:44 +00:00
Mike Reed
a62d036586 textonpath no longer in canvas
Prev behavior available via utils SkDrawTextOnPath

Bug: skia:7554
Change-Id: I3d71963c632cc947e418757bb83cdc18ec3b184e
Reviewed-on: https://skia-review.googlesource.com/150123
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-08-29 14:04:45 +00:00
Ben Wagner
b2c4ea6219 Move Views into Sample and Viewer.
What is left of the SkView system is used only by samples or viewer.
As a result, move it out of the Skia source tree and re-organize so it
is a bit easier to understand and use more shared code.

Move samplecode/ClockFaceView.cpp to samplecode/SampleTextEffects.cpp,
sice that's what's actually in it.

Move SkAnimTimer.h to tools/timer, since it's actually shared between gm
and samples.

Change-Id: I55dafd94c64e4f930ddbd19168e0f812af86c455
Reviewed-on: https://skia-review.googlesource.com/146161
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-08-09 15:25:32 +00:00
Robert Phillips
a8cdbd7431 Restore SkLightingShader and associated classes
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>
2018-07-17 17:24:50 +00:00
Ruiqi Mao
c5c3df6643 renamed samplecode/Nima to samplecode/SampleNimaActor
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>
2018-06-22 20:36:17 +00:00
Brian Osman
c069a57301 added NIMA sample to showcase animations
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>
2018-06-19 20:30:28 +00:00
Jim Van Verth
70276915db Set bounds correctly for color emoji that need post-cache transfoms
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>
2018-06-01 18:31:47 +00:00
Florin Malita
3b526b05d6 "Modularize" SkSG
* 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>
2018-05-25 17:11:52 +00:00