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

[macOS] Allocate textures as unique_ptr earlier #47786

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

cbracken
Copy link
Member

@cbracken cbracken commented Nov 8, 2023

This cleans up several places where instead of allocating a std::unique_ptr immediately, we were making allocations with the new operator, then later wrapping in a unique_ptr. The previous code was correct but there was no reason not to allocate a unique_ptr immediately.

This code makes no semantic changes; just applies a stylistic improvement that makes the code very slightly safer.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

This cleans up several places where instead of allocating a
std::unique_ptr immediately, we were making allocations with the new
operator, then later wrapping in a unique_ptr. The previous code was
correct but there was no reason not to allocate a unique_ptr
immediately.

This code makes no semantic changes; just applies a stylistic
improvement that makes the code very slightly safer.
@cbracken cbracken force-pushed the external-texture-make_unique branch from 9acc933 to fa1643d Compare November 8, 2023 08:52
Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

@cbracken cbracken merged commit 93f3d6c into flutter:main Nov 8, 2023
@cbracken cbracken deleted the external-texture-make_unique branch November 8, 2023 21:50
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 8, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Nov 9, 2023
…138116)

flutter/engine@b3af5d6...233bd62

2023-11-08 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Upgrade Android SDK to 34 "UpsideDownCake"" (flutter/engine#47834)
2023-11-08 [email protected] Roll Skia from e585bb68893b to 1241a903cd33 (2 revisions) (flutter/engine#47830)
2023-11-08 [email protected] Upgrade Android SDK to 34 "UpsideDownCake" (flutter/engine#47609)
2023-11-08 [email protected] [macOS] Allocate textures as unique_ptr earlier (flutter/engine#47786)
2023-11-08 [email protected] Reland "[Impeller] add support for Skia concept of RRect::isSimple needed for DL dispatching" (flutter/engine#47824)
2023-11-08 [email protected] Roll Skia from e2b8ebe16203 to e585bb68893b (7 revisions) (flutter/engine#47826)
2023-11-08 [email protected] [Impeller] Add support for specialization constants (III). (flutter/engine#47765)
2023-11-08 [email protected] [Impeller] Documented the 2 step in the gaussian blur. (flutter/engine#47822)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants