Loading libs/gui/ISurfaceComposer.cpp +21 −0 Original line number Diff line number Diff line Loading @@ -1230,6 +1230,21 @@ public: return remote()->transact(BnSurfaceComposer::ADD_TRANSACTION_TRACE_LISTENER, data, &reply); } /** * Get priority of the RenderEngine in surface flinger. */ virtual int getGPUContextPriority() { Parcel data, reply; data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); status_t err = remote()->transact(BnSurfaceComposer::GET_GPU_CONTEXT_PRIORITY, data, &reply); if (err != NO_ERROR) { ALOGE("getGPUContextPriority failed to read data: %s (%d)", strerror(-err), err); return 0; } return reply.readInt32(); } }; // Out-of-line virtual method definition to trigger vtable emission in this Loading Loading @@ -2094,6 +2109,12 @@ status_t BnSurfaceComposer::onTransact( return addTransactionTraceListener(listener); } case GET_GPU_CONTEXT_PRIORITY: { CHECK_INTERFACE(ISurfaceComposer, data, reply); int priority = getGPUContextPriority(); SAFE_PARCEL(reply->writeInt32, priority); return NO_ERROR; } default: { return BBinder::onTransact(code, data, reply, flags); } Loading libs/gui/SurfaceComposerClient.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -1988,6 +1988,10 @@ status_t SurfaceComposerClient::setGlobalShadowSettings(const half4& ambientColo lightRadius); } int SurfaceComposerClient::getGPUContextPriority() { return ComposerService::getComposerService()->getGPUContextPriority(); } // ---------------------------------------------------------------------------- status_t ScreenshotClient::captureDisplay(const DisplayCaptureArgs& captureArgs, Loading libs/gui/include/gui/ISurfaceComposer.h +6 −0 Original line number Diff line number Diff line Loading @@ -504,6 +504,11 @@ public: */ virtual status_t addTransactionTraceListener( const sp<gui::ITransactionTraceListener>& listener) = 0; /** * Gets priority of the RenderEngine in SurfaceFlinger. */ virtual int getGPUContextPriority() = 0; }; // ---------------------------------------------------------------------------- Loading Loading @@ -565,6 +570,7 @@ public: ACQUIRE_FRAME_RATE_FLEXIBILITY_TOKEN, SET_FRAME_TIMELINE_VSYNC, ADD_TRANSACTION_TRACE_LISTENER, GET_GPU_CONTEXT_PRIORITY, // Always append new enum to the end. }; Loading libs/gui/include/gui/SurfaceComposerClient.h +5 −0 Original line number Diff line number Diff line Loading @@ -184,6 +184,11 @@ public: */ static bool getProtectedContentSupport(); /** * Gets the context priority of surface flinger's render engine. */ static int getGPUContextPriority(); /** * Uncaches a buffer in ISurfaceComposer. It must be uncached via a transaction so that it is * in order with other transactions that use buffers. Loading libs/gui/tests/Surface_test.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -887,6 +887,8 @@ public: return NO_ERROR; } int getGPUContextPriority() override { return 0; }; protected: IBinder* onAsBinder() override { return nullptr; } Loading Loading
libs/gui/ISurfaceComposer.cpp +21 −0 Original line number Diff line number Diff line Loading @@ -1230,6 +1230,21 @@ public: return remote()->transact(BnSurfaceComposer::ADD_TRANSACTION_TRACE_LISTENER, data, &reply); } /** * Get priority of the RenderEngine in surface flinger. */ virtual int getGPUContextPriority() { Parcel data, reply; data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); status_t err = remote()->transact(BnSurfaceComposer::GET_GPU_CONTEXT_PRIORITY, data, &reply); if (err != NO_ERROR) { ALOGE("getGPUContextPriority failed to read data: %s (%d)", strerror(-err), err); return 0; } return reply.readInt32(); } }; // Out-of-line virtual method definition to trigger vtable emission in this Loading Loading @@ -2094,6 +2109,12 @@ status_t BnSurfaceComposer::onTransact( return addTransactionTraceListener(listener); } case GET_GPU_CONTEXT_PRIORITY: { CHECK_INTERFACE(ISurfaceComposer, data, reply); int priority = getGPUContextPriority(); SAFE_PARCEL(reply->writeInt32, priority); return NO_ERROR; } default: { return BBinder::onTransact(code, data, reply, flags); } Loading
libs/gui/SurfaceComposerClient.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -1988,6 +1988,10 @@ status_t SurfaceComposerClient::setGlobalShadowSettings(const half4& ambientColo lightRadius); } int SurfaceComposerClient::getGPUContextPriority() { return ComposerService::getComposerService()->getGPUContextPriority(); } // ---------------------------------------------------------------------------- status_t ScreenshotClient::captureDisplay(const DisplayCaptureArgs& captureArgs, Loading
libs/gui/include/gui/ISurfaceComposer.h +6 −0 Original line number Diff line number Diff line Loading @@ -504,6 +504,11 @@ public: */ virtual status_t addTransactionTraceListener( const sp<gui::ITransactionTraceListener>& listener) = 0; /** * Gets priority of the RenderEngine in SurfaceFlinger. */ virtual int getGPUContextPriority() = 0; }; // ---------------------------------------------------------------------------- Loading Loading @@ -565,6 +570,7 @@ public: ACQUIRE_FRAME_RATE_FLEXIBILITY_TOKEN, SET_FRAME_TIMELINE_VSYNC, ADD_TRANSACTION_TRACE_LISTENER, GET_GPU_CONTEXT_PRIORITY, // Always append new enum to the end. }; Loading
libs/gui/include/gui/SurfaceComposerClient.h +5 −0 Original line number Diff line number Diff line Loading @@ -184,6 +184,11 @@ public: */ static bool getProtectedContentSupport(); /** * Gets the context priority of surface flinger's render engine. */ static int getGPUContextPriority(); /** * Uncaches a buffer in ISurfaceComposer. It must be uncached via a transaction so that it is * in order with other transactions that use buffers. Loading
libs/gui/tests/Surface_test.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -887,6 +887,8 @@ public: return NO_ERROR; } int getGPUContextPriority() override { return 0; }; protected: IBinder* onAsBinder() override { return nullptr; } Loading