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: d333434
Choose a base ref
...
head repository: flutter/engine
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 099a70e
Choose a head ref
  • 7 commits
  • 34 files changed
  • 4 contributors

Commits on Jun 29, 2023

  1. [Impeller] Remove all double empties (#43345)

    Unwrap optionals that already have an empty state that must be checked, like `std::optional<std::shared_ptr<T>>` and `std::optional<std::function<T>>`.
    bdero authored Jun 29, 2023
    Configuration menu
    Copy the full SHA
    e4873bb View commit details
    Browse the repository at this point in the history
  2. [Impeller] Check for lazy memory support. (#43339)

    Some Android devices do not support the memory type eLazilyAllocated, which we use for MSAA and stencil textures. These textures were falling back to device local in dedicated allocations, which are expensive to both allocate and free. The dedicated allocation is implied by asking for eLazilyAllocated
    
    Instead, perform a check for support for this memory type. Never request dedicated allocations (at least not until we have a compelling use case)
    
    This should fix flutter/flutter#129737
    
    flutter/flutter#129784
    Jonah Williams authored Jun 29, 2023
    Configuration menu
    Copy the full SHA
    12f3f47 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    84842b1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    90af028 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2023

  1. [Impeller] Assign missing user to TODO. (#43351)

    The linter is failing on this in my unrelated PR for some reason: #43348
    
    ```
    � Failures for clang-tidy on /Volumes/Work/s/w/ir/cache/builder/src/flutter/impeller/renderer/backend/metal/vertex_descriptor_mtl.mm:
    /Volumes/Work/s/w/ir/cache/builder/src/flutter/impeller/renderer/backend/metal/vertex_descriptor_mtl.mm:177:3: error: missing username/bug in TODO [google-readability-todo,-warnings-as-errors]
      // TODO: its odd that we offset buffers from the max index on metal
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      // TODO(chrome-bot): its odd that we offset buffers from the max index on metal
    Suppressed 1476 warnings (1475 in non-user code, 1 NOLINT).
    Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
    1 warning treated as error
    ```
    bdero authored Jun 30, 2023
    Configuration menu
    Copy the full SHA
    f8f602c View commit details
    Browse the repository at this point in the history
  2. [Impeller] Unwrap optional procs in EntityPass (#43352)

    Whoopsies, I missed a spot... Fix a possible crash where an optional nullptr can be provided as the backdrop filter proc. Related: #43345
    bdero authored Jun 30, 2023
    Configuration menu
    Copy the full SHA
    b77a669 View commit details
    Browse the repository at this point in the history
  3. [web] Add nonce configuration. (#42829)

    This PR adds a `nonce` JS configuration attribute so users can pass a nonce value to their flutter engine initialization code.
    
    This `nonce` is used to mark all scripts/styles needed by Flutter web that are considered `unsafe-inline` by CSP. In this change, there are only two tags that benefit from this:
    
    * canvaskit.js
    * inline styles for text editing
    
    Before this change, the most strict CSP that allows a Flutter Web app to run would look like:
    
    ```
    script-src 'self' 'nonce-flutter-init-scripts' 'wasm-unsafe-eval' https://www.gstatic.com/flutter-canvaskit/;
    font-src https://fonts.gstatic.com;
    style-src 'unsafe-inline';
    ```
    
    After this change, CSP could be tightened to:
    
    ```
    script-src 'self' 'nonce-YOUR_NONCE_VALUE' 'wasm-unsafe-eval';
    font-src https://fonts.gstatic.com;
    style-src 'nonce-YOUR_NONCE_VALUE';
    ```
    
    By initializing the Flutter web app with something like this:
    
    ```html
    <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'nonce-YOUR_NONCE_VALUE' 'wasm-unsafe-eval'; font-src https://fonts.gstatic.com; style-src 'nonce-YOUR_NONCE_VALUE';">
    
    ...
    
    <script nonce="YOUR_NONCE_VALUE">
      _flutter.loader.loadEntrypoint({
        onEntrypointLoaded: async function(engineInitializer) {
          let appRunner = await engineInitializer.initializeEngine({
            nonce: 'YOUR_NONCE_VALUE',
          });
          appRunner.runApp();
        }
      });
    </script>
    ```
    
    ## Issues
    
    Fixes flutter/flutter#126977 (does not address `flutter.js`, that's a [different story](flutter/flutter#128061))
    Helps with flutter/flutter#80221
    
    ---
    
    [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
    ditman authored Jun 30, 2023
    Configuration menu
    Copy the full SHA
    099a70e View commit details
    Browse the repository at this point in the history
Loading