This CL makes it explicit that the unit tests always get a direct context.
It is mainly a mechanical CL.
Change-Id: I49e0628851d9c81eb47386ef978edf905c6469d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299866
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This also adds back default flush() calls which simply do a flush
without any submit.
Change-Id: Ia8c92bbdecd515d871abfa6364592f502e98656b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298818
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This will not be landed until chrome CL 2269958 lands.
Bug: skia:10425
Change-Id: I2a5081201ca3faed5232e8540086bd4c6f865767
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299292
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
If the backend doesn't support mipmaps, skip the test cases which
only differ by the mips flag.
Bug: skia:10361
Change-Id: I05e3bc59c2d9d1af6b5cb3659a7a346f2cdc8b82
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299558
Commit-Queue: Stephen White <senorblanco@chromium.org>
Commit-Queue: Stephen White <senorblanco@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
The callback lets the caller know when the data uploads to the texture
from the create call are finished. This is important since the caller
cannot delete the backend texture till the gpu is finished on vulkan
and d3d.
This change also removes the hard sync in vulkan during creation.
Change-Id: I660d142219474e22b1337d2b0c81cda66fe18a4b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286517
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Clients will need official access to this class for the compilation iterator.
This CL also hides some of the cruft we don't want exposed.
Bug: skia:9455
Change-Id: I696c058f1c409fb459229552fbbdd935ec112358
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272643
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit ad3b2c9886.
Reason for revert: clang
Original change's description:
> Move SkDeferredDisplayList.h into include\core
>
> Clients will need official access to this class for the compilation iterator.
>
> This CL also hides some of the cruft we don't want exposed.
>
> Bug: skia:9455
> Change-Id: I408c19f9ecd6880a5a7853def591407b0ca43e4e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272343
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com
Change-Id: Ica80434e7423fb202355eb77a614ece1c4d54726
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9455
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272641
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Clients will need official access to this class for the compilation iterator.
This CL also hides some of the cruft we don't want exposed.
Bug: skia:9455
Change-Id: I408c19f9ecd6880a5a7853def591407b0ca43e4e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272343
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
These make it easier for clients to create new surface characterizations that differ only a little from an existing surface characterization.
Change-Id: Iebd0b32ae941d3f91427927108d092cb5864b09f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270444
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Change-Id: I2619784eca0f7a4dd66f2db0104cb746d9266b4e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244369
Commit-Queue: John Rosasco <rosasco@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@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>
Change-Id: Ie4653fce34e4d6f38613f63bc68ecc1b7bae361b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/246019
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Additionally this changes removes the version of the call that that takes
a GrPixelConfig.
As part of this change many call sites that were calling getRTSampleCount
to just check renderability have been changed to call
isFormat[AsColorType]Renderable instead. This change has also started to
move us to just checking format renderability (without GrCT) in classes
that are specifically dealing with GrSurface (GrResourceProvider, GrGpu, etc.).
Bug: skia:6718
Change-Id: Icf4a1a21a81a44e6863a7cd2059d21b9833d581f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233039
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This makes calling GrCaps::getBackendFormatFromColorType equivalent to calling GrContext::defaultBackendFormat
Change-Id: Ic402245fa0502920c47c2a29aadc4e559abdc09b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230416
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
These uses seem redundant. The remaining uses are in the test "ResourceCacheWrappedResources" where the call is used to ensure borrowed resources aren't deleted.
Change-Id: I2323a3496330b53e13b84e8b7c20037b841224a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225732
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
In order to effectively use the explicit backend texture allocation API Chrome needs a way to use them with surface characterizations
Change-Id: Ic61eff9f3b6b0e8280481149d7c08d37a2fe7ec0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222781
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Although the main change in this CL is the addition of GrCaps::areColorTypeAndFormatCompatible.
This is split out of:
https://skia-review.googlesource.com/c/skia/+/222781 (Add bridge between GrContext::createBackendTexture and SkSurface::MakeFromBackendTexture)
Change-Id: I2e50fff91eb07fb1358840e1a4a76dc138a2f195
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223932
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is part of bridging the explicit backend surface API and making SkSurfaces
This is pulled out of:
https://skia-review.googlesource.com/c/skia/+/222781/ (Add bridge between GrContext::createBackendTexture and SkSurface::MakeFromBackendTexture)
Change-Id: Ib55bcd8a0d1a049f230314a8f8ba7a3951b06d5c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223707
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
By itself this CL isn't all that compelling but I believe we need some intermediate path to wean ourselves off of GrPixelConfig. In particular, I believe isFormatTexturable will not need an SkColorType parameter in the future.
This is pulled out of:
https://skia-review.googlesource.com/c/skia/+/222781/ (Add bridge between GrContext::createBackendTexture and SkSurface::MakeFromBackendTexture)
which adds SkSurface::isCompatible - so the SkSurface_Gpu::isCompatible calls have been removed from this CL.
Change-Id: I6c2b8a2c4af98c1437b92c58513f34014e551b2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223188
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@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>
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>
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>
The trick we're playing in order to retarget DDLs at the replay SkSurface's RenderTargetContext/RenderTargetProxy has come back to bite us.
Bug: 958055
Change-Id: Ifbfcc82691fba1aa4cf154577f6ba1ef488ac013
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212502
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Some platforms (e.g., ANGLE & CommandBuffer) don't return GrSemaphoresSubmitted::kYes from flush
Change-Id: I0810e2ecb7f9ad1088c9450ceb5669fe690e8298
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212505
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: 958055
Change-Id: I9abffd09344a731efbd29dce23db76d56d258622
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212408
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@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>
Currently doesn't do any clamping, but connects the new config to the
recently added SkColorType. Behavioral changes coming in future CLs.
Bug: skia:
Change-Id: I907396030c435d0aa5931063b3dc6f1b60c661af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199980
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit c5e8e150c8.
Reason for revert: Reverting to revert 9ac0407006https://skia-review.googlesource.com/c/skia/+/197163
Original change's description:
> Change promise image contract to for when Release and Done are called.
>
> Now Release is called when all work related to the SkImage is flushed
> and Done is called when it is finished on the GPU in Vulkan. In GL they
> are still both called back-to-back after flushing.
>
> Bug: skia:8800
> Change-Id: I990be7b9ebef8411590afd860ef40511fb5fee32
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198165
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
Change-Id: I13e8211d89ed1b7694c2d7734eeaaf4ba9ad410a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8800
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198602
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Now Release is called when all work related to the SkImage is flushed
and Done is called when it is finished on the GPU in Vulkan. In GL they
are still both called back-to-back after flushing.
Bug: skia:8800
Change-Id: I990be7b9ebef8411590afd860ef40511fb5fee32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198165
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>