If a path is small and simple enough, we now try to atlas it. There
is only one atlas and it caps at 2048x2048. Once it runs out of room,
everything just draws direct. The atlas is rendered using the existing
GrTessellatePathOp. It provides alpha8 coverage even for msaa render
targets.
Change-Id: I715da9ce7347b6f1ef8e28b3e13ab47f6eade1c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268724
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This is a hybrid approach where we stencil only the curves using GPU
tessellation shaders, and then tessellate the path's inner polygon on
CPU and draw it directly to the final render target, stencilled
against the curves. Tessellating just the inner polygon is more than
fast enough to do in real time, and still allows us fill in the
majority of pixels in a single render pass. It gives us most the
benefit of CPU tessellation, but at a fraction of the cost.
Furthermore, the tessellated inner polygon can potentially be cached
and reused independent of the view matrix.
Change-Id: Id45adc643b51ab80a0c655dd2045a5314bdc7507
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266456
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Moves the interface up to Ganesh level and starts using it from other
locations.
Change-Id: I939d2b357d3ae8551976d0d71b877b72da403712
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266063
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This is a reland of 77e1f84a84
Original change's description:
> Specialize SkRectanzier to SkRectanizerSkyline
>
> It looks like the pow2 rectanizer has never been used. Remove
> the unneeded abstraction for rectanizer everywhere.
>
> Change-Id: Iba33f1c6faf37201d03928ce8409751c212480a0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265983
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
Change-Id: I09729ba2b0e4b8b1a229fef4b95e65195b33fdc7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266180
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit 77e1f84a84.
Reason for revert: breaking google3 roll?
Original change's description:
> Specialize SkRectanzier to SkRectanizerSkyline
>
> It looks like the pow2 rectanizer has never been used. Remove
> the unneeded abstraction for rectanizer everywhere.
>
> Change-Id: Iba33f1c6faf37201d03928ce8409751c212480a0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265983
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,herb@google.com
Change-Id: I2573534f3ea95c98d089f9c19b027564e77015db
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266116
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
It looks like the pow2 rectanizer has never been used. Remove
the unneeded abstraction for rectanizer everywhere.
Change-Id: Iba33f1c6faf37201d03928ce8409751c212480a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265983
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Wedges fanning out from the center work fine for relatively simple
paths, but for paths made up of thousands of verbs, a fan is an
inefficient triangulation to give the rasterizer. This CL adds a
tessellation mode that draws the inner polygon and standalone cubics
separately, and triangulates the inner polygon by recursive
subdivision.
This reduces the stencil time from 7.4ms -> 3.0ms on desk_ynevsvg.skp.
Change-Id: Ie56e760d98e6c69e9a97752fe851726f36a7f574
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265522
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Added this as an option to GrSaturateProcessor (also renamed it to
be more generic and end with FragmentProcessor).
Added a tweak to the unit test to check the new behavior.
(Raster was already doing the clamp).
Change-Id: Ic49fa5cd72b6c63430fb773baf8121546bf2b80d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265580
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I66a9e1dff1b3d877012b38804cfb9d13f2b65f2b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264579
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@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>
There is no change to the code (yet).
Change-Id: I1997d7ac070691a3384441028503f6dc8565bbf8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261182
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This change mostly just removes GrTextureContext and switches users to
directly creating GrSurfaceContexts. Outside of updating types, the factory
functions for creating Gr*Contexts have not been updated in this but will
be done in a followup.
Change-Id: I55257568d4c096c5fb48c5e38bfa2c01b824e7b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260289
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Change-Id: Id3222effc21aea673b4d5d82a98e3e60f34512b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260278
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Move all the GrTextBlob methods to GrTextBlob.cpp. Under the old API
methods were called once per a glyphs so the methods were colocated
with the painter code. The APIs have changed to bulk, so the colocation
is no longer needed. In addition, the SubRun struct is going to move
from the GrTextBlob to the .cpp, so all these methods need to be together
soon.
Change-Id: I41124be0d5bcca29780be1a7f5c105268dadbe87
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258566
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Also deleted GrVkBufferView which isn't used anywhere.
Bug: skia:9603
Change-Id: Ia5a2cefe06a1e27a7d126990ea20a9d663d89c0c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255308
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Change-Id: I90f40467be145537cc08461fd3805606432f0cfd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254240
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: John Rosasco <rosasco@google.com>
Auto-Submit: John Rosasco <rosasco@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit 078cf3e3b2.
Reason for revert: Appears to be blocking the Chrome roll due to Fuchsia build failures
Original change's description:
> Fully delineate GL usage w/ skia_use_gl
>
> Change-Id: I17424d2235c7a54c4cda036f01a0b99dadc4b632
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252085
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=mtklein@google.com,bsalomon@google.com,halcanary@google.com,rosasco@google.com
Change-Id: I17ba79bfe6e7f81c126eddbd50ca5384cfa4179c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253098
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: I17424d2235c7a54c4cda036f01a0b99dadc4b632
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252085
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Although not necessary I would like to centralize/encapsulate the error checking so there is just one place to go to update/extend this code. It does have the nice property that, since we validate in the ctor and this object is immutable, we only have to do it once (and can delete some code spread throughout the code base).
Bug: skia:9455
Change-Id: Iaa26c7a896a9bd053358a6f8424d7f5944b0117e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/247339
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is the first step in moving the marshaling of program information earlier in renderTask processing (i.e., to onPrePrepare).
Change-Id: I91e3baed9a128e845bd32f9dbbacd9b21d852a3d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244118
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>
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>
Add version SkImageInfo::Make() that takes SkISize instead of separate
width and height.
Change-Id: I42aa79d23b19e22f5405631728c245b04bce0559
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245172
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Give it its own header file.
Make it store SkISize rather than separate int w/h.
Change-Id: I732f2774c561decac743a950959a70cbc162b67b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245163
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I87b0fc76ef48c1a21498e576853a6c3b4a6a98f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242563
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Previously this clamping was inserted by the program builder.
Adds GrSaturateProcessor to handle saturating in the fragment shader.
Clamp the GrPaint color rather than using a fp when possible.
Has to be plumbed through GrTextureOp because that skips SkPaint
conversion.
Removes a usage of GrPixelConfig.
Bug: skia:6718
Change-Id: Ifa6544496d34677f17e797433e6ef3a97be5c2b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242558
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Use managed staging buffers for texture uploads, uniforms and buffers.
Change-Id: I063707c160236725d27a1d1bfb197d3096a07b34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238120
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This will allow us to reuse the "setRelativeTo" logic in more places
than GL.
Bug: skia:
Change-Id: Ic67b211d2a1b27535187ddae8e4771f595dc0397
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239414
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
GrResourceAllocator.
Removes LazyInstantiationType. All callbacks can be invoked one time (if successful).
Lazy callbacks indicate whether their lifetime should be extended, which is used by
promise image proxy callbacks.
Promise image proxies are no longer deinstantiated at the end of flush and
GrDeinstantiateProxyTracker is removed. They will be instantiated the first time
they are encountered in GrResourceAllocator::addInterval (without actually adding
an interval) and then remain instantiated.
Also removes some "helper" versions of proxy factory functions that took fewer
params. They weren't much used outside of test code and as the total number of params
has grown their relative utility has diminished. We could consider a params struct
or radically simpler helpers that take only a few params if desired.
Change-Id: Ic6b09e7b807b66cb9fcbb7a67ae0f9faf345485f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238216
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
GrFence is implemented by a single MTLSharedEvent where we increase the
value with each new invocation. GrSemaphore uses a MTLEvent (the
assumption here is that we are signaling and waiting on the same device)
with an associated value that defaults to 1. For generating a large
number of GrSemaphores at once it should be possible to use the same
MTLEvent but with different assigned values.
Bug: skia:8243
Change-Id: Ic7de2d9d295fbe51e67bc7c3c4354257cb0774d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233416
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: Ifbe4bcd40bcf316868d23c2edf73b2371c6cb312
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237119
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
GrDawnGpu vends ring buffer slices out of a persistent (larger) buffer.
GrDawnProgramDataManager::setData() now returns a BindGroup containing
the (possibly new) UBO bindings, as well as the texture and sampler
bindings.
Change-Id: Id6694d6f44a815cfbffe4293779bf9bf558a2365
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235866
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
In a follow up CL I will be merging GrRenderTargetOpList and GrOpList
since we no longer have need for that separation.
Change-Id: I267ead3beeceaece504968ca69165c425d38f761
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236337
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This also means copies are no longer part of OpList or GpuCommandBuffer.
Change-Id: I234de2c93ca13e069d7e4423a3c8b292be2eb500
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235831
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
AFAICT these three remaining uses of GrPendingIOResource were just real-ref placeholders (i.e., they just added 1 pending read and then held on to the GrPendingIOResource until object destruction).
Change-Id: Iba6bb199477d846d079999f09794422e240c675a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235458
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>