Loading services/surfaceflinger/CompositionEngine/include/compositionengine/Output.h +3 −0 Original line number Diff line number Diff line Loading @@ -166,6 +166,9 @@ public: // Enables (or disables) layer caching on this output virtual void setLayerCachingEnabled(bool) = 0; // Enables (or disables) layer caching texture pool on this output virtual void setLayerCachingTexturePoolEnabled(bool) = 0; // Sets the projection state to use virtual void setProjection(ui::Rotation orientation, const Rect& layerStackSpaceRect, const Rect& orientedDisplaySpaceRect) = 0; Loading services/surfaceflinger/CompositionEngine/include/compositionengine/impl/Output.h +1 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ public: std::optional<DisplayId> getDisplayId() const override; void setCompositionEnabled(bool) override; void setLayerCachingEnabled(bool) override; void setLayerCachingTexturePoolEnabled(bool) override; void setProjection(ui::Rotation orientation, const Rect& layerStackSpaceRect, const Rect& orientedDisplaySpaceRect) override; void setDisplaySize(const ui::Size&) override; Loading services/surfaceflinger/CompositionEngine/include/compositionengine/impl/planner/Flattener.h +2 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,8 @@ public: void renderCachedSets(const OutputCompositionState& outputState, std::optional<std::chrono::steady_clock::time_point> renderDeadline); void setTexturePoolEnabled(bool enabled) { mTexturePool.setEnabled(enabled); } void dump(std::string& result) const; void dumpLayers(std::string& result) const; Loading services/surfaceflinger/CompositionEngine/include/compositionengine/impl/planner/Planner.h +2 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,8 @@ public: void renderCachedSets(const OutputCompositionState& outputState, std::optional<std::chrono::steady_clock::time_point> renderDeadline); void setTexturePoolEnabled(bool enabled) { mFlattener.setTexturePoolEnabled(enabled); } void dump(const Vector<String16>& args, std::string&); private: Loading services/surfaceflinger/CompositionEngine/include/compositionengine/impl/planner/TexturePool.h +10 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,8 @@ public: sp<Fence> mFence; }; TexturePool(renderengine::RenderEngine& renderEngine) : mRenderEngine(renderEngine) {} TexturePool(renderengine::RenderEngine& renderEngine) : mRenderEngine(renderEngine), mEnabled(false) {} virtual ~TexturePool() = default; Loading @@ -78,6 +79,12 @@ public: // to the pool. std::shared_ptr<AutoTexture> borrowTexture(); // Enables or disables the pool. When the pool is disabled, no buffers will // be held by the pool. This is useful when the active display changes. void setEnabled(bool enable); void dump(std::string& out) const; protected: // Proteted visibility so that they can be used for testing const static constexpr size_t kMinPoolSize = 3; Loading @@ -95,8 +102,10 @@ private: // Returns a previously borrowed texture to the pool. void returnTexture(std::shared_ptr<renderengine::ExternalTexture>&& texture, const sp<Fence>& fence); void allocatePool(); renderengine::RenderEngine& mRenderEngine; ui::Size mSize; bool mEnabled; }; } // namespace android::compositionengine::impl::planner Loading
services/surfaceflinger/CompositionEngine/include/compositionengine/Output.h +3 −0 Original line number Diff line number Diff line Loading @@ -166,6 +166,9 @@ public: // Enables (or disables) layer caching on this output virtual void setLayerCachingEnabled(bool) = 0; // Enables (or disables) layer caching texture pool on this output virtual void setLayerCachingTexturePoolEnabled(bool) = 0; // Sets the projection state to use virtual void setProjection(ui::Rotation orientation, const Rect& layerStackSpaceRect, const Rect& orientedDisplaySpaceRect) = 0; Loading
services/surfaceflinger/CompositionEngine/include/compositionengine/impl/Output.h +1 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ public: std::optional<DisplayId> getDisplayId() const override; void setCompositionEnabled(bool) override; void setLayerCachingEnabled(bool) override; void setLayerCachingTexturePoolEnabled(bool) override; void setProjection(ui::Rotation orientation, const Rect& layerStackSpaceRect, const Rect& orientedDisplaySpaceRect) override; void setDisplaySize(const ui::Size&) override; Loading
services/surfaceflinger/CompositionEngine/include/compositionengine/impl/planner/Flattener.h +2 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,8 @@ public: void renderCachedSets(const OutputCompositionState& outputState, std::optional<std::chrono::steady_clock::time_point> renderDeadline); void setTexturePoolEnabled(bool enabled) { mTexturePool.setEnabled(enabled); } void dump(std::string& result) const; void dumpLayers(std::string& result) const; Loading
services/surfaceflinger/CompositionEngine/include/compositionengine/impl/planner/Planner.h +2 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,8 @@ public: void renderCachedSets(const OutputCompositionState& outputState, std::optional<std::chrono::steady_clock::time_point> renderDeadline); void setTexturePoolEnabled(bool enabled) { mFlattener.setTexturePoolEnabled(enabled); } void dump(const Vector<String16>& args, std::string&); private: Loading
services/surfaceflinger/CompositionEngine/include/compositionengine/impl/planner/TexturePool.h +10 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,8 @@ public: sp<Fence> mFence; }; TexturePool(renderengine::RenderEngine& renderEngine) : mRenderEngine(renderEngine) {} TexturePool(renderengine::RenderEngine& renderEngine) : mRenderEngine(renderEngine), mEnabled(false) {} virtual ~TexturePool() = default; Loading @@ -78,6 +79,12 @@ public: // to the pool. std::shared_ptr<AutoTexture> borrowTexture(); // Enables or disables the pool. When the pool is disabled, no buffers will // be held by the pool. This is useful when the active display changes. void setEnabled(bool enable); void dump(std::string& out) const; protected: // Proteted visibility so that they can be used for testing const static constexpr size_t kMinPoolSize = 3; Loading @@ -95,8 +102,10 @@ private: // Returns a previously borrowed texture to the pool. void returnTexture(std::shared_ptr<renderengine::ExternalTexture>&& texture, const sp<Fence>& fence); void allocatePool(); renderengine::RenderEngine& mRenderEngine; ui::Size mSize; bool mEnabled; }; } // namespace android::compositionengine::impl::planner