Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: flutter/engine
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4878f1c
Choose a base ref
...
head repository: flutter/engine
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d0f0526
Choose a head ref
  • 3 commits
  • 8 files changed
  • 1 contributor

Commits on Nov 17, 2024

  1. iOS: Clean up uses of string literal constants (#56658)

    Three changes related to string constants:
    
    1. Uses the kIOSurfaceColorSpace constant, which is a CFStringRef pointing to the string "IOSurfaceColorSpace"
    
    2. Uses the kCVPixelFormatType_32BGRA enum value from the CoreVideo headers (which is equal to 'BGRA') in place of hardcoding the string.
    
    From the headers:
    ```
    kCVPixelFormatType_32BGRA         = 'BGRA',     /* 32 bit BGRA */
    ```
    
    3. Declares kIOServicePlane as a `constexpr const char*` rather than `static const char*`, this ensures only a single instance is created, rather than one per translation unit into which the header is included. This string is part of IOKit, but see the comment at the top of the header as to why it's apparently needed.
    
    No test changes since there are no semantic changes.
    
    [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
    cbracken authored Nov 17, 2024
    Configuration menu
    Copy the full SHA
    e86b989 View commit details
    Browse the repository at this point in the history
  2. iOS: Make FlutterViewController.engine a strong ref (#56663)

    Previously, FlutterViewController.engine was declared as a weak readonly property, but we explicitly declared the `FlutterEngine* _engine` ivar as a strong reference in the implementation. This changes the property declaration to be strong and eliminates the now unnecessary ivar.
    
    There is also no semantic change to FlutterViewController itself, since the `_engine` ivar had been manually declared as a strong reference.
    
    There is no semantic change for users of FlutterViewController.engine since whether a user acquires a strong or weak reference to the engine is determined by whether they declare the pointer to which they assign it as strong or weak.
    
    This also eliminates the need for the `engine` getter, which was only present to prevent a warning that the strong ivar didn't match the weak property declaration.
    
    No changes to tests since this introduces no semantic changes.
    
    Issue: flutter/flutter#137801
    
    [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
    cbracken authored Nov 17, 2024
    Configuration menu
    Copy the full SHA
    7846bc2 View commit details
    Browse the repository at this point in the history
  3. iOS,macOS: Fix string constant declarations (#56661)

    A couple string constants had been incorrectly declared `const NSString*` rather than `NSString* const`. The former is a pointer to an immutable string, but (a) the pointer can be reassigned and (b) the default NSString implementation is immutable. The latter is an immutable pointer to a string, which is what we want, since we don't want developers reassinging our constants to other values.
    
    Also updates an identifier name to pass lint rules.
    
    No changes to tests since this is "tested" by the compiler.
    
    [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
    cbracken authored Nov 17, 2024
    Configuration menu
    Copy the full SHA
    d0f0526 View commit details
    Browse the repository at this point in the history
Loading