Skip to content

Decide the OpenGL ES renderer's future: 314 of the port's 513 deprecation warnings are GL #5782

Description

@shai-almog

-Wdeprecated-declarations is the single largest gating category in the iOS
census -- 513 instances across 56 shapes, two thirds of the port's 784. They
are not evenly spread:

instances first deprecated in
314 iOS 12.0
108 iOS 9.0
43 iOS 13.0
11 iOS 7.0
6 iOS 14.0
6 iOS 8.0
7 iOS 8.3
5 iOS 6.0
4 iOS 10.0
1 iOS 11.3
8 (version unstated)

By file:

146  IOSNative.m              32  EAGLView.m               19  TileImage.m
 77  CN1ES2compat.m           29  DrawTextureAlphaMask.m   19  DrawImage.m
 68  CodenameOne_GLViewController.m   21  DrawString.m      19  DrawGradient.m
                                                           13  FillRect.m / FillPolygon.m / DrawRect.m

The iOS 12.0 cohort is OpenGL ES, deprecated wholesale in favour of Metal,
and the file list is the GL renderer almost exactly: CN1ES2compat.m,
EAGLView.m, and the Draw*/Fill*/Tile* primitives. There is already a
Metal renderer and a build-ios-metal CI leg.

So this is a product decision before it is a code task, and it should be
made explicitly rather than by burning down warnings:

  1. If the GL path is still supported, these 314 stay and want a documented
    suppression scoped to the GL sources, with a baseline row each, so that a
    new deprecation elsewhere is still visible.
  2. If the GL path is legacy behind Metal, the question is when it is removed,
    and the warnings resolve themselves.
  3. Either way the 199 non-GL deprecations are separate and worth fixing on
    their own -- the iOS 9.0 cohort (108) is the next largest and has nothing to
    do with the renderer.

Apple removes deprecated API eventually; the Android port learned this when API
37 deleted FingerprintManager and every check in the tree stayed green. The
value of this category is that it is now visible, not that it must reach zero
tomorrow.

Recommendation: split -- take the 199 non-GL deprecations as ordinary work,
and handle the GL 314 with whatever the renderer decision turns out to be.

Found by the native warning census (scripts/check-native-warnings.py).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions