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

Commit c511e5b

Browse files
committed
Format
1 parent dd74d18 commit c511e5b

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

shell/common/shell_io_manager.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,14 @@ void ShellIOManager::NotifyResourceContextAvailable(
9292
}
9393
}
9494

95-
void ShellIOManager::UpdateResourceContext(sk_sp<GrDirectContext> resource_context) {
95+
void ShellIOManager::UpdateResourceContext(
96+
sk_sp<GrDirectContext> resource_context) {
9697
resource_context_ = std::move(resource_context);
9798
resource_context_weak_factory_ =
98-
resource_context_ ? std::make_unique<fml::WeakPtrFactory<GrDirectContext>>(
99-
resource_context_.get())
100-
: nullptr;
99+
resource_context_
100+
? std::make_unique<fml::WeakPtrFactory<GrDirectContext>>(
101+
resource_context_.get())
102+
: nullptr;
101103
}
102104

103105
fml::WeakPtr<ShellIOManager> ShellIOManager::GetWeakPtr() {

shell/common/shell_io_manager.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ namespace flutter {
1717

1818
class ShellIOManager final : public IOManager {
1919
public:
20-
// Convenience methods for platforms to create a GrDirectContext used to supply to
21-
// the IOManager. The platforms may create the context themselves if they so
22-
// desire.
20+
// Convenience methods for platforms to create a GrDirectContext used to
21+
// supply to the IOManager. The platforms may create the context themselves if
22+
// they so desire.
2323
static sk_sp<GrDirectContext> CreateCompatibleResourceLoadingContext(
2424
GrBackend backend,
2525
sk_sp<const GrGLInterface> gl_interface);

shell/common/shell_test_platform_view_vulkan.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ bool ShellTestPlatformViewVulkan::OffScreenSurface::CreateSkiaGrContext() {
113113
PersistentCache::MarkStrategySet();
114114
options.fPersistentCache = PersistentCache::GetCacheForProcess();
115115

116-
sk_sp<GrDirectContext> context = GrDirectContext::MakeVulkan(backend_context, options);
116+
sk_sp<GrDirectContext> context =
117+
GrDirectContext::MakeVulkan(backend_context, options);
117118

118119
if (context == nullptr) {
119120
FML_DLOG(ERROR) << "Failed to create GrDirectContext";

shell/platform/darwin/ios/ios_context_metal.mm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ static GrContextOptions CreateMetalGrContextOptions() {
4141

4242
// Skia expect arguments to `MakeMetal` transfer ownership of the reference in for release later
4343
// when the GrDirectContext is collected.
44-
main_context_ = GrDirectContext::MakeMetal([device_ retain], [main_queue_ retain], context_options);
45-
resource_context_ = GrDirectContext::MakeMetal([device_ retain], [main_queue_ retain], context_options);
44+
main_context_ =
45+
GrDirectContext::MakeMetal([device_ retain], [main_queue_ retain], context_options);
46+
resource_context_ =
47+
GrDirectContext::MakeMetal([device_ retain], [main_queue_ retain], context_options);
4648

4749
if (!main_context_ || !resource_context_) {
4850
FML_DLOG(ERROR) << "Could not create Skia Metal contexts.";

0 commit comments

Comments
 (0)