- Once we add all the missing intrinsics, the locally defined ones
can go away.
- Having the default interpreter vector width match the raster pipeline
is a huge perf win.
Change-Id: I482e409e57791b78a0e6fb15929ae77eb0e76bf3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265600
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
transpose(inverse(localToWorld)) does not seem to be working, so skipping
it for now.
Change-Id: I7dd5a01020f590dec02b36f54752092643acf3d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265401
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Now that "point" is local (viewer may have modified it for zooming or panning),
it no longer makes sense to check for out-of-bounds.
Change-Id: I8881f8b27be96973cb7687b25d93a0de5a22f5db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265218
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
- misc fixes to utilities
- hit-testing for 3D scenes (simple version)
Had to manually inform the shader of the local-to-world matrix.
Should try making that automatic in the future.
Note: due to bug in interpreter, point-light sample can't run in raster
(yet).
Change-Id: I7a30b7676ea6cd7eb264373dd2507133c901d85e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264999
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
3 new getters:
- localToWorld
- localToCamera
- localToDevice (same as total-matrix)
The current tracking minimizes overhead, by using a computed inverse to
produce the localToWorld/Camera. This can be change as needed in the
future (more precision, but more memory/overhead), but for now is
sufficient to try out the new APIs.
Change-Id: I85440318f36dca935124b782e110fe9c0152ae7a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264648
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Propose a standard way to talk about the camera (etc) in SkCanvas:
- client provides 3 matrices: viewport, projection, camera
- canvas->concat(viewport * projection * camera * invert(viewport)
- camera and projection are taken straight from the textbook for 3D
- "viewport" means a matrix that transforms +-1 square about the origin
to the clients working canvas. A simple way to describe it is:
"specify the area-of-interest with a rectangle and z_scale"
Expose the ctm as a 44 from canvas for now. Likely we will add these
3 new matrices to canvas, and each may have a getter.
Bug: skia:
Change-Id: I6fa79c56956e060c17569848a81e13c13cb0981a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264221
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Chrome layout test suppression has landed.
This reverts commit 67d0f3fd72.
Change-Id: I5b9963b306f29a41cf36e1802e7eebda010f186d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264016
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit 3723fb7e85.
Fix: don't call the inherited methods on canvas
bug: skia: 9768
Change-Id: Ifb913bd30452ba8389399f709d40c7b58d6157d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263776
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This reverts commit a92320d4e6.
Reason for revert: Blocking Chrome roll.
Original change's description:
> Remove GrPaint::addColorTextureProcessor
>
> Just make the effect and then add it.
>
> Makes it easier to make changes to GrTextureEffect::Make going forward.
>
> Also add default param for matrix (identity).
>
> Change-Id: I52073f11a0a78b971bb512627198ee1724bfdac7
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263518
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,michaelludwig@google.com
Change-Id: I2618844f5a8f5f1873dd79142caafd8939384e9e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263560
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Just make the effect and then add it.
Makes it easier to make changes to GrTextureEffect::Make going forward.
Also add default param for matrix (identity).
Change-Id: I52073f11a0a78b971bb512627198ee1724bfdac7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263518
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit 1c16b43033.
Reason for revert: Red on tree
Original change's description:
> Move makeDeferredRenderTargetContext calls to factory on RTC.
>
> Change-Id: Iaa8f5829d9f8650ff27a60f75fb2216f016ab85e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262058
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=egdaniel@google.com,bsalomon@google.com
Change-Id: I9e3c9d13c66b5437c87ad7136d283fa4ac81df1f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263019
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
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>
This reverts commit d7436a37ff.
Restores old file order in gpu.gni until Mac/Metal issue can be
debugged.
Change-Id: I6e2ee3bdc3b39270aeaaf28b9613e4ac49d38e1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262801
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit 90673ec665.
Reason for revert: Causes metal bot failures
Original change's description:
> Rename GrSimpleTextureEffect->GrTextureEffect
>
> It will become less simple.
>
> Change-Id: I409d0faba386597ae05738273d5ff773501eb358
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262383
> Auto-Submit: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=bsalomon@google.com,brianosman@google.com
Change-Id: Id25c9cde3c2048149409745f163e42c588de70c1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262514
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
It will become less simple.
Change-Id: I409d0faba386597ae05738273d5ff773501eb358
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262383
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Copies the function wholesale so it can be reused by other tooling
code.
Change-Id: I8b8f8ceb7dabb12e9e67b8339735f618dc2ccf2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262348
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
longest line and so on.
Change-Id: I497022269ad38e3cf6a1920f67b1d9217aa6d805
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260778
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
the ctm to the device.
This catches cases where the matrix bottom-row might look like
[ 0, 0, not_one ]
That would get categorized as perspective, but in reality that matrix
behaves like affine. If we can detect that pattern, and scale the entire
matrix by 1/not_one, we don't change its behavior, but it will now be
categorized as affine (seen as simpler/faster).
bug: skia:9698
Change-Id: Ib77b647c1d32f73538b1c0d8e9e49ec533610b3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260776
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
more UI for halfplanes in SampleClip
bug: skia:9698
Change-Id: I9463fe9860fa482ef05fc2113114e61524c38fc0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260500
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Will work on clipping in follow-up CL
Change-Id: I1e4cc485555a435c740a4e5b50445f21e9ec20c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260404
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Change-Id: I7c672ff6b8eb95ec8c1123a5bfdb202e1644f494
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259281
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
From here we can start trying it out for real
- skottie could call it directly
- SkDraw could call it for the raster-backend
Change-Id: I703838241d67c539afd3d3e31d0ddf1c66645799
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258001
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Plan is to next move the clipper into utils / SkCanvas itself
Change-Id: Ia79c5bc2750a3a2719f901d255890a8c43ef1b42
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257916
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Bug: skia:9546
Change-Id: Ib91880e09ae6373bc133d684aa7510c67681ec1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257629
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
We need a means of creating GrProgramDescs pre-flush w/o needing to know the specific backend in play.
Bug: skia:9455
Change-Id: Iac14ff8eda262ee6d2ad666c5d2e27e7a375c210
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256698
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit 3e7af41224.
Change-Id: Id4f66b3956f4bdbe690db20fc478b7365ee89717
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256676
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
To facilitate this, the GrQuadBuffer::Iter's local GrQuads that are
modified on each next() are now allowed to be operated on for the AA
inset/outsetting. Previously this required additional GrQuads on the
stack to hold the results, and additional guards for accessing localQuad()
when the entry didn't have actual coords.
With this change, a 2D op should have its device and src GrQuads' Ws
set to 1 once, and then they are completely ignored for all iteration
and tessellation, without any more redundant initialization. In all
likelihood we won't see the needle move on powerful platforms, but may
help lower end devices.
Change-Id: I457205786766403a760918e779d36ba056d69cde
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256097
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This is a reland of 997b37fdb9
Layout tests have been suppressed.
Original change's description:
> Revert "Revert "Make FP optimizations helpers use SkAlphaType not GrColorType""
>
> This reverts commit 078e8faa26.
>
> Change-Id: I67b2970584db5a1afbf9928b77c5444947ef71a3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255897
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I6db4cff8b71ef1f29ac47f7729b9514d009f730a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256225
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I3c8bf48dda061aa9d318b9f81f22608fdd68fcbd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255786
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This reverts commit 1792b19485.
Reason for revert: need to update legacy_convexity, still used by google3
Original change's description:
> Revert "Revert "Use flat version of path-direction enum""
>
> This reverts commit 0dacc6b7d3.
>
> Change-Id: Ie103e9f36b07e4ee256a3688a4decf3a6dd74314
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255832
> Auto-Submit: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
TBR=reed@google.com
Change-Id: I0ecea0eb8a237298c6b908cc4bfd1cacdfc5b900
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255976
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This reverts commit 0dacc6b7d3.
Change-Id: Ie103e9f36b07e4ee256a3688a4decf3a6dd74314
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255832
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This reverts commit e0fbe94351.
Reason for revert: need to add guard flag to flutter
Original change's description:
> Use flat version of path-direction enum
>
> Bug: skia:9663
> Change-Id: I00077d9f2b14b3e983e6a46ef6f560cabdb1678d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242557
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
TBR=fmalita@chromium.org,reed@google.com
Change-Id: If47173d9b203b2d3a175af290a15d986accb4703
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9663
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255831
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Change-Id: I204f04596809e1e33f20b67b454cdd0e1f269630
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255303
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This allows us to clip a path against a half-plane (an arbitrary
diagonal line), in an effort to handle perspective correctly with
the near-plane.
Change-Id: I2082a750acf858340e4500ad46cf581472cefc6b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253996
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Remove the RGB/YUV helpers (use SkYUVMath instead), along with the
unused get20/set20.
Change-Id: Id83467a1b7f33657869e0a933af75387a4e36a88
Bug: skia:9543
Change-Id: Id83467a1b7f33657869e0a933af75387a4e36a88
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252188
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
This CL doesn't use the new VertexSpec member variable but should clarify the path forward (i.e., we will determine the index buffer option at characterize time and enforce that decision at onPrepare time for all the meshes).
This also refactors the GrTextureOp::characterize call.
Change-Id: I7010385abf5a462c12fd47e314aad893bca85fb9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251002
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This change also allows for the remove of GrPixelConfigIsOpaque function.
Bug: skia:6718
Change-Id: I7e7b70f02d911eda67640d648fb6348091e0f55d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248698
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Fixed some bugs for flutter tests
Change-Id: I43f4b4b185152a8d642127370da5f80fb96f1e9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239444
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Since we want to collect shader information early, this attempts to make clear that numSamples, origin and outputSwizzle can all be obtained from the target renderTargetProxy.
Change-Id: I42e0fd79e2163f17673ccdd344a31fbaadac5f53
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/246298
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is a reland of 6fc04f88a8
Original change's description:
> Reland "SkSurface asynchronous read APIs allow client to extend pixel lifetime"
>
> This is a reland of ce240cc6fd
>
> Original change's description:
> > SkSurface asynchronous read APIs allow client to extend pixel lifetime
> >
> > Previously the pixel data passed to the client was only valid during
> > the client's callback. This meant if the client wanted to defer
> > processing of the data a copy was necessary.
> >
> > Now we pass an object to the callback and the pixel lifetime is tied
> > to the lifetime of that object.
> >
> > The object may be holding a GPU transfer buffer mapped. We don't assume
> > that the object will be released on the direct GrContext thread. So
> > when the object is destroyed it posts a message to a new type,
> > GrClientMappedBufferManager, hanging off the direct context. The direct
> > context will periodically check for messages and unmap and then unref
> > buffers so that they can be reused. Currently this is done in
> > GrContext::performDeferredCleanup() and GrDrawingManager::flush().
> >
> > The old API is kept around for backwards compatibility but it is
> > reimplemented as a bridge on top of the new mechanism.
> >
> > Also a utility function to SkImageInfo is added to directly make a new
> > info with a specified dimensions rather than passing the width and
> > height separately to makeWH().
> >
> > Bug: chromium:973403
> > Bug: skia:8962
> >
> > Change-Id: Id5cf04235376170142a48e90d3ecd13fd021a2a6
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245457
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
>
> Bug: chromium:973403, skia:8962
> Change-Id: I5cecd36276c8b6dc942cf549c7095db2df88530c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245678
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: chromium:973403, skia:8962
Change-Id: Ie584c1c3ef8021c976f71b708e53871c693cc450
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/246057
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit 6fc04f88a8.
Reason for revert: Chrome roll failure suspect because of:
* https://chromium-review.googlesource.com/c/chromium/src/+/1837131 (22 commits)
* https://chromium-review.googlesource.com/c/chromium/src/+/1837214 (24 commits)
Original change's description:
> Reland "SkSurface asynchronous read APIs allow client to extend pixel lifetime"
>
> This is a reland of ce240cc6fd
>
> Original change's description:
> > SkSurface asynchronous read APIs allow client to extend pixel lifetime
> >
> > Previously the pixel data passed to the client was only valid during
> > the client's callback. This meant if the client wanted to defer
> > processing of the data a copy was necessary.
> >
> > Now we pass an object to the callback and the pixel lifetime is tied
> > to the lifetime of that object.
> >
> > The object may be holding a GPU transfer buffer mapped. We don't assume
> > that the object will be released on the direct GrContext thread. So
> > when the object is destroyed it posts a message to a new type,
> > GrClientMappedBufferManager, hanging off the direct context. The direct
> > context will periodically check for messages and unmap and then unref
> > buffers so that they can be reused. Currently this is done in
> > GrContext::performDeferredCleanup() and GrDrawingManager::flush().
> >
> > The old API is kept around for backwards compatibility but it is
> > reimplemented as a bridge on top of the new mechanism.
> >
> > Also a utility function to SkImageInfo is added to directly make a new
> > info with a specified dimensions rather than passing the width and
> > height separately to makeWH().
> >
> > Bug: chromium:973403
> > Bug: skia:8962
> >
> > Change-Id: Id5cf04235376170142a48e90d3ecd13fd021a2a6
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245457
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
>
> Bug: chromium:973403, skia:8962
> Change-Id: I5cecd36276c8b6dc942cf549c7095db2df88530c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245678
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,brianosman@google.com
Change-Id: I9e01d1b82fb399b94292441d91da51176bb161d9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:973403, skia:8962
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245956
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
This is a reland of ce240cc6fd
Original change's description:
> SkSurface asynchronous read APIs allow client to extend pixel lifetime
>
> Previously the pixel data passed to the client was only valid during
> the client's callback. This meant if the client wanted to defer
> processing of the data a copy was necessary.
>
> Now we pass an object to the callback and the pixel lifetime is tied
> to the lifetime of that object.
>
> The object may be holding a GPU transfer buffer mapped. We don't assume
> that the object will be released on the direct GrContext thread. So
> when the object is destroyed it posts a message to a new type,
> GrClientMappedBufferManager, hanging off the direct context. The direct
> context will periodically check for messages and unmap and then unref
> buffers so that they can be reused. Currently this is done in
> GrContext::performDeferredCleanup() and GrDrawingManager::flush().
>
> The old API is kept around for backwards compatibility but it is
> reimplemented as a bridge on top of the new mechanism.
>
> Also a utility function to SkImageInfo is added to directly make a new
> info with a specified dimensions rather than passing the width and
> height separately to makeWH().
>
> Bug: chromium:973403
> Bug: skia:8962
>
> Change-Id: Id5cf04235376170142a48e90d3ecd13fd021a2a6
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245457
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: chromium:973403, skia:8962
Change-Id: I5cecd36276c8b6dc942cf549c7095db2df88530c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245678
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit ce240cc6fd.
Reason for revert: crashing in chrome unit test, abandoned context related?
Original change's description:
> SkSurface asynchronous read APIs allow client to extend pixel lifetime
>
> Previously the pixel data passed to the client was only valid during
> the client's callback. This meant if the client wanted to defer
> processing of the data a copy was necessary.
>
> Now we pass an object to the callback and the pixel lifetime is tied
> to the lifetime of that object.
>
> The object may be holding a GPU transfer buffer mapped. We don't assume
> that the object will be released on the direct GrContext thread. So
> when the object is destroyed it posts a message to a new type,
> GrClientMappedBufferManager, hanging off the direct context. The direct
> context will periodically check for messages and unmap and then unref
> buffers so that they can be reused. Currently this is done in
> GrContext::performDeferredCleanup() and GrDrawingManager::flush().
>
> The old API is kept around for backwards compatibility but it is
> reimplemented as a bridge on top of the new mechanism.
>
> Also a utility function to SkImageInfo is added to directly make a new
> info with a specified dimensions rather than passing the width and
> height separately to makeWH().
>
> Bug: chromium:973403
> Bug: skia:8962
>
> Change-Id: Id5cf04235376170142a48e90d3ecd13fd021a2a6
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245457
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,brianosman@google.com
Change-Id: Ic14cf07a7629b167c9f34a651aa87a0326e74207
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:973403, skia:8962
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245721
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
The intent is to allow the creation of a MakeFontMgrRunIterator which
uses the passed font's typeface as the primary typeface, but uses a
given family name and style as for the request for fallback fonts. This
allows the user to provide the actual request for the primary typeface
as opposed to making a request based on the resolved primary typeface
(which may not be the right thing to do).
To support this, the selection of language for fallback is also added.
Since this information is already in the language iterator, this change
makes the font iterator the lowest priority iterator for consume,
allowing the font iterator to rely on the current value of the language
iterator to provide the language.
In order to allow these changes to be exercised, this also adds a few
generic 'Make' methods for bidi and script. These new methods will use
the best available implementation. These are needed since the most
capable implementations may not always be available (such as on our
testing ios builds).
Change-Id: I1b8d9c9007058adcb2a26e0581d903b835a6118f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245460
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Previously the pixel data passed to the client was only valid during
the client's callback. This meant if the client wanted to defer
processing of the data a copy was necessary.
Now we pass an object to the callback and the pixel lifetime is tied
to the lifetime of that object.
The object may be holding a GPU transfer buffer mapped. We don't assume
that the object will be released on the direct GrContext thread. So
when the object is destroyed it posts a message to a new type,
GrClientMappedBufferManager, hanging off the direct context. The direct
context will periodically check for messages and unmap and then unref
buffers so that they can be reused. Currently this is done in
GrContext::performDeferredCleanup() and GrDrawingManager::flush().
The old API is kept around for backwards compatibility but it is
reimplemented as a bridge on top of the new mechanism.
Also a utility function to SkImageInfo is added to directly make a new
info with a specified dimensions rather than passing the width and
height separately to makeWH().
Bug: chromium:973403
Bug: skia:8962
Change-Id: Id5cf04235376170142a48e90d3ecd13fd021a2a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245457
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Sets UIPinchGestureRecognizer and UISwipeGestureRecognizers and
passes the result down to the sk_app::Window. To simplify detection,
swipes take precedence over pans, and pans require a single touch.
This is less flexible for the app, but in most cases I think is
what we want.
Bug: skia:8737
Change-Id: Ib031b6ad465d3a353da29d7e0b48a666d4ff8b9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239776
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This addresses reviewer comments from https://skia-review.googlesource.com/c/skia/+/239108 that were postponed to get the first CL landed ASAP.
Additionally, removes the now unnecessary applyCTMForBackdrop() function.
Bug: skia:9074
Change-Id: Ibc3ac4a4edd7e5546fa83145346869a68efc33f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239440
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
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>
Change-Id: Icd331e8946d80652750b8b6ea0db65f5f676ac3e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238058
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Also don't specify redundant width/height to SkGpuDevice.
Change-Id: I389df5c4b073c2c05632ba6b7c95b02a22dfaf98
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235824
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This Sample is asserting on resource loading in the constructor. Delay
this to onOnceBeforeDraw to improve startup and debugging.
Change-Id: Ic341d5599a95b682bcb018b1a40b8789d6f8b51f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233419
Auto-Submit: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
That makes layout phase 10 times faster (since the shaping takes 90% of it).
LRU cache is attached to the FontCollection object and has the same life time.
Currently it has hardcoded limit on the entry numbers (128).
One the number reached, the least recently used element is removed from the cache
to free the space for a new one.
Change-Id: I597e334422614e33715d7a9ed13acf7b1f9cd0e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230755
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
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>
Bug: skia:9281
Change-Id: I189dbf652580805641f8c4b9a6587cf15a9049dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231256
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:9280
Change-Id: I03ba9bf1cc952dec77664721fdb3a311f47f7e89
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230884
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
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>
PS2 adds a rewrite for Skia #include <...> to #include "...", letting
them be otherwise rewritten and sorted too. (We do need one exception
for the Vulkan headers, which will otherwise be rewritten to always
point to our own.) I don't think it's particularly important to
favor "" or <>, but picking one keeps things consistent.
PS3 adds a missing SkMutex.h include.
PS4 fixes a terrible readability problem.
Change-Id: Id9fe752727ef30e802b1daf755ee2ed15e267577
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229742
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Adding cache
Caching shaped results
Base+Index for referencing arrays
The very first and naive version of cache
Cache measurement, lines and picture
Added text blob cache for lines
Removed Run* from Cluster
Removed const char* from Cluster and Run
Few minor changes
Change-Id: I444a1defa950aed5999cfa1c3545fd83ccb54ce9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227840
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Adds the option to use a multisampled (or mixed sampled) atlas, and
uses the sample mask and stencil buffer instead of coverage counts.
Bug: skia:
Change-Id: I9fb76d17895ae25208124f6c27e37977ac31b5eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227428
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
While most callers of decomposeScale only depend on the scale factors
that are returned, image filter decomposition depends on the remaining
matrix as well. Hence, the following necessary updates to work with
the new behavior of decomposeScale:
* Update imagefilter DAG sample to reflect prescaling
* Correct embedded matrix in SkApplyCTMToFilter
* Add comment to clipRectBounds() clarifying coordinate spaces and image filters
But, we want to have decomposeScale using preScale() because it then
produces a remainder matrix that can be used as the transform for the
image filter draw, instead of wrapping the image filter in an
SkMatrixImageFilter as currently done by SkApplyCTMToFilter.
Bug: skia:7211
Change-Id: If14570afb4189cebc75f3815e8ccdde05cb074e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228438
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This tweaks the colors of the filterBounds boxes that are drawn.
It switches DAG layout to be left-to-right instead of top-down.
Visualizes node results/bounds in the local filter space instead of
transforming into the final space.
Improves the source content so that the different branches of the filter
DAG have more meaningful differences.
Change-Id: Icca586dcbcc3156e13f9689ee19af9c03a0ed1eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228059
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
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>
- replace virtual with override.
- remove default constructor.
- use default field initializers
- move work from constructor into onOnceBeforeDraw
- mark everything private
- enum { N = 100 }; constants to constexpr
- remove unused variables
Change-Id: I8c7a19bc24fec416a6b88d634ee948d3e842b986
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228056
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Change-Id: If581c8ceeaa76985535cb7b6772742f0011cfe8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227436
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Only used in three somewhat dubious places.
Change-Id: I7ccd1aef41f826d0eb62606751f4d3f0ceda267d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227065
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
gm, slides, and samples no longer need to know about the implementation
details of AnimTimer.
This
virtual bool onAnimate(const AnimTimer&);
becomes this:
virtual bool onAnimate(double /*nanoseconds*/);
which is much easier to reason about.
AnimTimer itself is now part of viewer.
Change-Id: Ib70bf7a0798b1991f25204ae84f70463cdbeb358
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226838
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
config is completely redundant. No caller really cares what the backend
format is.
Change-Id: I93f1feb3ee61db6c21b7915bab3ee3fba5656f92
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225194
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This is largely redundant with GrPixelConfig. However, we intend to
remove GrPixelConfig.
Bug: skia:7580
Change-Id: I03d92303be832711f7821f8a97d36387c9b04a9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222883
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
From now on, sample counts always refer to the number of actual color
samples, and render targets don't have separate color and stencil
sample counts.
If mixed samples support is available when making a
"GrAAType::kCoverage" draw, then an op may attach and use a mixed
sampled stencil buffer internally. But this will all be invisible to
the client.
After this CL, we temporarily won't have a mode to use nvpr with mixed
samples. That will soon be fixed by a follow-on CL that enables nvpr
with mixed samples in the normal "gl" and "gles" configs.
Bug: skia:
Change-Id: I1cb8277f0d2d0d371f24bb9f39cd473ed5c5c83b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221878
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
few minor bug fixes
Change-Id: Ibc60e972480f3503965af873f36001ed233382ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221544
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
In GrRecordingContext I moved the auditTrail onto the heap and only there
when compiling for tests. This allowed us to move a lot of files out of
include private.
Change-Id: Ib76ac211c0c6fd10bacaccf0c5f93f21a59f35d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221344
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
This is a reland of 10ad0b9b01
Original change's description:
> SkParagraph
>
> Change-Id: I0a4be75fd0c18021c201bcc1edfdfad8556edeff
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/192100
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>
Change-Id: I46cf43eae693edf68e45345acd0eb39e04e02bfc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/219863
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
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>
Add MakeWithNoDevice to avoid the threshold of converting to
paths when using MakeCanonicalized.
Change-Id: I73b49dd35ffb2f4fa3b70ba3324bfcb348ca913b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/218960
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
SkStrikeSpecStorage was a temporary name until all uses of
SkStrikeSpec were cleaned up. Do the final rename.
Change-Id: Iaba987ecdfe46ca9eee8d530d5095840cdca300d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/219209
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Also moves GrQuadType to an inner enum of GrQuad as GrQuad::Type.
Renames some of the types for improved clarity (IMO)
Change-Id: I2c91d60374d2b7c414034e9fe0b0113a794bd610
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/216604
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Convert over remaining callsights for strike lookup, and reduce the SkStrikeCache
API.
- one friend decl.
Change-Id: I109a747061030f26ff908472ea55a4424d5c10f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209109
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Change-Id: I864d3c2452f3affdc744bf8b11ed3b3e37d6d922
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/216602
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
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>
... but keep the apis for now
Bug: skia:4872
Bug: skia:9012
Change-Id: I3a9b0c9194be6897c0e59b7edd972b7218168183
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211343
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
Change-Id: Iba2d376fedfa2fd2258bc0d0f50038a426f9d290
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210423
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Current strategy: everything from the top
Things to look at first are the manual changes:
- added tools/rewrite_includes.py
- removed -Idirectives from BUILD.gn
- various compile.sh simplifications
- tweak tools/embed_resources.py
- update gn/find_headers.py to write paths from the top
- update gn/gn_to_bp.py SkUserConfig.h layout
so that #include "include/config/SkUserConfig.h" always
gets the header we want.
No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Change-Id: I099f8a635df7dd0ddd3902459615250ea2c120c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209874
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Bug: skia:8737
Change-Id: Ib825e5f0c9502692cbecc60fbb68d0d1a2bc635f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/208672
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Idea: transition callers to this, so we can later typedef SkColorFilter
and SkShader to the same thing.
Bug: skia:8937
Change-Id: I000c882e11622091aa44c141aa6ddd1216414f46
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206685
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Change-Id: Ied09d28149cdb38ab1b4a4b704c993a726324220
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205488
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This differed from the separate versions in that it snapped to zero.
It was also strictly worse than calling the two separate versions.
Most clients don't need the snapping, so just call the two existing
functions. For clients that need the snapping, call new variants of
each that do snap.
Change-Id: Ia4e09fd9651932fe15caeab1399df7f6281bdc17
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205303
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Currently, gradients are PaintNode subclasses - which limits their
applicability to leaf DAG nodes.
In order to support generalized gradient/shader effects:
* introduce a new Shader base class
* refactor gradients as Shader subclasses
* introduce ShaderPaint (to support current Gradient-as-paint use)
* introduce ShaderEffect (to support future Gradient-as-effect use)
Tangentially:
* rename SkSGPaintNode.h -> SkSGPaint.h
* consolidate sksg::Color into SkSGPaint.h
Change-Id: I94ba949f4504c09cfde4a4f030d927411fdd66a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205263
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Makes separate subclasses for geometry and vertex shaders.
Bug: skia:
Change-Id: Ifced79af3092090a71d03fe252fb4da76738cf08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/204545
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Change-Id: I700b7c0461475062ac66712cc29070f150cf777d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202315
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
sk_tool_utils doesn't really fit the naming convention
the rest of code under tools/ tends to use.
Change-Id: I45326a174101c6eb4b6149e9c742f658f2fd23b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202313
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
- reverse sense of Blend mixer to be (dst, src, mode)
- change pipeline register convention to be (dst, src)
Bug: skia:
Change-Id: I1f1d990001ad941cb8d44e1488c5f14077e181f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201386
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
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>
Previously, we relied on ops to deduce whether a draw would have
hardware coverage modulation as a result mixed samples. This is
problematic because *any* draw can have mixed samples coverage if
there is a multisampled stencil clip. No ops were checking for stencil
clip, and most just said they never used mixed samples.
Now that the only usecase for mixed samples is the stencil buffer,
this CL makes the processorSet automatically deduce mixed samples
coverage from the stencil settings and fsaaType.
Bug: skia:
Change-Id: Ib69b84bc03b12f6efb8e7d6ed721ae1612785315
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197281
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Bug: skia:
Change-Id: I883176c77d57cd58f8a0418b5fe592e300d8fa0a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197900
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
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>
The interface here is not ideal, but there will need to be some build
clean-up before it can be changed.
Change-Id: Ic4d55634405f4c8d9c194e4e6f368287c9669dcd
Reviewed-on: https://skia-review.googlesource.com/c/193036
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
It isn't used anymore.
Change-Id: I4079ff9944aa2483a0cd42130d0e69fb98935731
Reviewed-on: https://skia-review.googlesource.com/c/192820
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
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>
Doing so resulted in a bunch of surprisingly duplicated symbols.
Change-Id: Ie3003122909a3b82470046256de12e27c0b23a05
Reviewed-on: https://skia-review.googlesource.com/c/190305
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
GrBuffer is a base class for GrGpuBuffer and GrCpuBuffer. GrGpuBuffer is a
GrGpuResource and the others are not. This allows GrCpuBuffers to exist
outside of the GrGpuResourceCache.
Also removes flags from GrResourceProvider buffer factory function. The
only flag still in use was kRequireGpuMemory. Now CPU buffers are made
without using GrResourceProvider.
Change-Id: I82670d1316e28fd6331ca36b26c8c4ead33846f9
Reviewed-on: https://skia-review.googlesource.com/c/188823
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Centralize these for my sanity. Most will also be parceled out to other contexts.
Change-Id: If0e7e98bcf66c4d8a3391f9b04e643ccc91af4ad
Reviewed-on: https://skia-review.googlesource.com/c/189488
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Renamed to GrGpuBufferType in anticipation of splitting GrBuffer
into GrGpuBuffer and GrCpuBuffer types.
There were two unused values in the enum that are removed, DrawIndirect
and Texel.
Change-Id: Icb6b3da689adbd8e10495c10fd0470a6ee0120b5
Reviewed-on: https://skia-review.googlesource.com/c/189280
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Mechanical. This makes the priv() accessor the same for all the context types.
Change-Id: I40850eb05a33b8d7cc3eabdd42226d24b2ba58aa
Reviewed-on: https://skia-review.googlesource.com/c/189164
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Now that we're keeping refs on GrBuffers during flush, we shouldn't
need to specify this flag.
Change-Id: Idbe08e84d23690d6c9e94f23f2c4507a2e965aff
Reviewed-on: https://skia-review.googlesource.com/c/188635
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
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>
This begins the process of splitting GrContext into:
GrContext_Base, GrImageContext, GrRecordingContext and GrDirectContext.
Change-Id: I3c43045f2a5549b049e95791d65f74d4e16de36f
Reviewed-on: https://skia-review.googlesource.com/c/186878
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
for f in $(git grep -l drawSimpleText); do
sed -i 's/wSimpleText(\([[:alnum:]]\), strlen(\1), kUTF8_SkTextEncoding,/wString(\1,/g' "$f"
sed -i 's/wSimpleText(\([[:alnum:]]*\)\.c_str(), \1\.size(), kUTF8_SkTextEncoding,/wString(\1,/g' "$f"
done
git checkout @~ include/core/SkCanvas.h samplecode/SampleCusp.cpp
git cl format
Change-Id: Ibc0c3afd30f86465a645fadb26177d61919f57fd
Reviewed-on: https://skia-review.googlesource.com/c/181561
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
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>
Tweak SkShaper to call out for each line, instead of bundling everything
as a text blob.
Change-Id: Ic522f88afcf31cefd873dc8b5cde1ac2e107c64f
Reviewed-on: https://skia-review.googlesource.com/c/176592
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Doing work in the constructor makes it difficult to debug other tests.
Change-Id: I0aabd031ce7caf492cde6e7d32be7586c7f0b9d3
Reviewed-on: https://skia-review.googlesource.com/c/173767
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
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>
GrRenderTargetOpList maintains an array of op chains. When it receives a
new op it tries to add it to an existing chain, working backwards from
the end of the current array. If the op can be added to a chain it
additionally tries to merge the new op with ops already in the chain
before adding it to the tail of the chain.
In forward combining it tries to concatenate chains. If chains can
concatenate it also attempts to merge ops between the two chains.
Now op chaining results reported by Op subclasses must be transitive.
Moreover, if op A is able to merge with B then it must be the case that
any op that can chain with A will either merge or chain with any op that
can chain to B.
Bug: skia:8491
Change-Id: Ib6a2a669acd4257134a37d271289b8b3f247cd3f
Reviewed-on: https://skia-review.googlesource.com/c/170351
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This is a reland of b07aba4214
Original change's description:
> Move remove ptr args to MakeRecAndEffects
>
> Move this conversion out through the transitive closure of calls. As you
> move up the stack, everything becomes refs instread of pointers.
>
> Reorder args of MakeRecAndEffects and setupCache to match the majority of other
> calls.
>
> Change-Id: I72baf457cd9140f76ee5f7122493284c4be5bcd0
> Reviewed-on: https://skia-review.googlesource.com/c/169765
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
Change-Id: I2ff7f218ecc7b18ae6a2b293cecdb059eea77562
Reviewed-on: https://skia-review.googlesource.com/c/170222
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This reverts commit b07aba4214.
Reason for revert: Changes GMs
Original change's description:
> Move remove ptr args to MakeRecAndEffects
>
> Move this conversion out through the transitive closure of calls. As you
> move up the stack, everything becomes refs instread of pointers.
>
> Reorder args of MakeRecAndEffects and setupCache to match the majority of other
> calls.
>
> Change-Id: I72baf457cd9140f76ee5f7122493284c4be5bcd0
> Reviewed-on: https://skia-review.googlesource.com/c/169765
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
TBR=bungeman@google.com,herb@google.com
Change-Id: I29e54cea5b7b5709dd6db6816cb6556d73e003e0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/170221
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Move this conversion out through the transitive closure of calls. As you
move up the stack, everything becomes refs instread of pointers.
Reorder args of MakeRecAndEffects and setupCache to match the majority of other
calls.
Change-Id: I72baf457cd9140f76ee5f7122493284c4be5bcd0
Reviewed-on: https://skia-review.googlesource.com/c/169765
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This reverts commit 51b1c12bbc.
Reason for revert: reverting till flutter gets to 1.1 to fix build issues.
Original change's description:
> Have a GrBackendFormat be stored on gpu proxies.
>
> Bug: skia:
> Change-Id: Iaf1fb24ab29a61d44e5fa59a5e0867ed02dcda90
> Reviewed-on: https://skia-review.googlesource.com/c/168021
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com
Change-Id: I574fdc084ef5994596c51fb0d60423b5dc01b885
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:903701 chromium:903756
Reviewed-on: https://skia-review.googlesource.com/c/169835
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Bug: skia:
Change-Id: Iaf1fb24ab29a61d44e5fa59a5e0867ed02dcda90
Reviewed-on: https://skia-review.googlesource.com/c/168021
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This reverts commit 6bd19df9fa.
Restores original CL, but adds guards for flutter.
Bug: skia:
Change-Id: I380b4ea87d293355026d734249aa2b8c397da144
Reviewed-on: https://skia-review.googlesource.com/c/169345
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
Bug: skia:
Change-Id: I5386e27edbcf39233880d869841a6632ecb9416c
Reviewed-on: https://skia-review.googlesource.com/c/168261
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
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>
Initialize felt a little too nebulous, and I think
the verb for "define registrar entry" is "register".
Change-Id: I52f2eb5df5acd46a8b38bb9ea9bb07f4ac8f3789
Reviewed-on: https://skia-review.googlesource.com/c/163990
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
The NameToType() function and type argument passed to Register are never
used, so remove them.
While we're at it, switch the stragglers over to use the
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY macro. The only remaining direct
calls to Register are for legacy effect names, to be deleted in another
CL.
Change-Id: Ia304f960360a6f55b25f6e4eb2aa45533ee13476
Reviewed-on: https://skia-review.googlesource.com/c/163987
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This should let getTypeName() and serialization work even
when deserialization factories haven't been registered.
I've made getTypeName() pure virtual like getFactory(),
and moved all the overrides into SK_FLATTENABLE_HOOKS,
cleaning up all the various ways we've done it before.
All the subclasses override getTypeName() and getFactory()
privately, so there should be no need to document them?
Change-Id: I723cb20099d250c2f2a10be266e3aacc6a061937
Reviewed-on: https://skia-review.googlesource.com/c/163543
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Converts GrResourceProvider::Flags and GrResourceCache::ScratchFlags
to "enum class" and fixes a case where we were accidentally using the
wrong type of flag. Makes sure to allocate GrSWMaskHelper proxies with
kNoPendingIO.
Bug: skia:8351
Change-Id: Ibcaa26314a53d0cb31ae22915ab94ab0fc07e76d
Reviewed-on: https://skia-review.googlesource.com/157280
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
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>
The PathText samples extracted glyph paths in the constructor, which
means that this is done when the sample is created instead of when it is
actually going to be drawn. This interferes with debugging other
samples, so delay extracting the glyph paths until onOnceBeforeDraw.
Change-Id: I342cc728b79426203273e5a19fb5ba3718c50fd6
Reviewed-on: https://skia-review.googlesource.com/155000
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Rather that returning nullptr for a recording
canvas, return a raster canvas instead.
R=reed@google.com,robertphillips@google.com
Bug: skia:
Change-Id: I211d8ef368b9aec6d14cc72d1652ac6a03f3fa7b
Reviewed-on: https://skia-review.googlesource.com/151666
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This is a reland of 2f2757fa6b
Original change's description:
> ccpr: Implement stroking with fine triangle strips
>
> Implements strokes by linearizing the curve into fine triangle strips
> and interpolating a coverage ramp for edge AA. Each triangle in the
> strip emits either positive or negative coverage, depending on its
> winding direction. Joins and caps are drawn with the existing CCPR
> shaders for triangles and conics.
>
> Conic strokes and non-rigid-body transforms are not yet supported.
>
> Bug: skia:
> Change-Id: I45a819abd64e91c2b62e992587eb85c703e09e77
> Reviewed-on: https://skia-review.googlesource.com/148243
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Allan MacKinnon <allanmac@google.com>
TBR=robertphillips@google.com
Bug: skia:
Change-Id: I3f0065e80975ee8334300bc5e934231b66b49178
Reviewed-on: https://skia-review.googlesource.com/151188
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
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>
* For ambient we outset a constant amount around the perspective shape.
* For spot we compute the projection of the bounds from the light's
perspective, and from that compute a matrix to transform the path.
Bug: skia:7971
Change-Id: I7fffdd1446423956773d145ff4fae0a81602ad5b
Reviewed-on: https://skia-review.googlesource.com/150471
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This reverts commit 2f2757fa6b.
Reason for revert: issues with DDL
Original change's description:
> ccpr: Implement stroking with fine triangle strips
>
> Implements strokes by linearizing the curve into fine triangle strips
> and interpolating a coverage ramp for edge AA. Each triangle in the
> strip emits either positive or negative coverage, depending on its
> winding direction. Joins and caps are drawn with the existing CCPR
> shaders for triangles and conics.
>
> Conic strokes and non-rigid-body transforms are not yet supported.
>
> Bug: skia:
> Change-Id: I45a819abd64e91c2b62e992587eb85c703e09e77
> Reviewed-on: https://skia-review.googlesource.com/148243
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Allan MacKinnon <allanmac@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,caryclark@google.com,csmartdalton@google.com,reed@google.com,allanmac@google.com
Change-Id: I1980b09976df8275817eaffb6766dbd9fd3e59c7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/150980
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Implements strokes by linearizing the curve into fine triangle strips
and interpolating a coverage ramp for edge AA. Each triangle in the
strip emits either positive or negative coverage, depending on its
winding direction. Joins and caps are drawn with the existing CCPR
shaders for triangles and conics.
Conic strokes and non-rigid-body transforms are not yet supported.
Bug: skia:
Change-Id: I45a819abd64e91c2b62e992587eb85c703e09e77
Reviewed-on: https://skia-review.googlesource.com/148243
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Allan MacKinnon <allanmac@google.com>