With the addition of the DDL program pre-compilation we need to know how it is working.
This CL also fixes some threading bugs.
Bug: skia:9455
Change-Id: I20da58a7f1b19685687fae1d159d4e0db8a4964d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273001
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This also allows us to remove all the one off Fence code that we
implemented in all the backend TestContexts
Change-Id: I9ff7ba4690cf3f19a180f51fc510991a112bb62c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272456
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This is through a private API but it, at least, connects things end-to-end.
Bug: skia:9455
Change-Id: Ib34d49c5c4e4cfa5fa599afc5c967fcadc3de10e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268627
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Having this as a sink rather than a Via allows us to do more aggressive things with threads and shared contexts.
Change-Id: I3ca1076686fa4f53387c12a9506e01910c1bc3e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272016
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
unused declaration
passing std::move() to const&
These are triggering warnings in google3
Change-Id: I12cebd0a8fd218e7755718fed7acec7908d386a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271138
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Split apart creation of the callback contexts and the backend textures
This allows the texture upload to be done separately on the
gpu-thread
Add a backendFormat member to the promise image callback context
This allows the promise images to be created in CreatePromiseImages
before the backend textures have been created (i.e., the backend
textures can now be created on the gpu-thread so we have no
guarantee they will be available when the SKP is being reinflated
w/ promise images)
Change-Id: I1e21385e450a5ef27dd6950d9d6aee737aa7515d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270939
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
TileData now gets a pointer to the final surface
This allows the tile to, once rendered, compose itself into
the final surface
DDLTileHelper now stores the TileData in a dumb array
SkTArray is overkill and, since TileData*s are being doled
out to threads, we never want reallocation
Added DDLTileHelper::kickOffThreadedWork
The old code only performed DDL creation in parallel. This
entry point also replays the DDLs and composes them into the
final surface in parallel
Change-Id: I66e02ef7f8291b4d402e22bee0ad3546e930609e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270796
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
I'm adding a new DDL Sink and would like to reuse this functionality.
TBR=egdaniel@google.com
Change-Id: I17ae929557400be4edd8df78ab6580872024bc15
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270799
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit 7b2fcfbc5a.
Reason for revert: Need to loosen up error handling
Original change's description:
> Carve some helper functions off of GPUSink
>
> I'm adding a new DDL Sink and would like to reuse this functionality.
>
> Change-Id: I9f4535ca5e0f36925bf896cb0076eab73fe60fd1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270639
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,robertphillips@google.com
Change-Id: I97968834b5719c2061d53caff0dcf08a80917beb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270798
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
I'm adding a new DDL Sink and would like to reuse this functionality.
Change-Id: I9f4535ca5e0f36925bf896cb0076eab73fe60fd1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270639
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Initially, Error was written with the intent that an empty string meant
Ok and anything else meant Fatal. This made things simple with implicit
constructors from strings. With the introduction of Nonfatal the state
was now tied up with an additional boolean. Now the empty string meant
Ok and causes the new boolean to be ignored, or at least that is the way
it was used since Error didn't actually enforce that itself. This leads
to GMs which return kSkip but don't set the message to not be skipped.
This could be fixed in several ways.
The first would be for the GMSrc to notice that a GM had returned kSkip
with an empty message and create the Error::Nonfatal with a non-empty
message. This has the downside of being some extra unexpected complexity
and doesn't prevent similar issues from arising in the future.
The second would be to change how DM interprets the Error, and if the
non-fatal bit is set treat that as a sign to skip, even if the message
is empty. This fixes the stated issue, but doesn't fix the issue where a
GM can return kFail but also leave the message empty. This could again
be fixed by either modifying GMSrc::draw or GM::drawContent, but this
also seems a bit brittle in not preventing this from happening again in
the future.
So this replaces Error with Result, which makes the status orthogonal to
the message. It does lose the automatic conversion from string, but by
being able to wrap the many uses of SkStringPrintf the explicit nature
doesn't add much additional noise to the more complex failure reports.
Change-Id: Ibf48b67faa09a91a4a9d792d204bd9810b441c6c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270362
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Bug: b/135133301
Follow-on to 196f319b.
- Add SkCodec::getICCProfile to match the SkAndroidCodec version.
- Update comments on getPixels() regarding how the SkColorSpace on the
SkImageInfo is treated.
- Add two new images that have ICC profiles that do not map to an
SkColorSpace. Add a test to verify that they have the un-transformed
color we expect.
- Stop uploading ColorCodecSrc images decoded to a null SkColorSpace to
Gold. Though they may be correct, they do not match other images they're
compared against. The new test above verifies that we do not do color
conversion with a null SkColorSpace.
Change-Id: I08635e4262f16500fab32ef97511d305c2c06483
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269236
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Use std::min and std::max everywhere.
SkTPin still exists. We can't use std::clamp yet, and even when
we can, it has undefined behavior with NaN. SkTPin is written
to ensure that we return a value in the [lo, hi] range.
Change-Id: I506852a36e024ae405358d5078a872e2c77fa71e
Docs-Preview: https://skia.org/?cl=269357
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269357
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
The goal of the verifier framework is to enable opt-in checks of the
images produced by individual GMs. The basis of verification will be
comparing the rendered output of a GM against a source-of-truth image,
such as one generated by the CPU backend.
In the short term this can enable coarse-grained sanity checks for a
subset of GMs to catch e.g. egregious rendering bugs. In the longer term
this can provide an SkQP-style suite of tests that can be run across
many/all GMs to provide a vote of confidence in the rendering
correctness of new devices.
Bug: skia:9855
Change-Id: I50f15ecd029b28b69c0f68dc4126df3a4dd61d75
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268685
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
This reverts commit 7e36f0015e.
Reason for revert: breaking google3 roll
Original change's description:
> Initial checkin of GM verifier framework
>
> The goal of the verifier framework is to enable opt-in checks of the
> images produced by individual GMs. The basis of verification will be
> comparing the rendered output of a GM against a source-of-truth image,
> such as one generated by the CPU backend.
>
> In the short term this can enable coarse-grained sanity checks for a
> subset of GMs to catch e.g. egregious rendering bugs. In the longer term
> this can provide an SkQP-style suite of tests that can be run across
> many/all GMs to provide a vote of confidence in the rendering
> correctness of new devices.
>
> Bug: skia:9855
> Change-Id: Id7310de8005ffa7e8eb2fd0e4008f5f8db1419ab
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267761
> Commit-Queue: Derek Sollenberger <djsollen@google.com>
> Auto-Submit: Tyler Denniston <tdenniston@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
TBR=djsollen@google.com,tdenniston@google.com
Change-Id: Ie3beff447fea406b5ad3c3ca5a98fa2bd73d20fb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9855
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268682
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
The goal of the verifier framework is to enable opt-in checks of the
images produced by individual GMs. The basis of verification will be
comparing the rendered output of a GM against a source-of-truth image,
such as one generated by the CPU backend.
In the short term this can enable coarse-grained sanity checks for a
subset of GMs to catch e.g. egregious rendering bugs. In the longer term
this can provide an SkQP-style suite of tests that can be run across
many/all GMs to provide a vote of confidence in the rendering
correctness of new devices.
Bug: skia:9855
Change-Id: Id7310de8005ffa7e8eb2fd0e4008f5f8db1419ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267761
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Auto-Submit: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
All caller were passing the maxium value, those that weren't still function if they are made to.
Change-Id: Id9b5d8dbbbdf10a02ea0f3b21d500059ec383e3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259808
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Mike Klein <mtklein@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>
Having it means you cannot write:
SkSize size;
float x, y;
size = {x , y};
clang allows it but GCC does not, claiming it is ambiguous between the
implicitly generated
SkSize& SkSize::operator=(const SkSize&)
and
SkSize& SkSize::operator=(const SkISize&)
clang gives the same error if the former is explicitly declared default.
Change-Id: I3b64436ef6aa669b3d87e7f37057c5dcb4add987
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257880
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
For now, we'll have two copies. Once clients are using the skresources
versions exclusively, we can remove the originals from skottie.
Change-Id: I3152f526b0505b8374bdd9b4513a80bddc702ccc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256416
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
More cleaning to do if we like this idea...
Change-Id: I608143db085911565dd5f5426f7ee6436ec58cdf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254680
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: 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>
Also, remove the never-used gpu_threading flag. In limited
testing, it makes things slower.
Change-Id: I40ae0c8e5b79992c90845035a06536ed9d6626b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240202
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The client can do a test run of their application with
a persistent cache set to SkSL mode. They store the key
and data blobs that are produced.
Ship those blobs with the application. At startup, call
GrContext::precompileShader for each key/data pair. This
compiles the shaders, and stores the GL program ID, plus
a small amount of metadata in our runtime program cache.
Caveats:
* Currently only implemented for the GL backend. Other
backends will require more metadata to do any useful
amount of work. Metal may need a more drastic workflow
change, involving offline compilation of the shaders.
* Currently only implemented for cached SkSL (not GLSL
or program binaries). Supporting other formats again
requires more metadata, and the cached shaders become
increasingly specialized to GPU and driver versions.
* Reusing the cached SkSL on different hardware is not
supported. Many driver workarounds are implemented in
the SkSL -> GLSL transformation, but some are higher
level. Limiting device variance by artificially hiding
extensions may help, but there are no guarantees.
* The 'gltestprecompile' DM config exercises this code
similarly to 'gltestpersistentcache', ensuring that
results are visually identical when precompiling, and
that no cache misses occur after precompiling.
Change-Id: Id314c5d5f5a58fe503a0505a613bd4a540cc3589
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239438
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Combines the two boolean options into a single tri-state enum. Old GLSL
option is still present (temporarily) until Chrome is switched over.
Also add a type tag for cached program binaries, so we can safely
detect cache entries of the wrong type.
Change-Id: I0ddeefa9180b27bc2c46e2e7b77e6c9cdf4a730a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238856
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Change-Id: If8a4d3cfdeaef58dd9924af430cfed834519b096
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232496
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
As described in the comments, this is a workaround for a rare situation
when trying to use cached program binaries in conjunction with ANGLE and
path rendering.
Change-Id: Ief5bb0042f5ec13cbea2242ff9c4f0b9f9e65641
Bug: angle:3619
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/224258
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit a7b224d3a3.
Reason for revert: Failures on some ANGLE bots
Original change's description:
> DM: Add a per-sink MemoryCache to all GPU sinks
>
> This isolates the caches per config, so we don't try to reuse cached
> binaries across different GL versions (or different D3D backend versions
> on ANGLE bots, etc).
>
> Locally, this sped up ANGLE significantly Looking at a sample bot
> (NUC6i5SYK), it dropped DM from 36m to 31m.
>
> Change-Id: I95db18c6ea85041e6adbc972f0118233c82818fb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223985
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=bsalomon@google.com,brianosman@google.com
Change-Id: I8c9af65d89fddb28e5f1395a6c946312f27ba48a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/224186
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This isolates the caches per config, so we don't try to reuse cached
binaries across different GL versions (or different D3D backend versions
on ANGLE bots, etc).
Locally, this sped up ANGLE significantly Looking at a sample bot
(NUC6i5SYK), it dropped DM from 36m to 31m.
Change-Id: I95db18c6ea85041e6adbc972f0118233c82818fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223985
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
For Skia's testing we always want an initialized backend texture. Except for the
BackendAllocationTests of course.
Change-Id: I47b5e4c9845b3f58ebad5ba052780a69d6cd6954
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/216348
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This initial portion of the API should be ready to go. Follow on CLs will add the other entry points.
Change-Id: Ia9c708046ba08b16f9a71558e2bf2c38279abe5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214680
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
To fully switch over we need the entry point that uploads data but most of the old call
sites can be switched over now.
Change-Id: I362b1dfde7d88bf8d3f8f90155f53d9ac442a329
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214300
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
It's been dead code since it was inlined into Android last summer.
Change-Id: I252f6392d9436ef357f22a54bab8a33c9d1b3ea9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213625
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This intended to bring this API more into line with the proposed GrBackendObject API with an eye towards replacing the former with the latter.
TBR=bsalomon@google.com
Change-Id: I4367f03fb10fff788749f21c4843060111a6df1c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213220
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Add a shim to redirect until clients are updated
Change-Id: Ib43614e5620b1a24ca18187c1646a8ed1a9ee7a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211003
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@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>
skcms is part of Skia's public API now. This attempts to recognize that,
and pave the way for moving the header to another location more easily
in a follow up CL, or - at a minimum - for clients that redistribute
Skia as a library + includes to relocate the skcms.h header as part of
that.
Change-Id: I15da63b0d4ab8916a71fb7e6ab3656db87252707
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209640
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
We need to store (up to) three GLSL strings in the cache entry,
along with the bookkeeping to reconstruct them. To make things
simpler, we now store the null terminators.
Change-Id: Ic4fe03cb5d774464372ceec8740da1bfe9069550
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205823
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
And mark atlastext as GPU-only, so it's skipped instead
of running and failing on non-GPU --configs.
Change-Id: I9b41873bed14e20f2e086a04f57b247994e9266e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205347
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Turns out lots of tools had two copies of many of these flags.
Some GN and .cpp file refactoring to make sure when flags are
present in a binary, they do something in that binary.
I think this finally finishes the flag refrag.
Change-Id: I01488e37ab73a5c4361786863ddb137a7f1095b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203420
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>