Loading libs/gui/include/gui/LayerState.h +1 −1 Original line number Diff line number Diff line Loading @@ -133,7 +133,7 @@ struct layer_state_t { eLayerOpaque = 0x02, // SURFACE_OPAQUE eLayerSkipScreenshot = 0x40, // SKIP_SCREENSHOT eLayerSecure = 0x80, // SECURE // Queue up BufferStateLayer buffers instead of dropping the oldest buffer when this flag is // Queue up layer buffers instead of dropping the oldest buffer when this flag is // set. This blocks the client until all the buffers have been presented. If the buffers // have presentation timestamps, then we may drop buffers. eEnableBackpressure = 0x100, // ENABLE_BACKPRESSURE Loading libs/ui/include/ui/GraphicBuffer.h +1 −1 Original line number Diff line number Diff line Loading @@ -270,7 +270,7 @@ private: // Send a callback when a GraphicBuffer dies. // // This is used for BufferStateLayer caching. GraphicBuffers are refcounted per process. When // This is used for layer caching. GraphicBuffers are refcounted per process. When // A GraphicBuffer doesn't have any more sp<> in a process, it is destroyed. This causes // problems when trying to implicitcly cache across process boundaries. Ideally, both sides // of the cache would hold onto wp<> references. When an app dropped its sp<>, the GraphicBuffer Loading services/surfaceflinger/BufferStateLayer.hdeleted 100644 → 0 +0 −28 Original line number Diff line number Diff line /* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include "Layer.h" namespace android { class BufferStateLayer : public Layer { public: explicit BufferStateLayer(const LayerCreationArgs& args) : Layer(args){}; }; } // namespace android services/surfaceflinger/Layer.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -65,7 +65,6 @@ #include <mutex> #include <sstream> #include "BufferStateLayer.h" #include "DisplayDevice.h" #include "DisplayHardware/HWComposer.h" #include "FrameTimeline.h" Loading Loading @@ -871,7 +870,7 @@ void Layer::prepareBufferStateClientComposition( float bufferWidth = getBufferSize(s).getWidth(); float bufferHeight = getBufferSize(s).getHeight(); // BufferStateLayers can have a "buffer size" of [0, 0, -1, -1] when no display frame has // Layers can have a "buffer size" of [0, 0, -1, -1] when no display frame has // been set and there is no parent layer bounds. In that case, the scale is meaningless so // ignore them. if (!getBufferSize(s).isValid()) { Loading Loading @@ -3538,7 +3537,7 @@ Rect Layer::computeBufferCrop(const State& s) { sp<Layer> Layer::createClone() { LayerCreationArgs args(mFlinger.get(), nullptr, mName + " (Mirror)", 0, LayerMetadata()); args.textureName = mTextureName; sp<BufferStateLayer> layer = mFlinger->getFactory().createBufferStateLayer(args); sp<Layer> layer = mFlinger->getFactory().createBufferStateLayer(args); layer->mHwcSlotGenerator = mHwcSlotGenerator; layer->setInitialValuesForClone(sp<Layer>::fromExisting(this)); return layer; Loading services/surfaceflinger/Scheduler/Scheduler.h +5 −5 Original line number Diff line number Diff line Loading @@ -95,8 +95,8 @@ protected: ~ISchedulerCallback() = default; }; class Scheduler : impl::MessageQueue { using Impl = impl::MessageQueue; class Scheduler : android::impl::MessageQueue { using Impl = android::impl::MessageQueue; public: Scheduler(ICompositor&, ISchedulerCallback&, FeatureFlags); Loading Loading @@ -130,7 +130,7 @@ public: ConnectionHandle createConnection(const char* connectionName, frametimeline::TokenManager*, std::chrono::nanoseconds workDuration, std::chrono::nanoseconds readyDuration, impl::EventThread::InterceptVSyncsCallback); android::impl::EventThread::InterceptVSyncsCallback); sp<IDisplayEventConnection> createDisplayEventConnection( ConnectionHandle, EventRegistrationFlags eventRegistration = {}); Loading Loading @@ -278,9 +278,9 @@ private: void dispatchCachedReportedMode() REQUIRES(mPolicyLock) EXCLUDES(mRefreshRateConfigsLock); impl::EventThread::ThrottleVsyncCallback makeThrottleVsyncCallback() const android::impl::EventThread::ThrottleVsyncCallback makeThrottleVsyncCallback() const EXCLUDES(mRefreshRateConfigsLock); impl::EventThread::GetVsyncPeriodFunction makeGetVsyncPeriodFunction() const; android::impl::EventThread::GetVsyncPeriodFunction makeGetVsyncPeriodFunction() const; std::shared_ptr<RefreshRateConfigs> holdRefreshRateConfigs() const EXCLUDES(mRefreshRateConfigsLock) { Loading Loading
libs/gui/include/gui/LayerState.h +1 −1 Original line number Diff line number Diff line Loading @@ -133,7 +133,7 @@ struct layer_state_t { eLayerOpaque = 0x02, // SURFACE_OPAQUE eLayerSkipScreenshot = 0x40, // SKIP_SCREENSHOT eLayerSecure = 0x80, // SECURE // Queue up BufferStateLayer buffers instead of dropping the oldest buffer when this flag is // Queue up layer buffers instead of dropping the oldest buffer when this flag is // set. This blocks the client until all the buffers have been presented. If the buffers // have presentation timestamps, then we may drop buffers. eEnableBackpressure = 0x100, // ENABLE_BACKPRESSURE Loading
libs/ui/include/ui/GraphicBuffer.h +1 −1 Original line number Diff line number Diff line Loading @@ -270,7 +270,7 @@ private: // Send a callback when a GraphicBuffer dies. // // This is used for BufferStateLayer caching. GraphicBuffers are refcounted per process. When // This is used for layer caching. GraphicBuffers are refcounted per process. When // A GraphicBuffer doesn't have any more sp<> in a process, it is destroyed. This causes // problems when trying to implicitcly cache across process boundaries. Ideally, both sides // of the cache would hold onto wp<> references. When an app dropped its sp<>, the GraphicBuffer Loading
services/surfaceflinger/BufferStateLayer.hdeleted 100644 → 0 +0 −28 Original line number Diff line number Diff line /* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include "Layer.h" namespace android { class BufferStateLayer : public Layer { public: explicit BufferStateLayer(const LayerCreationArgs& args) : Layer(args){}; }; } // namespace android
services/surfaceflinger/Layer.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -65,7 +65,6 @@ #include <mutex> #include <sstream> #include "BufferStateLayer.h" #include "DisplayDevice.h" #include "DisplayHardware/HWComposer.h" #include "FrameTimeline.h" Loading Loading @@ -871,7 +870,7 @@ void Layer::prepareBufferStateClientComposition( float bufferWidth = getBufferSize(s).getWidth(); float bufferHeight = getBufferSize(s).getHeight(); // BufferStateLayers can have a "buffer size" of [0, 0, -1, -1] when no display frame has // Layers can have a "buffer size" of [0, 0, -1, -1] when no display frame has // been set and there is no parent layer bounds. In that case, the scale is meaningless so // ignore them. if (!getBufferSize(s).isValid()) { Loading Loading @@ -3538,7 +3537,7 @@ Rect Layer::computeBufferCrop(const State& s) { sp<Layer> Layer::createClone() { LayerCreationArgs args(mFlinger.get(), nullptr, mName + " (Mirror)", 0, LayerMetadata()); args.textureName = mTextureName; sp<BufferStateLayer> layer = mFlinger->getFactory().createBufferStateLayer(args); sp<Layer> layer = mFlinger->getFactory().createBufferStateLayer(args); layer->mHwcSlotGenerator = mHwcSlotGenerator; layer->setInitialValuesForClone(sp<Layer>::fromExisting(this)); return layer; Loading
services/surfaceflinger/Scheduler/Scheduler.h +5 −5 Original line number Diff line number Diff line Loading @@ -95,8 +95,8 @@ protected: ~ISchedulerCallback() = default; }; class Scheduler : impl::MessageQueue { using Impl = impl::MessageQueue; class Scheduler : android::impl::MessageQueue { using Impl = android::impl::MessageQueue; public: Scheduler(ICompositor&, ISchedulerCallback&, FeatureFlags); Loading Loading @@ -130,7 +130,7 @@ public: ConnectionHandle createConnection(const char* connectionName, frametimeline::TokenManager*, std::chrono::nanoseconds workDuration, std::chrono::nanoseconds readyDuration, impl::EventThread::InterceptVSyncsCallback); android::impl::EventThread::InterceptVSyncsCallback); sp<IDisplayEventConnection> createDisplayEventConnection( ConnectionHandle, EventRegistrationFlags eventRegistration = {}); Loading Loading @@ -278,9 +278,9 @@ private: void dispatchCachedReportedMode() REQUIRES(mPolicyLock) EXCLUDES(mRefreshRateConfigsLock); impl::EventThread::ThrottleVsyncCallback makeThrottleVsyncCallback() const android::impl::EventThread::ThrottleVsyncCallback makeThrottleVsyncCallback() const EXCLUDES(mRefreshRateConfigsLock); impl::EventThread::GetVsyncPeriodFunction makeGetVsyncPeriodFunction() const; android::impl::EventThread::GetVsyncPeriodFunction makeGetVsyncPeriodFunction() const; std::shared_ptr<RefreshRateConfigs> holdRefreshRateConfigs() const EXCLUDES(mRefreshRateConfigsLock) { Loading