Loading services/sensorservice/RecentEventLogger.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,8 @@ bool RecentEventLogger::populateLastEvent(sensors_event_t *event) const { size_t RecentEventLogger::logSizeBySensorType(int sensorType) { return (sensorType == SENSOR_TYPE_STEP_COUNTER || sensorType == SENSOR_TYPE_SIGNIFICANT_MOTION || sensorType == SENSOR_TYPE_ACCELEROMETER) ? LOG_SIZE_LARGE : LOG_SIZE; sensorType == SENSOR_TYPE_ACCELEROMETER || sensorType == SENSOR_TYPE_LIGHT) ? LOG_SIZE_LARGE : LOG_SIZE; } RecentEventLogger::SensorEventLog::SensorEventLog(const sensors_event_t& e) : mEvent(e) { Loading services/surfaceflinger/DisplayDevice.h +0 −7 Original line number Diff line number Diff line Loading @@ -336,13 +336,6 @@ public: bool isSecure() const override { return mDevice->isSecure(); } bool needsFiltering() const override { return mDevice->needsFiltering(); } Rect getSourceCrop() const override { return mSourceCrop; } bool getWideColorSupport() const override { return mDevice->hasWideColorGamut(); } ui::Dataspace getDataSpace() const override { return mDevice->getCompositionDataSpace(); } float getDisplayMaxLuminance() const override { return mDevice->getHdrCapabilities().getDesiredMaxLuminance(); } private: const sp<const DisplayDevice> mDevice; Loading services/surfaceflinger/RenderArea.h +0 −3 Original line number Diff line number Diff line Loading @@ -30,9 +30,6 @@ public: virtual bool isSecure() const = 0; virtual bool needsFiltering() const = 0; virtual Rect getSourceCrop() const = 0; virtual bool getWideColorSupport() const = 0; virtual ui::Dataspace getDataSpace() const = 0; virtual float getDisplayMaxLuminance() const = 0; virtual void render(std::function<void()> drawLayers) { drawLayers(); } Loading services/surfaceflinger/SurfaceFlinger.cpp +12 −20 Original line number Diff line number Diff line Loading @@ -316,8 +316,7 @@ SurfaceFlinger::SurfaceFlinger() : SurfaceFlinger(SkipInitialization) { mLayerTripleBufferingDisabled = atoi(value); ALOGI_IF(mLayerTripleBufferingDisabled, "Disabling Triple Buffering"); // TODO (b/74616334): Reduce the default value once we isolate the leak const size_t defaultListSize = 4 * MAX_LAYERS; const size_t defaultListSize = MAX_LAYERS; auto listSize = property_get_int32("debug.sf.max_igbp_list_size", int32_t(defaultListSize)); mMaxGraphicBufferProducerListSize = (listSize > 0) ? size_t(listSize) : defaultListSize; Loading Loading @@ -3140,12 +3139,14 @@ status_t SurfaceFlinger::addClientLayer(const sp<Client>& client, parent->addChild(lbc); } if (gbc != nullptr) { mGraphicBufferProducerList.insert(IInterface::asBinder(gbc).get()); // TODO (b/74616334): Change this back to a fatal assert once the leak is fixed ALOGE_IF(mGraphicBufferProducerList.size() > mMaxGraphicBufferProducerListSize, LOG_ALWAYS_FATAL_IF(mGraphicBufferProducerList.size() > mMaxGraphicBufferProducerListSize, "Suspected IGBP leak: %zu IGBPs (%zu max), %zu Layers", mGraphicBufferProducerList.size(), mMaxGraphicBufferProducerListSize, mNumLayers); mGraphicBufferProducerList.size(), mMaxGraphicBufferProducerListSize, mNumLayers); } mLayersAdded = true; mNumLayers++; } Loading Loading @@ -4810,12 +4811,6 @@ status_t SurfaceFlinger::captureLayers(const sp<IBinder>& layerHandleBinder, return mCrop; } } bool getWideColorSupport() const override { return false; } Dataspace getDataSpace() const override { return Dataspace::UNKNOWN; } float getDisplayMaxLuminance() const override { return DisplayDevice::sDefaultMaxLumiance; } class ReparentForDrawing { public: const sp<Layer>& oldParent; Loading Loading @@ -5013,12 +5008,9 @@ void SurfaceFlinger::renderScreenImplLocked(const RenderArea& renderArea, ALOGE("Invalid crop rect: b = %d (> %d)", sourceCrop.bottom, raHeight); } Dataspace outputDataspace = Dataspace::UNKNOWN; if (renderArea.getWideColorSupport()) { outputDataspace = renderArea.getDataSpace(); } engine.setOutputDataSpace(outputDataspace); engine.setDisplayMaxLuminance(renderArea.getDisplayMaxLuminance()); // assume ColorMode::SRGB / RenderIntent::COLORIMETRIC engine.setOutputDataSpace(Dataspace::SRGB); engine.setDisplayMaxLuminance(DisplayDevice::sDefaultMaxLumiance); // make sure to clear all GL error flags engine.checkErrors(); Loading Loading
services/sensorservice/RecentEventLogger.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,8 @@ bool RecentEventLogger::populateLastEvent(sensors_event_t *event) const { size_t RecentEventLogger::logSizeBySensorType(int sensorType) { return (sensorType == SENSOR_TYPE_STEP_COUNTER || sensorType == SENSOR_TYPE_SIGNIFICANT_MOTION || sensorType == SENSOR_TYPE_ACCELEROMETER) ? LOG_SIZE_LARGE : LOG_SIZE; sensorType == SENSOR_TYPE_ACCELEROMETER || sensorType == SENSOR_TYPE_LIGHT) ? LOG_SIZE_LARGE : LOG_SIZE; } RecentEventLogger::SensorEventLog::SensorEventLog(const sensors_event_t& e) : mEvent(e) { Loading
services/surfaceflinger/DisplayDevice.h +0 −7 Original line number Diff line number Diff line Loading @@ -336,13 +336,6 @@ public: bool isSecure() const override { return mDevice->isSecure(); } bool needsFiltering() const override { return mDevice->needsFiltering(); } Rect getSourceCrop() const override { return mSourceCrop; } bool getWideColorSupport() const override { return mDevice->hasWideColorGamut(); } ui::Dataspace getDataSpace() const override { return mDevice->getCompositionDataSpace(); } float getDisplayMaxLuminance() const override { return mDevice->getHdrCapabilities().getDesiredMaxLuminance(); } private: const sp<const DisplayDevice> mDevice; Loading
services/surfaceflinger/RenderArea.h +0 −3 Original line number Diff line number Diff line Loading @@ -30,9 +30,6 @@ public: virtual bool isSecure() const = 0; virtual bool needsFiltering() const = 0; virtual Rect getSourceCrop() const = 0; virtual bool getWideColorSupport() const = 0; virtual ui::Dataspace getDataSpace() const = 0; virtual float getDisplayMaxLuminance() const = 0; virtual void render(std::function<void()> drawLayers) { drawLayers(); } Loading
services/surfaceflinger/SurfaceFlinger.cpp +12 −20 Original line number Diff line number Diff line Loading @@ -316,8 +316,7 @@ SurfaceFlinger::SurfaceFlinger() : SurfaceFlinger(SkipInitialization) { mLayerTripleBufferingDisabled = atoi(value); ALOGI_IF(mLayerTripleBufferingDisabled, "Disabling Triple Buffering"); // TODO (b/74616334): Reduce the default value once we isolate the leak const size_t defaultListSize = 4 * MAX_LAYERS; const size_t defaultListSize = MAX_LAYERS; auto listSize = property_get_int32("debug.sf.max_igbp_list_size", int32_t(defaultListSize)); mMaxGraphicBufferProducerListSize = (listSize > 0) ? size_t(listSize) : defaultListSize; Loading Loading @@ -3140,12 +3139,14 @@ status_t SurfaceFlinger::addClientLayer(const sp<Client>& client, parent->addChild(lbc); } if (gbc != nullptr) { mGraphicBufferProducerList.insert(IInterface::asBinder(gbc).get()); // TODO (b/74616334): Change this back to a fatal assert once the leak is fixed ALOGE_IF(mGraphicBufferProducerList.size() > mMaxGraphicBufferProducerListSize, LOG_ALWAYS_FATAL_IF(mGraphicBufferProducerList.size() > mMaxGraphicBufferProducerListSize, "Suspected IGBP leak: %zu IGBPs (%zu max), %zu Layers", mGraphicBufferProducerList.size(), mMaxGraphicBufferProducerListSize, mNumLayers); mGraphicBufferProducerList.size(), mMaxGraphicBufferProducerListSize, mNumLayers); } mLayersAdded = true; mNumLayers++; } Loading Loading @@ -4810,12 +4811,6 @@ status_t SurfaceFlinger::captureLayers(const sp<IBinder>& layerHandleBinder, return mCrop; } } bool getWideColorSupport() const override { return false; } Dataspace getDataSpace() const override { return Dataspace::UNKNOWN; } float getDisplayMaxLuminance() const override { return DisplayDevice::sDefaultMaxLumiance; } class ReparentForDrawing { public: const sp<Layer>& oldParent; Loading Loading @@ -5013,12 +5008,9 @@ void SurfaceFlinger::renderScreenImplLocked(const RenderArea& renderArea, ALOGE("Invalid crop rect: b = %d (> %d)", sourceCrop.bottom, raHeight); } Dataspace outputDataspace = Dataspace::UNKNOWN; if (renderArea.getWideColorSupport()) { outputDataspace = renderArea.getDataSpace(); } engine.setOutputDataSpace(outputDataspace); engine.setDisplayMaxLuminance(renderArea.getDisplayMaxLuminance()); // assume ColorMode::SRGB / RenderIntent::COLORIMETRIC engine.setOutputDataSpace(Dataspace::SRGB); engine.setDisplayMaxLuminance(DisplayDevice::sDefaultMaxLumiance); // make sure to clear all GL error flags engine.checkErrors(); Loading