John Reck | cec24ae | 2013-11-05 13:27:50 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2013 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 | #ifndef RENDERTHREAD_H_ |
| 18 | #define RENDERTHREAD_H_ |
| 19 | |
Adlai Holler | f8c434e | 2020-07-27 11:42:45 -0400 | [diff] [blame] | 20 | #include <GrDirectContext.h> |
Stan Iliev | aaa9e83 | 2019-09-17 14:07:23 -0400 | [diff] [blame] | 21 | #include <SkBitmap.h> |
| 22 | #include <cutils/compiler.h> |
John Reck | 5f66fb8 | 2022-09-23 17:49:23 -0400 | [diff] [blame] | 23 | #include <surface_control_private.h> |
Stan Iliev | aaa9e83 | 2019-09-17 14:07:23 -0400 | [diff] [blame] | 24 | #include <utils/Thread.h> |
| 25 | |
| 26 | #include <memory> |
| 27 | #include <mutex> |
| 28 | #include <set> |
John Reck | e45b1fd | 2014-04-15 09:50:16 -0700 | [diff] [blame] | 29 | |
Derek Sollenberger | f9e45d1 | 2017-06-01 13:07:39 -0400 | [diff] [blame] | 30 | #include "CacheManager.h" |
John Reck | 5f66fb8 | 2022-09-23 17:49:23 -0400 | [diff] [blame] | 31 | #include "MemoryPolicy.h" |
Fedor Kudasov | 85d6f10 | 2019-07-31 15:58:16 +0100 | [diff] [blame] | 32 | #include "ProfileDataContainer.h" |
Stan Iliev | aaa9e83 | 2019-09-17 14:07:23 -0400 | [diff] [blame] | 33 | #include "RenderTask.h" |
John Reck | ba6adf6 | 2015-02-19 14:36:50 -0800 | [diff] [blame] | 34 | #include "TimeLord.h" |
John Reck | 283bb46 | 2018-12-13 16:40:14 -0800 | [diff] [blame] | 35 | #include "WebViewFunctorManager.h" |
John Reck | 0fa0cbc | 2019-04-05 16:57:46 -0700 | [diff] [blame] | 36 | #include "thread/ThreadBase.h" |
John Reck | 3c0f563 | 2019-03-15 16:36:01 -0700 | [diff] [blame] | 37 | #include "utils/TimeUtils.h" |
John Reck | e45b1fd | 2014-04-15 09:50:16 -0700 | [diff] [blame] | 38 | |
John Reck | cec24ae | 2013-11-05 13:27:50 -0800 | [diff] [blame] | 39 | namespace android { |
John Reck | 3b20251 | 2014-06-23 13:13:08 -0700 | [diff] [blame] | 40 | |
Stan Iliev | 7bc3bc6 | 2017-05-24 13:28:36 -0400 | [diff] [blame] | 41 | class Bitmap; |
John Reck | e45b1fd | 2014-04-15 09:50:16 -0700 | [diff] [blame] | 42 | |
John Reck | cec24ae | 2013-11-05 13:27:50 -0800 | [diff] [blame] | 43 | namespace uirenderer { |
John Reck | 3b20251 | 2014-06-23 13:13:08 -0700 | [diff] [blame] | 44 | |
Stan Iliev | aaa9e83 | 2019-09-17 14:07:23 -0400 | [diff] [blame] | 45 | class AutoBackendTextureRelease; |
Derek Sollenberger | c4fbada | 2016-11-07 16:05:41 -0500 | [diff] [blame] | 46 | class Readback; |
John Reck | 3b20251 | 2014-06-23 13:13:08 -0700 | [diff] [blame] | 47 | class RenderState; |
Chris Craik | 0a24b14 | 2015-10-19 17:10:19 -0700 | [diff] [blame] | 48 | class TestUtils; |
John Reck | 3b20251 | 2014-06-23 13:13:08 -0700 | [diff] [blame] | 49 | |
Bo Liu | 7b8c1eb | 2019-01-08 20:17:55 -0800 | [diff] [blame] | 50 | namespace skiapipeline { |
| 51 | class VkFunctorDrawHandler; |
| 52 | } |
| 53 | |
Stan Iliev | 52e4392 | 2019-08-06 15:59:44 -0400 | [diff] [blame] | 54 | namespace VectorDrawable { |
| 55 | class Tree; |
| 56 | } |
| 57 | |
John Reck | cec24ae | 2013-11-05 13:27:50 -0800 | [diff] [blame] | 58 | namespace renderthread { |
| 59 | |
John Reck | 443a714 | 2014-09-04 17:40:05 -0700 | [diff] [blame] | 60 | class CanvasContext; |
John Reck | 3b20251 | 2014-06-23 13:13:08 -0700 | [diff] [blame] | 61 | class EglManager; |
| 62 | class RenderProxy; |
Derek Sollenberger | 0e3cba3 | 2016-11-09 11:58:36 -0500 | [diff] [blame] | 63 | class VulkanManager; |
John Reck | e45b1fd | 2014-04-15 09:50:16 -0700 | [diff] [blame] | 64 | |
John Reck | e45b1fd | 2014-04-15 09:50:16 -0700 | [diff] [blame] | 65 | // Mimics android.view.Choreographer.FrameCallback |
| 66 | class IFrameCallback { |
| 67 | public: |
John Reck | 18f16e6 | 2014-05-02 16:46:41 -0700 | [diff] [blame] | 68 | virtual void doFrame() = 0; |
John Reck | e45b1fd | 2014-04-15 09:50:16 -0700 | [diff] [blame] | 69 | |
| 70 | protected: |
Greg Kaiser | a95435b | 2018-08-23 16:58:18 -0700 | [diff] [blame] | 71 | virtual ~IFrameCallback() {} |
John Reck | e45b1fd | 2014-04-15 09:50:16 -0700 | [diff] [blame] | 72 | }; |
| 73 | |
John Reck | 5642847 | 2018-03-16 17:27:17 -0700 | [diff] [blame] | 74 | struct VsyncSource { |
| 75 | virtual void requestNextVsync() = 0; |
Alec Mouri | 4a818f1 | 2019-11-19 16:17:53 -0800 | [diff] [blame] | 76 | virtual void drainPendingEvents() = 0; |
John Reck | 5642847 | 2018-03-16 17:27:17 -0700 | [diff] [blame] | 77 | virtual ~VsyncSource() {} |
| 78 | }; |
| 79 | |
Huihong Luo | 054b8d3 | 2021-02-24 18:48:12 -0800 | [diff] [blame] | 80 | typedef ASurfaceControl* (*ASC_create)(ASurfaceControl* parent, const char* debug_name); |
Huihong Luo | 5fdf7b8 | 2021-01-15 14:27:06 -0800 | [diff] [blame] | 81 | typedef void (*ASC_acquire)(ASurfaceControl* control); |
| 82 | typedef void (*ASC_release)(ASurfaceControl* control); |
| 83 | |
Pablo Gamito | bc9e529 | 2021-08-23 17:12:29 +0200 | [diff] [blame] | 84 | typedef void (*ASC_registerSurfaceStatsListener)(ASurfaceControl* control, int32_t id, |
| 85 | void* context, |
| 86 | ASurfaceControl_SurfaceStatsListener func); |
Jorim Jaggi | 71db889 | 2021-02-03 23:19:29 +0100 | [diff] [blame] | 87 | typedef void (*ASC_unregisterSurfaceStatsListener)(void* context, |
Huihong Luo | 054b8d3 | 2021-02-24 18:48:12 -0800 | [diff] [blame] | 88 | ASurfaceControl_SurfaceStatsListener func); |
Jorim Jaggi | 71db889 | 2021-02-03 23:19:29 +0100 | [diff] [blame] | 89 | |
| 90 | typedef int64_t (*ASCStats_getAcquireTime)(ASurfaceControlStats* stats); |
| 91 | typedef uint64_t (*ASCStats_getFrameNumber)(ASurfaceControlStats* stats); |
| 92 | |
Huihong Luo | 054b8d3 | 2021-02-24 18:48:12 -0800 | [diff] [blame] | 93 | typedef ASurfaceTransaction* (*AST_create)(); |
| 94 | typedef void (*AST_delete)(ASurfaceTransaction* transaction); |
| 95 | typedef void (*AST_apply)(ASurfaceTransaction* transaction); |
Huihong Luo | 540fdf8 | 2021-06-25 13:59:39 -0700 | [diff] [blame] | 96 | typedef void (*AST_reparent)(ASurfaceTransaction* aSurfaceTransaction, |
| 97 | ASurfaceControl* aSurfaceControl, |
| 98 | ASurfaceControl* newParentASurfaceControl); |
Huihong Luo | 054b8d3 | 2021-02-24 18:48:12 -0800 | [diff] [blame] | 99 | typedef void (*AST_setVisibility)(ASurfaceTransaction* transaction, |
| 100 | ASurfaceControl* surface_control, int8_t visibility); |
Huihong Luo | 34f42fd | 2021-05-03 14:47:36 -0700 | [diff] [blame] | 101 | typedef void (*AST_setZOrder)(ASurfaceTransaction* transaction, ASurfaceControl* surface_control, |
| 102 | int32_t z_order); |
Huihong Luo | 054b8d3 | 2021-02-24 18:48:12 -0800 | [diff] [blame] | 103 | |
Huihong Luo | 5fdf7b8 | 2021-01-15 14:27:06 -0800 | [diff] [blame] | 104 | struct ASurfaceControlFunctions { |
| 105 | ASurfaceControlFunctions(); |
Huihong Luo | 054b8d3 | 2021-02-24 18:48:12 -0800 | [diff] [blame] | 106 | |
| 107 | ASC_create createFunc; |
Huihong Luo | 5fdf7b8 | 2021-01-15 14:27:06 -0800 | [diff] [blame] | 108 | ASC_acquire acquireFunc; |
| 109 | ASC_release releaseFunc; |
Jorim Jaggi | 71db889 | 2021-02-03 23:19:29 +0100 | [diff] [blame] | 110 | ASC_registerSurfaceStatsListener registerListenerFunc; |
| 111 | ASC_unregisterSurfaceStatsListener unregisterListenerFunc; |
| 112 | ASCStats_getAcquireTime getAcquireTimeFunc; |
| 113 | ASCStats_getFrameNumber getFrameNumberFunc; |
Huihong Luo | 054b8d3 | 2021-02-24 18:48:12 -0800 | [diff] [blame] | 114 | |
| 115 | AST_create transactionCreateFunc; |
| 116 | AST_delete transactionDeleteFunc; |
| 117 | AST_apply transactionApplyFunc; |
Huihong Luo | 540fdf8 | 2021-06-25 13:59:39 -0700 | [diff] [blame] | 118 | AST_reparent transactionReparentFunc; |
Huihong Luo | 054b8d3 | 2021-02-24 18:48:12 -0800 | [diff] [blame] | 119 | AST_setVisibility transactionSetVisibilityFunc; |
Huihong Luo | 34f42fd | 2021-05-03 14:47:36 -0700 | [diff] [blame] | 120 | AST_setZOrder transactionSetZOrderFunc; |
Huihong Luo | 5fdf7b8 | 2021-01-15 14:27:06 -0800 | [diff] [blame] | 121 | }; |
| 122 | |
Alec Mouri | 4a818f1 | 2019-11-19 16:17:53 -0800 | [diff] [blame] | 123 | class ChoreographerSource; |
John Reck | 5642847 | 2018-03-16 17:27:17 -0700 | [diff] [blame] | 124 | class DummyVsyncSource; |
| 125 | |
Stan Iliev | 978d532 | 2019-02-06 12:02:28 -0500 | [diff] [blame] | 126 | typedef void (*JVMAttachHook)(const char* name); |
Stan Iliev | 80dbc35 | 2019-02-05 15:31:28 -0500 | [diff] [blame] | 127 | |
John Reck | f8441e6 | 2017-10-23 13:10:41 -0700 | [diff] [blame] | 128 | class RenderThread : private ThreadBase { |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 129 | PREVENT_COPY_AND_ASSIGN(RenderThread); |
John Reck | f8441e6 | 2017-10-23 13:10:41 -0700 | [diff] [blame] | 130 | |
John Reck | 1bcacfd | 2017-11-03 10:12:19 -0700 | [diff] [blame] | 131 | public: |
John Reck | 8785ceb | 2018-10-29 16:45:58 -0700 | [diff] [blame] | 132 | // Sets a callback that fires before any RenderThread setup has occurred. |
Derek Sollenberger | 3fedf5a | 2020-02-21 13:07:28 -0500 | [diff] [blame] | 133 | static void setOnStartHook(JVMAttachHook onStartHook); |
Stan Iliev | 80dbc35 | 2019-02-05 15:31:28 -0500 | [diff] [blame] | 134 | static JVMAttachHook getOnStartHook(); |
John Reck | 259b25a | 2017-12-01 16:18:53 -0800 | [diff] [blame] | 135 | |
John Reck | f8441e6 | 2017-10-23 13:10:41 -0700 | [diff] [blame] | 136 | WorkQueue& queue() { return ThreadBase::queue(); } |
John Reck | cec24ae | 2013-11-05 13:27:50 -0800 | [diff] [blame] | 137 | |
John Reck | e45b1fd | 2014-04-15 09:50:16 -0700 | [diff] [blame] | 138 | // Mimics android.view.Choreographer |
| 139 | void postFrameCallback(IFrameCallback* callback); |
John Reck | 01a5ea3 | 2014-12-03 13:01:07 -0800 | [diff] [blame] | 140 | bool removeFrameCallback(IFrameCallback* callback); |
John Reck | a5dda64 | 2014-05-22 15:43:54 -0700 | [diff] [blame] | 141 | // If the callback is currently registered, it will be pushed back until |
| 142 | // the next vsync. If it is not currently registered this does nothing. |
| 143 | void pushBackFrameCallback(IFrameCallback* callback); |
John Reck | e45b1fd | 2014-04-15 09:50:16 -0700 | [diff] [blame] | 144 | |
John Reck | 18f16e6 | 2014-05-02 16:46:41 -0700 | [diff] [blame] | 145 | TimeLord& timeLord() { return mTimeLord; } |
Derek Sollenberger | daf7229 | 2016-10-25 12:09:18 -0400 | [diff] [blame] | 146 | RenderState& renderState() const { return *mRenderState; } |
| 147 | EglManager& eglManager() const { return *mEglManager; } |
John Reck | 34781b2 | 2017-07-05 16:39:36 -0700 | [diff] [blame] | 148 | ProfileDataContainer& globalProfileData() { return mGlobalProfileData; } |
Jorim Jaggi | 71db889 | 2021-02-03 23:19:29 +0100 | [diff] [blame] | 149 | std::mutex& getJankDataMutex() { return mJankDataMutex; } |
Derek Sollenberger | c4fbada | 2016-11-07 16:05:41 -0500 | [diff] [blame] | 150 | Readback& readback(); |
John Reck | 18f16e6 | 2014-05-02 16:46:41 -0700 | [diff] [blame] | 151 | |
Adlai Holler | f8c434e | 2020-07-27 11:42:45 -0400 | [diff] [blame] | 152 | GrDirectContext* getGrContext() const { return mGrContext.get(); } |
| 153 | void setGrContext(sk_sp<GrDirectContext> cxt); |
John Reck | 2abc549 | 2021-05-18 00:34:26 -0400 | [diff] [blame] | 154 | sk_sp<GrDirectContext> requireGrContext(); |
Derek Sollenberger | 98f75d5 | 2016-10-25 10:25:45 -0400 | [diff] [blame] | 155 | |
Derek Sollenberger | f9e45d1 | 2017-06-01 13:07:39 -0400 | [diff] [blame] | 156 | CacheManager& cacheManager() { return *mCacheManager; } |
Derek Sollenberger | 802fefa | 2020-08-13 16:53:30 -0400 | [diff] [blame] | 157 | VulkanManager& vulkanManager(); |
Derek Sollenberger | 0e3cba3 | 2016-11-09 11:58:36 -0500 | [diff] [blame] | 158 | |
Stan Iliev | 7bc3bc6 | 2017-05-24 13:28:36 -0400 | [diff] [blame] | 159 | sk_sp<Bitmap> allocateHardwareBitmap(SkBitmap& skBitmap); |
John Reck | 66e06d4 | 2021-05-11 17:04:54 -0400 | [diff] [blame] | 160 | void dumpGraphicsMemory(int fd, bool includeProfileData); |
John Reck | 3920768 | 2021-05-12 19:10:47 -0400 | [diff] [blame] | 161 | void getMemoryUsage(size_t* cpuUsage, size_t* gpuUsage); |
Stan Iliev | 7bc3bc6 | 2017-05-24 13:28:36 -0400 | [diff] [blame] | 162 | |
John Reck | 1e51071 | 2018-04-23 08:15:03 -0700 | [diff] [blame] | 163 | void requireGlContext(); |
Stan Iliev | 981afe7 | 2019-02-13 14:24:33 -0500 | [diff] [blame] | 164 | void requireVkContext(); |
John Reck | 283bb46 | 2018-12-13 16:40:14 -0800 | [diff] [blame] | 165 | void destroyRenderingContext(); |
John Reck | 1e51071 | 2018-04-23 08:15:03 -0700 | [diff] [blame] | 166 | |
Stan Iliev | 898123b | 2019-02-14 14:57:44 -0500 | [diff] [blame] | 167 | void preload(); |
| 168 | |
Huihong Luo | 5fdf7b8 | 2021-01-15 14:27:06 -0800 | [diff] [blame] | 169 | const ASurfaceControlFunctions& getASurfaceControlFunctions() { |
| 170 | return mASurfaceControlFunctions; |
| 171 | } |
| 172 | |
John Reck | 5f66fb8 | 2022-09-23 17:49:23 -0400 | [diff] [blame] | 173 | void trimMemory(TrimLevel level); |
Jernej Virag | 44db040 | 2023-05-09 20:24:48 +0200 | [diff] [blame] | 174 | void trimCaches(CacheTrimLevel level); |
John Reck | 5f66fb8 | 2022-09-23 17:49:23 -0400 | [diff] [blame] | 175 | |
Stan Iliev | 6b894d7 | 2017-08-23 12:41:41 -0400 | [diff] [blame] | 176 | /** |
| 177 | * isCurrent provides a way to query, if the caller is running on |
| 178 | * the render thread. |
| 179 | * |
| 180 | * @return true only if isCurrent is invoked from the render thread. |
| 181 | */ |
| 182 | static bool isCurrent(); |
| 183 | |
Stan Iliev | 981afe7 | 2019-02-13 14:24:33 -0500 | [diff] [blame] | 184 | static void initGrContextOptions(GrContextOptions& options); |
| 185 | |
John Reck | cec24ae | 2013-11-05 13:27:50 -0800 | [diff] [blame] | 186 | protected: |
Chris Craik | d41c4d8 | 2015-01-05 15:51:13 -0800 | [diff] [blame] | 187 | virtual bool threadLoop() override; |
John Reck | cec24ae | 2013-11-05 13:27:50 -0800 | [diff] [blame] | 188 | |
| 189 | private: |
John Reck | e45b1fd | 2014-04-15 09:50:16 -0700 | [diff] [blame] | 190 | friend class DispatchFrameCallbacks; |
John Reck | 3b20251 | 2014-06-23 13:13:08 -0700 | [diff] [blame] | 191 | friend class RenderProxy; |
John Reck | 5642847 | 2018-03-16 17:27:17 -0700 | [diff] [blame] | 192 | friend class DummyVsyncSource; |
Alec Mouri | 4a818f1 | 2019-11-19 16:17:53 -0800 | [diff] [blame] | 193 | friend class ChoreographerSource; |
Stan Iliev | aaa9e83 | 2019-09-17 14:07:23 -0400 | [diff] [blame] | 194 | friend class android::uirenderer::AutoBackendTextureRelease; |
Chris Craik | 0a24b14 | 2015-10-19 17:10:19 -0700 | [diff] [blame] | 195 | friend class android::uirenderer::TestUtils; |
Bo Liu | 1b0278c | 2019-01-03 16:36:24 -0800 | [diff] [blame] | 196 | friend class android::uirenderer::WebViewFunctor; |
Bo Liu | 7b8c1eb | 2019-01-08 20:17:55 -0800 | [diff] [blame] | 197 | friend class android::uirenderer::skiapipeline::VkFunctorDrawHandler; |
Stan Iliev | 52e4392 | 2019-08-06 15:59:44 -0400 | [diff] [blame] | 198 | friend class android::uirenderer::VectorDrawable::Tree; |
Steven Moreland | 76ec382 | 2021-04-02 16:26:03 +0000 | [diff] [blame] | 199 | friend class sp<RenderThread>; |
John Reck | cec24ae | 2013-11-05 13:27:50 -0800 | [diff] [blame] | 200 | |
| 201 | RenderThread(); |
| 202 | virtual ~RenderThread(); |
| 203 | |
John Reck | 6b50780 | 2015-11-03 10:09:59 -0800 | [diff] [blame] | 204 | static bool hasInstance(); |
| 205 | static RenderThread& getInstance(); |
| 206 | |
John Reck | 3b20251 | 2014-06-23 13:13:08 -0700 | [diff] [blame] | 207 | void initThreadLocals(); |
Alec Mouri | 4a818f1 | 2019-11-19 16:17:53 -0800 | [diff] [blame] | 208 | void initializeChoreographer(); |
John Reck | cf185f5 | 2019-04-11 16:11:24 -0700 | [diff] [blame] | 209 | void setupFrameInterval(); |
Alec Mouri | 4a818f1 | 2019-11-19 16:17:53 -0800 | [diff] [blame] | 210 | // Callbacks for choreographer events: |
| 211 | // choreographerCallback will call AChoreograper_handleEvent to call the |
| 212 | // corresponding callbacks for each display event type |
| 213 | static int choreographerCallback(int fd, int events, void* data); |
| 214 | // Callback that will be run on vsync ticks. |
Rachel Lee | 432b691 | 2021-09-01 13:21:44 -0700 | [diff] [blame] | 215 | static void extendedFrameCallback(const AChoreographerFrameCallbackData* cbData, void* data); |
| 216 | void frameCallback(int64_t vsyncId, int64_t frameDeadline, int64_t frameTimeNanos, |
| 217 | int64_t frameInterval); |
Alec Mouri | 4a818f1 | 2019-11-19 16:17:53 -0800 | [diff] [blame] | 218 | // Callback that will be run whenver there is a refresh rate change. |
| 219 | static void refreshRateCallback(int64_t vsyncPeriod, void* data); |
John Reck | a733f89 | 2014-12-19 11:37:21 -0800 | [diff] [blame] | 220 | void drainDisplayEventQueue(); |
John Reck | e45b1fd | 2014-04-15 09:50:16 -0700 | [diff] [blame] | 221 | void dispatchFrameCallbacks(); |
John Reck | a5dda64 | 2014-05-22 15:43:54 -0700 | [diff] [blame] | 222 | void requestVsync(); |
John Reck | e45b1fd | 2014-04-15 09:50:16 -0700 | [diff] [blame] | 223 | |
Alec Mouri | 4a818f1 | 2019-11-19 16:17:53 -0800 | [diff] [blame] | 224 | AChoreographer* mChoreographer; |
John Reck | 5642847 | 2018-03-16 17:27:17 -0700 | [diff] [blame] | 225 | VsyncSource* mVsyncSource; |
John Reck | e45b1fd | 2014-04-15 09:50:16 -0700 | [diff] [blame] | 226 | bool mVsyncRequested; |
| 227 | std::set<IFrameCallback*> mFrameCallbacks; |
John Reck | a5dda64 | 2014-05-22 15:43:54 -0700 | [diff] [blame] | 228 | // We defer the actual registration of these callbacks until |
| 229 | // both mQueue *and* mDisplayEventReceiver have been drained off all |
| 230 | // immediate events. This makes sure that we catch the next vsync, not |
| 231 | // the previous one |
| 232 | std::set<IFrameCallback*> mPendingRegistrationFrameCallbacks; |
John Reck | e45b1fd | 2014-04-15 09:50:16 -0700 | [diff] [blame] | 233 | bool mFrameCallbackTaskPending; |
John Reck | 18f16e6 | 2014-05-02 16:46:41 -0700 | [diff] [blame] | 234 | |
| 235 | TimeLord mTimeLord; |
John Reck | 3b20251 | 2014-06-23 13:13:08 -0700 | [diff] [blame] | 236 | RenderState* mRenderState; |
| 237 | EglManager* mEglManager; |
John Reck | 283bb46 | 2018-12-13 16:40:14 -0800 | [diff] [blame] | 238 | WebViewFunctorManager& mFunctorManager; |
John Reck | ba6adf6 | 2015-02-19 14:36:50 -0800 | [diff] [blame] | 239 | |
John Reck | 34781b2 | 2017-07-05 16:39:36 -0700 | [diff] [blame] | 240 | ProfileDataContainer mGlobalProfileData; |
Derek Sollenberger | c4fbada | 2016-11-07 16:05:41 -0500 | [diff] [blame] | 241 | Readback* mReadback = nullptr; |
Derek Sollenberger | 98f75d5 | 2016-10-25 10:25:45 -0400 | [diff] [blame] | 242 | |
Adlai Holler | f8c434e | 2020-07-27 11:42:45 -0400 | [diff] [blame] | 243 | sk_sp<GrDirectContext> mGrContext; |
Derek Sollenberger | f9e45d1 | 2017-06-01 13:07:39 -0400 | [diff] [blame] | 244 | CacheManager* mCacheManager; |
Derek Sollenberger | 802fefa | 2020-08-13 16:53:30 -0400 | [diff] [blame] | 245 | sp<VulkanManager> mVkManager; |
Huihong Luo | 5fdf7b8 | 2021-01-15 14:27:06 -0800 | [diff] [blame] | 246 | |
| 247 | ASurfaceControlFunctions mASurfaceControlFunctions; |
Jorim Jaggi | 71db889 | 2021-02-03 23:19:29 +0100 | [diff] [blame] | 248 | std::mutex mJankDataMutex; |
John Reck | cec24ae | 2013-11-05 13:27:50 -0800 | [diff] [blame] | 249 | }; |
| 250 | |
| 251 | } /* namespace renderthread */ |
| 252 | } /* namespace uirenderer */ |
| 253 | } /* namespace android */ |
| 254 | #endif /* RENDERTHREAD_H_ */ |