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

Commit 3c2a4ac

Browse files
author
Chris Yang
authored
remove unused IOSContext::ResourceMakeCurrent and IOS:Context::ClearCurrent (#18443)
1 parent c39f859 commit 3c2a4ac

File tree

7 files changed

+0
-84
lines changed

7 files changed

+0
-84
lines changed

shell/platform/darwin/ios/ios_context.h

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -88,39 +88,6 @@ class IOSContext {
8888
///
8989
virtual bool MakeCurrent() = 0;
9090

91-
//----------------------------------------------------------------------------
92-
/// @brief When using client rendering APIs whose contexts need to be
93-
/// bound to a specific thread, the engine will call this method
94-
/// to give the off-screen context a chance to bind to the current
95-
/// thread.
96-
///
97-
/// @attention Client rendering APIs that have no-concept of thread local
98-
/// bindings (anything that is not OpenGL) will always return
99-
/// `true`.
100-
///
101-
/// @attention Client rendering APIs for which a GrContext cannot be created
102-
/// (software rendering) will always return `false`.
103-
///
104-
/// @attention This binds the off-screen context to the current thread. To
105-
/// bind the on-screen context to the thread, use the
106-
/// `MakeCurrent` method instead.
107-
///
108-
/// @attention Only one context may be bound to a thread at any given time.
109-
/// Making a binding on a thread, clears the old binding.
110-
///
111-
/// @return If the off-screen context could be bound to the current
112-
/// thread.
113-
///
114-
virtual bool ResourceMakeCurrent() = 0;
115-
116-
//----------------------------------------------------------------------------
117-
/// @brief Clears the context binding of the current thread if one is
118-
/// present. Does noting otherwise.
119-
///
120-
/// @return `true` is the current context bound to the thread is cleared.
121-
///
122-
virtual bool ClearCurrent() = 0;
123-
12491
//----------------------------------------------------------------------------
12592
/// @brief Creates an external texture proxy of the appropriate client
12693
/// rendering API.

shell/platform/darwin/ios/ios_context_gl.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,6 @@ class IOSContextGL final : public IOSContext {
3434
// |IOSContext|
3535
bool MakeCurrent() override;
3636

37-
// |IOSContext|
38-
bool ClearCurrent() override;
39-
40-
// |IOSContext|
41-
bool ResourceMakeCurrent() override;
42-
4337
// |IOSContext|
4438
std::unique_ptr<Texture> CreateExternalTexture(
4539
int64_t texture_id,

shell/platform/darwin/ios/ios_context_gl.mm

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333

3434
// |IOSContext|
3535
sk_sp<GrContext> IOSContextGL::CreateResourceContext() {
36-
// TODO(chinmaygarde): Now that this is here, can ResourceMakeCurrent be removed?
3736
if (![EAGLContext setCurrentContext:resource_context_.get()]) {
3837
FML_DLOG(INFO) << "Could not make resource context current on IO thread. Async texture uploads "
3938
"will be disabled. On Simulators, this is expected.";
@@ -49,16 +48,6 @@
4948
return [EAGLContext setCurrentContext:context_.get()];
5049
}
5150

52-
// |IOSContext|
53-
bool IOSContextGL::ResourceMakeCurrent() {
54-
return [EAGLContext setCurrentContext:resource_context_.get()];
55-
}
56-
57-
// |IOSContext|
58-
bool IOSContextGL::ClearCurrent() {
59-
return [EAGLContext setCurrentContext:nil];
60-
}
61-
6251
// |IOSContext|
6352
std::unique_ptr<Texture> IOSContextGL::CreateExternalTexture(
6453
int64_t texture_id,

shell/platform/darwin/ios/ios_context_metal.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,6 @@ class IOSContextMetal final : public IOSContext {
4545
// |IOSContext|
4646
bool MakeCurrent() override;
4747

48-
// |IOSContext|
49-
bool ResourceMakeCurrent() override;
50-
51-
// |IOSContext|
52-
bool ClearCurrent() override;
53-
5448
// |IOSContext|
5549
std::unique_ptr<Texture> CreateExternalTexture(
5650
int64_t texture_id,

shell/platform/darwin/ios/ios_context_metal.mm

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,6 @@ static GrContextOptions CreateMetalGrContextOptions() {
101101
return true;
102102
}
103103

104-
// |IOSContext|
105-
bool IOSContextMetal::ResourceMakeCurrent() {
106-
// This only makes sense for context that need to be bound to a specific thread.
107-
return true;
108-
}
109-
110-
// |IOSContext|
111-
bool IOSContextMetal::ClearCurrent() {
112-
// This only makes sense for context that need to be bound to a specific thread.
113-
return true;
114-
}
115-
116104
// |IOSContext|
117105
std::unique_ptr<Texture> IOSContextMetal::CreateExternalTexture(
118106
int64_t texture_id,

shell/platform/darwin/ios/ios_context_software.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ class IOSContextSoftware final : public IOSContext {
2323
// |IOSContext|
2424
bool MakeCurrent() override;
2525

26-
// |IOSContext|
27-
bool ResourceMakeCurrent() override;
28-
29-
// |IOSContext|
30-
bool ClearCurrent() override;
31-
3226
// |IOSContext|
3327
std::unique_ptr<Texture> CreateExternalTexture(
3428
int64_t texture_id,

shell/platform/darwin/ios/ios_context_software.mm

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,6 @@
2121
return false;
2222
}
2323

24-
// |IOSContext|
25-
bool IOSContextSoftware::ResourceMakeCurrent() {
26-
return false;
27-
}
28-
29-
// |IOSContext|
30-
bool IOSContextSoftware::ClearCurrent() {
31-
return false;
32-
}
33-
3424
// |IOSContext|
3525
std::unique_ptr<Texture> IOSContextSoftware::CreateExternalTexture(
3626
int64_t texture_id,

0 commit comments

Comments
 (0)