diff --git a/engine/src/flutter/shell/platform/darwin/ios/ios_context.h b/engine/src/flutter/shell/platform/darwin/ios/ios_context.h index 37fccd4b3d..8d030a7529 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/ios_context.h +++ b/engine/src/flutter/shell/platform/darwin/ios/ios_context.h @@ -88,39 +88,6 @@ class IOSContext { /// virtual bool MakeCurrent() = 0; - //---------------------------------------------------------------------------- - /// @brief When using client rendering APIs whose contexts need to be - /// bound to a specific thread, the engine will call this method - /// to give the off-screen context a chance to bind to the current - /// thread. - /// - /// @attention Client rendering APIs that have no-concept of thread local - /// bindings (anything that is not OpenGL) will always return - /// `true`. - /// - /// @attention Client rendering APIs for which a GrContext cannot be created - /// (software rendering) will always return `false`. - /// - /// @attention This binds the off-screen context to the current thread. To - /// bind the on-screen context to the thread, use the - /// `MakeCurrent` method instead. - /// - /// @attention Only one context may be bound to a thread at any given time. - /// Making a binding on a thread, clears the old binding. - /// - /// @return If the off-screen context could be bound to the current - /// thread. - /// - virtual bool ResourceMakeCurrent() = 0; - - //---------------------------------------------------------------------------- - /// @brief Clears the context binding of the current thread if one is - /// present. Does noting otherwise. - /// - /// @return `true` is the current context bound to the thread is cleared. - /// - virtual bool ClearCurrent() = 0; - //---------------------------------------------------------------------------- /// @brief Creates an external texture proxy of the appropriate client /// rendering API. diff --git a/engine/src/flutter/shell/platform/darwin/ios/ios_context_gl.h b/engine/src/flutter/shell/platform/darwin/ios/ios_context_gl.h index 56308831b9..a0d330eac6 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/ios_context_gl.h +++ b/engine/src/flutter/shell/platform/darwin/ios/ios_context_gl.h @@ -34,12 +34,6 @@ class IOSContextGL final : public IOSContext { // |IOSContext| bool MakeCurrent() override; - // |IOSContext| - bool ClearCurrent() override; - - // |IOSContext| - bool ResourceMakeCurrent() override; - // |IOSContext| std::unique_ptr CreateExternalTexture( int64_t texture_id, diff --git a/engine/src/flutter/shell/platform/darwin/ios/ios_context_gl.mm b/engine/src/flutter/shell/platform/darwin/ios/ios_context_gl.mm index 2a5a32bf8c..5eaac6ca51 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/ios_context_gl.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/ios_context_gl.mm @@ -33,7 +33,6 @@ std::unique_ptr IOSContextGL::CreateRenderTarget( // |IOSContext| sk_sp IOSContextGL::CreateResourceContext() { - // TODO(chinmaygarde): Now that this is here, can ResourceMakeCurrent be removed? if (![EAGLContext setCurrentContext:resource_context_.get()]) { FML_DLOG(INFO) << "Could not make resource context current on IO thread. Async texture uploads " "will be disabled. On Simulators, this is expected."; @@ -49,16 +48,6 @@ bool IOSContextGL::MakeCurrent() { return [EAGLContext setCurrentContext:context_.get()]; } -// |IOSContext| -bool IOSContextGL::ResourceMakeCurrent() { - return [EAGLContext setCurrentContext:resource_context_.get()]; -} - -// |IOSContext| -bool IOSContextGL::ClearCurrent() { - return [EAGLContext setCurrentContext:nil]; -} - // |IOSContext| std::unique_ptr IOSContextGL::CreateExternalTexture( int64_t texture_id, diff --git a/engine/src/flutter/shell/platform/darwin/ios/ios_context_metal.h b/engine/src/flutter/shell/platform/darwin/ios/ios_context_metal.h index 194b3fc4a0..c91d742fff 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/ios_context_metal.h +++ b/engine/src/flutter/shell/platform/darwin/ios/ios_context_metal.h @@ -45,12 +45,6 @@ class IOSContextMetal final : public IOSContext { // |IOSContext| bool MakeCurrent() override; - // |IOSContext| - bool ResourceMakeCurrent() override; - - // |IOSContext| - bool ClearCurrent() override; - // |IOSContext| std::unique_ptr CreateExternalTexture( int64_t texture_id, diff --git a/engine/src/flutter/shell/platform/darwin/ios/ios_context_metal.mm b/engine/src/flutter/shell/platform/darwin/ios/ios_context_metal.mm index ea5de5988c..9bf665c316 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/ios_context_metal.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/ios_context_metal.mm @@ -101,18 +101,6 @@ bool IOSContextMetal::MakeCurrent() { return true; } -// |IOSContext| -bool IOSContextMetal::ResourceMakeCurrent() { - // This only makes sense for context that need to be bound to a specific thread. - return true; -} - -// |IOSContext| -bool IOSContextMetal::ClearCurrent() { - // This only makes sense for context that need to be bound to a specific thread. - return true; -} - // |IOSContext| std::unique_ptr IOSContextMetal::CreateExternalTexture( int64_t texture_id, diff --git a/engine/src/flutter/shell/platform/darwin/ios/ios_context_software.h b/engine/src/flutter/shell/platform/darwin/ios/ios_context_software.h index 0bd11c4538..1d0e961d4a 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/ios_context_software.h +++ b/engine/src/flutter/shell/platform/darwin/ios/ios_context_software.h @@ -23,12 +23,6 @@ class IOSContextSoftware final : public IOSContext { // |IOSContext| bool MakeCurrent() override; - // |IOSContext| - bool ResourceMakeCurrent() override; - - // |IOSContext| - bool ClearCurrent() override; - // |IOSContext| std::unique_ptr CreateExternalTexture( int64_t texture_id, diff --git a/engine/src/flutter/shell/platform/darwin/ios/ios_context_software.mm b/engine/src/flutter/shell/platform/darwin/ios/ios_context_software.mm index ed11bd5424..5d2006e2dd 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/ios_context_software.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/ios_context_software.mm @@ -21,16 +21,6 @@ bool IOSContextSoftware::MakeCurrent() { return false; } -// |IOSContext| -bool IOSContextSoftware::ResourceMakeCurrent() { - return false; -} - -// |IOSContext| -bool IOSContextSoftware::ClearCurrent() { - return false; -} - // |IOSContext| std::unique_ptr IOSContextSoftware::CreateExternalTexture( int64_t texture_id,