Loading libs/hwui/Properties.cpp +0 −2 Original line number Original line Diff line number Diff line Loading @@ -36,7 +36,6 @@ bool Properties::showDirtyRegions = false; bool Properties::skipEmptyFrames = true; bool Properties::skipEmptyFrames = true; bool Properties::useBufferAge = true; bool Properties::useBufferAge = true; bool Properties::enablePartialUpdates = true; bool Properties::enablePartialUpdates = true; bool Properties::usePresentTime = true; DebugLevel Properties::debugLevel = kDebugDisabled; DebugLevel Properties::debugLevel = kDebugDisabled; OverdrawColorSet Properties::overdrawColorSet = OverdrawColorSet::Default; OverdrawColorSet Properties::overdrawColorSet = OverdrawColorSet::Default; Loading Loading @@ -136,7 +135,6 @@ bool Properties::load() { skipEmptyFrames = property_get_bool(PROPERTY_SKIP_EMPTY_DAMAGE, true); skipEmptyFrames = property_get_bool(PROPERTY_SKIP_EMPTY_DAMAGE, true); useBufferAge = property_get_bool(PROPERTY_USE_BUFFER_AGE, true); useBufferAge = property_get_bool(PROPERTY_USE_BUFFER_AGE, true); enablePartialUpdates = property_get_bool(PROPERTY_ENABLE_PARTIAL_UPDATES, true); enablePartialUpdates = property_get_bool(PROPERTY_ENABLE_PARTIAL_UPDATES, true); usePresentTime = property_get_bool(PROPERTY_USE_PRESENT_TIME, true); filterOutTestOverhead = property_get_bool(PROPERTY_FILTER_TEST_OVERHEAD, false); filterOutTestOverhead = property_get_bool(PROPERTY_FILTER_TEST_OVERHEAD, false); Loading libs/hwui/Properties.h +0 −7 Original line number Original line Diff line number Diff line Loading @@ -151,12 +151,6 @@ enum DebugLevel { */ */ #define PROPERTY_ENABLE_PARTIAL_UPDATES "debug.hwui.use_partial_updates" #define PROPERTY_ENABLE_PARTIAL_UPDATES "debug.hwui.use_partial_updates" /** * Setting this to "false" will disable the use of the EGL_ANDROID_presentation_time extension * and prevents more precise control over swap behavior & timings. */ #define PROPERTY_USE_PRESENT_TIME "debug.hwui.use_present_time" #define PROPERTY_FILTER_TEST_OVERHEAD "debug.hwui.filter_test_overhead" #define PROPERTY_FILTER_TEST_OVERHEAD "debug.hwui.filter_test_overhead" /** /** Loading Loading @@ -226,7 +220,6 @@ public: static bool skipEmptyFrames; static bool skipEmptyFrames; static bool useBufferAge; static bool useBufferAge; static bool enablePartialUpdates; static bool enablePartialUpdates; static bool usePresentTime; // TODO: Move somewhere else? // TODO: Move somewhere else? static constexpr float textGamma = 1.45f; static constexpr float textGamma = 1.45f; Loading libs/hwui/renderthread/CanvasContext.cpp +1 −25 Original line number Original line Diff line number Diff line Loading @@ -17,7 +17,6 @@ #include "CanvasContext.h" #include "CanvasContext.h" #include <GpuMemoryTracker.h> #include <GpuMemoryTracker.h> #include "../Properties.h" #include "AnimationContext.h" #include "AnimationContext.h" #include "Caches.h" #include "Caches.h" #include "EglManager.h" #include "EglManager.h" Loading @@ -33,6 +32,7 @@ #include "renderstate/Stencil.h" #include "renderstate/Stencil.h" #include "utils/GLUtils.h" #include "utils/GLUtils.h" #include "utils/TimeUtils.h" #include "utils/TimeUtils.h" #include "../Properties.h" #include <cutils/properties.h> #include <cutils/properties.h> #include <private/hwui/DrawGlInfo.h> #include <private/hwui/DrawGlInfo.h> Loading Loading @@ -159,7 +159,6 @@ void CanvasContext::setSurface(sp<Surface>&& surface) { if (hasSurface) { if (hasSurface) { mHaveNewSurface = true; mHaveNewSurface = true; mSwapHistory.clear(); mSwapHistory.clear(); updateBufferCount(); } else { } else { mRenderThread.removeFrameCallback(this); mRenderThread.removeFrameCallback(this); } } Loading Loading @@ -393,9 +392,6 @@ void CanvasContext::draw() { waitOnFences(); waitOnFences(); frame.setPresentTime(mCurrentFrameInfo->get(FrameInfoIndex::Vsync) + (mRenderThread.timeLord().frameIntervalNanos() * (mRenderAheadDepth + 1))); bool requireSwap = false; bool requireSwap = false; bool didSwap = bool didSwap = mRenderPipeline->swapBuffers(frame, drew, windowDirty, mCurrentFrameInfo, &requireSwap); mRenderPipeline->swapBuffers(frame, drew, windowDirty, mCurrentFrameInfo, &requireSwap); Loading Loading @@ -619,26 +615,6 @@ int64_t CanvasContext::getFrameNumber() { return mFrameNumber; return mFrameNumber; } } void overrideBufferCount(const sp<Surface>& surface, int bufferCount) { struct SurfaceExposer : Surface { using Surface::setBufferCount; }; // Protected is just a sign, not a cop ((*surface.get()).*&SurfaceExposer::setBufferCount)(bufferCount); } void CanvasContext::updateBufferCount() { overrideBufferCount(mNativeSurface, 3 + mRenderAheadDepth); } void CanvasContext::setRenderAheadDepth(int renderAhead) { if (renderAhead < 0 || renderAhead > 2 || renderAhead == mRenderAheadDepth) { return; } mRenderAheadDepth = renderAhead; updateBufferCount(); } SkRect CanvasContext::computeDirtyRect(const Frame& frame, SkRect* dirty) { SkRect CanvasContext::computeDirtyRect(const Frame& frame, SkRect* dirty) { if (frame.width() != mLastFrameWidth || frame.height() != mLastFrameHeight) { if (frame.width() != mLastFrameWidth || frame.height() != mLastFrameHeight) { // can't rely on prior content of window if viewport size changes // can't rely on prior content of window if viewport size changes Loading libs/hwui/renderthread/CanvasContext.h +1 −5 Original line number Original line Diff line number Diff line Loading @@ -188,8 +188,6 @@ public: IRenderPipeline* getRenderPipeline() { return mRenderPipeline.get(); } IRenderPipeline* getRenderPipeline() { return mRenderPipeline.get(); } void setRenderAheadDepth(int renderAhead); private: private: CanvasContext(RenderThread& thread, bool translucent, RenderNode* rootRenderNode, CanvasContext(RenderThread& thread, bool translucent, RenderNode* rootRenderNode, IContextFactory* contextFactory, std::unique_ptr<IRenderPipeline> renderPipeline); IContextFactory* contextFactory, std::unique_ptr<IRenderPipeline> renderPipeline); Loading @@ -202,7 +200,6 @@ private: void freePrefetchedLayers(); void freePrefetchedLayers(); bool isSwapChainStuffed(); bool isSwapChainStuffed(); void updateBufferCount(); SkRect computeDirtyRect(const Frame& frame, SkRect* dirty); SkRect computeDirtyRect(const Frame& frame, SkRect* dirty); Loading @@ -228,7 +225,6 @@ private: RingBuffer<SwapHistory, 3> mSwapHistory; RingBuffer<SwapHistory, 3> mSwapHistory; int64_t mFrameNumber = -1; int64_t mFrameNumber = -1; int mRenderAheadDepth = 0; // last vsync for a dropped frame due to stuffed queue // last vsync for a dropped frame due to stuffed queue nsecs_t mLastDropVsync = 0; nsecs_t mLastDropVsync = 0; Loading libs/hwui/renderthread/DrawFrameTask.cpp +3 −2 Original line number Original line Diff line number Diff line Loading @@ -103,8 +103,9 @@ void DrawFrameTask::run() { // Even if we aren't drawing this vsync pulse the next frame number will still be accurate // Even if we aren't drawing this vsync pulse the next frame number will still be accurate if (CC_UNLIKELY(callback)) { if (CC_UNLIKELY(callback)) { context->enqueueFrameWork( context->enqueueFrameWork([callback, frameNr = context->getFrameNumber()]() { [ callback, frameNr = context->getFrameNumber() ]() { callback(frameNr); }); callback(frameNr); }); } } if (CC_LIKELY(canDrawThisFrame)) { if (CC_LIKELY(canDrawThisFrame)) { Loading Loading
libs/hwui/Properties.cpp +0 −2 Original line number Original line Diff line number Diff line Loading @@ -36,7 +36,6 @@ bool Properties::showDirtyRegions = false; bool Properties::skipEmptyFrames = true; bool Properties::skipEmptyFrames = true; bool Properties::useBufferAge = true; bool Properties::useBufferAge = true; bool Properties::enablePartialUpdates = true; bool Properties::enablePartialUpdates = true; bool Properties::usePresentTime = true; DebugLevel Properties::debugLevel = kDebugDisabled; DebugLevel Properties::debugLevel = kDebugDisabled; OverdrawColorSet Properties::overdrawColorSet = OverdrawColorSet::Default; OverdrawColorSet Properties::overdrawColorSet = OverdrawColorSet::Default; Loading Loading @@ -136,7 +135,6 @@ bool Properties::load() { skipEmptyFrames = property_get_bool(PROPERTY_SKIP_EMPTY_DAMAGE, true); skipEmptyFrames = property_get_bool(PROPERTY_SKIP_EMPTY_DAMAGE, true); useBufferAge = property_get_bool(PROPERTY_USE_BUFFER_AGE, true); useBufferAge = property_get_bool(PROPERTY_USE_BUFFER_AGE, true); enablePartialUpdates = property_get_bool(PROPERTY_ENABLE_PARTIAL_UPDATES, true); enablePartialUpdates = property_get_bool(PROPERTY_ENABLE_PARTIAL_UPDATES, true); usePresentTime = property_get_bool(PROPERTY_USE_PRESENT_TIME, true); filterOutTestOverhead = property_get_bool(PROPERTY_FILTER_TEST_OVERHEAD, false); filterOutTestOverhead = property_get_bool(PROPERTY_FILTER_TEST_OVERHEAD, false); Loading
libs/hwui/Properties.h +0 −7 Original line number Original line Diff line number Diff line Loading @@ -151,12 +151,6 @@ enum DebugLevel { */ */ #define PROPERTY_ENABLE_PARTIAL_UPDATES "debug.hwui.use_partial_updates" #define PROPERTY_ENABLE_PARTIAL_UPDATES "debug.hwui.use_partial_updates" /** * Setting this to "false" will disable the use of the EGL_ANDROID_presentation_time extension * and prevents more precise control over swap behavior & timings. */ #define PROPERTY_USE_PRESENT_TIME "debug.hwui.use_present_time" #define PROPERTY_FILTER_TEST_OVERHEAD "debug.hwui.filter_test_overhead" #define PROPERTY_FILTER_TEST_OVERHEAD "debug.hwui.filter_test_overhead" /** /** Loading Loading @@ -226,7 +220,6 @@ public: static bool skipEmptyFrames; static bool skipEmptyFrames; static bool useBufferAge; static bool useBufferAge; static bool enablePartialUpdates; static bool enablePartialUpdates; static bool usePresentTime; // TODO: Move somewhere else? // TODO: Move somewhere else? static constexpr float textGamma = 1.45f; static constexpr float textGamma = 1.45f; Loading
libs/hwui/renderthread/CanvasContext.cpp +1 −25 Original line number Original line Diff line number Diff line Loading @@ -17,7 +17,6 @@ #include "CanvasContext.h" #include "CanvasContext.h" #include <GpuMemoryTracker.h> #include <GpuMemoryTracker.h> #include "../Properties.h" #include "AnimationContext.h" #include "AnimationContext.h" #include "Caches.h" #include "Caches.h" #include "EglManager.h" #include "EglManager.h" Loading @@ -33,6 +32,7 @@ #include "renderstate/Stencil.h" #include "renderstate/Stencil.h" #include "utils/GLUtils.h" #include "utils/GLUtils.h" #include "utils/TimeUtils.h" #include "utils/TimeUtils.h" #include "../Properties.h" #include <cutils/properties.h> #include <cutils/properties.h> #include <private/hwui/DrawGlInfo.h> #include <private/hwui/DrawGlInfo.h> Loading Loading @@ -159,7 +159,6 @@ void CanvasContext::setSurface(sp<Surface>&& surface) { if (hasSurface) { if (hasSurface) { mHaveNewSurface = true; mHaveNewSurface = true; mSwapHistory.clear(); mSwapHistory.clear(); updateBufferCount(); } else { } else { mRenderThread.removeFrameCallback(this); mRenderThread.removeFrameCallback(this); } } Loading Loading @@ -393,9 +392,6 @@ void CanvasContext::draw() { waitOnFences(); waitOnFences(); frame.setPresentTime(mCurrentFrameInfo->get(FrameInfoIndex::Vsync) + (mRenderThread.timeLord().frameIntervalNanos() * (mRenderAheadDepth + 1))); bool requireSwap = false; bool requireSwap = false; bool didSwap = bool didSwap = mRenderPipeline->swapBuffers(frame, drew, windowDirty, mCurrentFrameInfo, &requireSwap); mRenderPipeline->swapBuffers(frame, drew, windowDirty, mCurrentFrameInfo, &requireSwap); Loading Loading @@ -619,26 +615,6 @@ int64_t CanvasContext::getFrameNumber() { return mFrameNumber; return mFrameNumber; } } void overrideBufferCount(const sp<Surface>& surface, int bufferCount) { struct SurfaceExposer : Surface { using Surface::setBufferCount; }; // Protected is just a sign, not a cop ((*surface.get()).*&SurfaceExposer::setBufferCount)(bufferCount); } void CanvasContext::updateBufferCount() { overrideBufferCount(mNativeSurface, 3 + mRenderAheadDepth); } void CanvasContext::setRenderAheadDepth(int renderAhead) { if (renderAhead < 0 || renderAhead > 2 || renderAhead == mRenderAheadDepth) { return; } mRenderAheadDepth = renderAhead; updateBufferCount(); } SkRect CanvasContext::computeDirtyRect(const Frame& frame, SkRect* dirty) { SkRect CanvasContext::computeDirtyRect(const Frame& frame, SkRect* dirty) { if (frame.width() != mLastFrameWidth || frame.height() != mLastFrameHeight) { if (frame.width() != mLastFrameWidth || frame.height() != mLastFrameHeight) { // can't rely on prior content of window if viewport size changes // can't rely on prior content of window if viewport size changes Loading
libs/hwui/renderthread/CanvasContext.h +1 −5 Original line number Original line Diff line number Diff line Loading @@ -188,8 +188,6 @@ public: IRenderPipeline* getRenderPipeline() { return mRenderPipeline.get(); } IRenderPipeline* getRenderPipeline() { return mRenderPipeline.get(); } void setRenderAheadDepth(int renderAhead); private: private: CanvasContext(RenderThread& thread, bool translucent, RenderNode* rootRenderNode, CanvasContext(RenderThread& thread, bool translucent, RenderNode* rootRenderNode, IContextFactory* contextFactory, std::unique_ptr<IRenderPipeline> renderPipeline); IContextFactory* contextFactory, std::unique_ptr<IRenderPipeline> renderPipeline); Loading @@ -202,7 +200,6 @@ private: void freePrefetchedLayers(); void freePrefetchedLayers(); bool isSwapChainStuffed(); bool isSwapChainStuffed(); void updateBufferCount(); SkRect computeDirtyRect(const Frame& frame, SkRect* dirty); SkRect computeDirtyRect(const Frame& frame, SkRect* dirty); Loading @@ -228,7 +225,6 @@ private: RingBuffer<SwapHistory, 3> mSwapHistory; RingBuffer<SwapHistory, 3> mSwapHistory; int64_t mFrameNumber = -1; int64_t mFrameNumber = -1; int mRenderAheadDepth = 0; // last vsync for a dropped frame due to stuffed queue // last vsync for a dropped frame due to stuffed queue nsecs_t mLastDropVsync = 0; nsecs_t mLastDropVsync = 0; Loading
libs/hwui/renderthread/DrawFrameTask.cpp +3 −2 Original line number Original line Diff line number Diff line Loading @@ -103,8 +103,9 @@ void DrawFrameTask::run() { // Even if we aren't drawing this vsync pulse the next frame number will still be accurate // Even if we aren't drawing this vsync pulse the next frame number will still be accurate if (CC_UNLIKELY(callback)) { if (CC_UNLIKELY(callback)) { context->enqueueFrameWork( context->enqueueFrameWork([callback, frameNr = context->getFrameNumber()]() { [ callback, frameNr = context->getFrameNumber() ]() { callback(frameNr); }); callback(frameNr); }); } } if (CC_LIKELY(canDrawThisFrame)) { if (CC_LIKELY(canDrawThisFrame)) { Loading