remove unused IOSContext::ResourceMakeCurrent and IOS:Context::ClearCurrent (flutter/engine#18443)

This commit is contained in:
Chris Yang
2020-05-15 19:07:44 -07:00
committed by GitHub
parent a92281f44b
commit b5fa9d2986
7 changed files with 0 additions and 84 deletions

View File

@@ -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.

View File

@@ -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<Texture> CreateExternalTexture(
int64_t texture_id,

View File

@@ -33,7 +33,6 @@ std::unique_ptr<IOSRenderTargetGL> IOSContextGL::CreateRenderTarget(
// |IOSContext|
sk_sp<GrContext> 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<Texture> IOSContextGL::CreateExternalTexture(
int64_t texture_id,

View File

@@ -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<Texture> CreateExternalTexture(
int64_t texture_id,

View File

@@ -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<Texture> IOSContextMetal::CreateExternalTexture(
int64_t texture_id,

View File

@@ -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<Texture> CreateExternalTexture(
int64_t texture_id,

View File

@@ -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<Texture> IOSContextSoftware::CreateExternalTexture(
int64_t texture_id,