@@ -63,10 +63,6 @@ using TSelf = jni::local_ref<JniPlatformContext::jhybriddata>;
63
63
void JniPlatformContext::registerNatives () {
64
64
registerHybrid ({
65
65
makeNativeMethod (" initHybrid" , JniPlatformContext::initHybrid),
66
- makeNativeMethod (" notifyDrawLoop" ,
67
- JniPlatformContext::notifyDrawLoopExternal),
68
- makeNativeMethod (" notifyTaskReady" ,
69
- JniPlatformContext::notifyTaskReadyExternal),
70
66
});
71
67
}
72
68
@@ -134,51 +130,6 @@ sk_sp<SkImage> JniPlatformContext::takeScreenshotFromViewTag(size_t tag) {
134
130
return skImage;
135
131
}
136
132
137
- void JniPlatformContext::startDrawLoop () {
138
- jni::ThreadScope ts;
139
- // Start drawing loop
140
- static auto method =
141
- javaPart_->getClass ()->getMethod <void (void )>(" beginDrawLoop" );
142
- method (javaPart_.get ());
143
- }
144
-
145
- void JniPlatformContext::stopDrawLoop () {
146
- jni::ThreadScope ts;
147
- // Stop drawing loop
148
- static auto method =
149
- javaPart_->getClass ()->getMethod <void (void )>(" endDrawLoop" );
150
- method (javaPart_.get ());
151
- }
152
-
153
- void JniPlatformContext::notifyDrawLoopExternal () {
154
- jni::ThreadScope ts;
155
- _onNotifyDrawLoop ();
156
- }
157
-
158
- void JniPlatformContext::runTaskOnMainThread (std::function<void ()> task) {
159
- _taskMutex->lock ();
160
- _taskCallbacks.push (task);
161
- _taskMutex->unlock ();
162
-
163
- // Notify Java that task is ready
164
- static auto method = javaPart_->getClass ()->getMethod <void (void )>(
165
- " notifyTaskReadyOnMainThread" );
166
- method (javaPart_.get ());
167
- }
168
-
169
- void JniPlatformContext::notifyTaskReadyExternal () {
170
- jni::ThreadScope ts;
171
- _taskMutex->lock ();
172
- auto task = _taskCallbacks.front ();
173
- if (task != nullptr ) {
174
- _taskCallbacks.pop ();
175
- _taskMutex->unlock ();
176
- task ();
177
- } else {
178
- _taskMutex->unlock ();
179
- }
180
- }
181
-
182
133
void JniPlatformContext::performStreamOperation (
183
134
const std::string &sourceUri,
184
135
const std::function<void (std::unique_ptr<SkStreamAsset>)> &op) {
0 commit comments