1 /*
2 * Copyright (C) 2024 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #include "WebViewFunctorManager.h"
18
19 namespace android::uirenderer {
20
WebViewFunctor(void * data,const WebViewFunctorCallbacks & callbacks,RenderMode functorMode)21 WebViewFunctor::WebViewFunctor(void* data, const WebViewFunctorCallbacks& callbacks,
22 RenderMode functorMode)
23 : mData(data) {}
24
~WebViewFunctor()25 WebViewFunctor::~WebViewFunctor() {}
26
sync(const WebViewSyncData & syncData) const27 void WebViewFunctor::sync(const WebViewSyncData& syncData) const {}
28
onRemovedFromTree()29 void WebViewFunctor::onRemovedFromTree() {}
30
prepareRootSurfaceControl()31 bool WebViewFunctor::prepareRootSurfaceControl() {
32 return true;
33 }
34
drawGl(const DrawGlInfo & drawInfo)35 void WebViewFunctor::drawGl(const DrawGlInfo& drawInfo) {}
36
initVk(const VkFunctorInitParams & params)37 void WebViewFunctor::initVk(const VkFunctorInitParams& params) {}
38
drawVk(const VkFunctorDrawParams & params)39 void WebViewFunctor::drawVk(const VkFunctorDrawParams& params) {}
40
postDrawVk()41 void WebViewFunctor::postDrawVk() {}
42
destroyContext()43 void WebViewFunctor::destroyContext() {}
44
removeOverlays()45 void WebViewFunctor::removeOverlays() {}
46
getSurfaceControl()47 ASurfaceControl* WebViewFunctor::getSurfaceControl() {
48 return mSurfaceControl;
49 }
50
mergeTransaction(ASurfaceTransaction * transaction)51 void WebViewFunctor::mergeTransaction(ASurfaceTransaction* transaction) {}
52
reportRenderingThreads(const pid_t * thread_ids,size_t size)53 void WebViewFunctor::reportRenderingThreads(const pid_t* thread_ids, size_t size) {}
54
reparentSurfaceControl(ASurfaceControl * parent)55 void WebViewFunctor::reparentSurfaceControl(ASurfaceControl* parent) {}
56
instance()57 WebViewFunctorManager& WebViewFunctorManager::instance() {
58 static WebViewFunctorManager sInstance;
59 return sInstance;
60 }
61
createFunctor(void * data,const WebViewFunctorCallbacks & callbacks,RenderMode functorMode)62 int WebViewFunctorManager::createFunctor(void* data, const WebViewFunctorCallbacks& callbacks,
63 RenderMode functorMode) {
64 return 0;
65 }
66
releaseFunctor(int functor)67 void WebViewFunctorManager::releaseFunctor(int functor) {}
68
onContextDestroyed()69 void WebViewFunctorManager::onContextDestroyed() {}
70
destroyFunctor(int functor)71 void WebViewFunctorManager::destroyFunctor(int functor) {}
72
reportRenderingThreads(int functor,const pid_t * thread_ids,size_t size)73 void WebViewFunctorManager::reportRenderingThreads(int functor, const pid_t* thread_ids,
74 size_t size) {}
75
getRenderingThreadsForActiveFunctors()76 std::vector<pid_t> WebViewFunctorManager::getRenderingThreadsForActiveFunctors() {
77 return {};
78 }
79
handleFor(int functor)80 sp<WebViewFunctor::Handle> WebViewFunctorManager::handleFor(int functor) {
81 return nullptr;
82 }
83
84 } // namespace android::uirenderer
85