friction2d / friction

Friction Graphics
https://friction.graphics
GNU General Public License v3.0
185 stars 10 forks source link

Update skia #15

Closed rodlie closed 2 months ago

rodlie commented 1 year ago
SlawekNowy commented 1 year ago

The oldest commit matching this is: https://github.com/google/skia/commit/9944fb408c5473d67d66744f52afebd98a97c313 This puts us at skia milestone 101 (chrome/m101). There are two (so-far) changes in the enve codebase necessary:

  1. Skia m88:
    • GrContext has been replaced by two separate classes: GrDirectContext which is the traditional notion of GrContext, and GrRecordingContext which is a context that is recording an SkDeferredDisplayList and therefore has reduced functionality. Unless you are using SkDeferredDisplayList, migrate directly to GrDirectContext in all cases.
  2. If we update skia past this we have a second change at skia m112:
    • SkRandom is no longer part of the public API.

Pasted text from skia's release notes.

rodlie commented 1 year ago

Thanks for taking the time to check :+1:

Will work on enve2d this weekend, but my first priority is to fix the open Mac issue (#16).

SlawekNowy commented 1 year ago

Addition stuff I found: Paint.setFilterQuality, Paint.getFilterQuality, Image.makeShader have been removed. The new way to specify interpolation settings is with the newly added `Image.makeShader methods.Image.makeShaderCubicis a replacement for high quality;Image.makeShaderOptions` is for medium/low. (from canvas kit release notes [0.21]), which are defined as follows: https://github.com/google/skia/blob/94ed2b7c0aa312cfbc5810002e9e9a52762911be/modules/canvaskit/canvaskit_bindings.cpp#L1526

SlawekNowy commented 1 year ago

Check skia_bump branch on updates.

rodlie commented 1 year ago

Created a new branch https://github.com/enve2d/enve2d/tree/skia for upgrading skia. Currently at m88, will continue tomorrow.

rodlie commented 1 year ago

So, m88+ broke some of my enve2d projects files. Since I'm trying to stabilize enve2d I think it would be best to wait until we at least have working unit tests before we try to upgrade skia beyond where we are.

I did however fix python3 compatibility in the skia version we use, so that should not be an issue anymore.

rodlie commented 2 months ago

Keeping up with skia is not realistic (stuff changes too much), the skia version we use should be considered a fork.

Chromium (and Skia) have a staged branching strategy. Every four weeks a branch is cut from a relatively stable revision near HEAD, is stabilized for six weeks, and then promoted to stable.