diff options
author | John Reck <jreck@google.com> | 2018-04-18 16:13:31 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2018-04-18 16:18:17 -0700 |
commit | 1a4a981199860f0f9c4738dc426d8349e16b0dd5 (patch) | |
tree | 3581ca62e7f6ad57d8728332b11937869c0f88fa /libs/hwui/renderthread/CanvasContext.cpp | |
parent | d4e5725d457cf64efd06cfdae66c2ba68441fdac (diff) |
Revert "Add support for render-ahead"
This reverts commit ec100976e0655acaa204c8800dfb83dadae20cc8.
Reason for revert: b/77971494
Test: hwuiunit passes
Change-Id: I2e7dc719d2df1dd939b275496c0edc38e458c434
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.cpp')
-rw-r--r-- | libs/hwui/renderthread/CanvasContext.cpp | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp index 3deed6e0ba77..95ca8d9d2612 100644 --- a/libs/hwui/renderthread/CanvasContext.cpp +++ b/libs/hwui/renderthread/CanvasContext.cpp @@ -17,7 +17,6 @@ #include "CanvasContext.h" #include <GpuMemoryTracker.h> -#include "../Properties.h" #include "AnimationContext.h" #include "Caches.h" #include "EglManager.h" @@ -33,6 +32,7 @@ #include "renderstate/Stencil.h" #include "utils/GLUtils.h" #include "utils/TimeUtils.h" +#include "../Properties.h" #include <cutils/properties.h> #include <private/hwui/DrawGlInfo.h> @@ -159,7 +159,6 @@ void CanvasContext::setSurface(sp<Surface>&& surface) { if (hasSurface) { mHaveNewSurface = true; mSwapHistory.clear(); - updateBufferCount(); } else { mRenderThread.removeFrameCallback(this); } @@ -393,9 +392,6 @@ void CanvasContext::draw() { waitOnFences(); - frame.setPresentTime(mCurrentFrameInfo->get(FrameInfoIndex::Vsync) + - (mRenderThread.timeLord().frameIntervalNanos() * (mRenderAheadDepth + 1))); - bool requireSwap = false; bool didSwap = mRenderPipeline->swapBuffers(frame, drew, windowDirty, mCurrentFrameInfo, &requireSwap); @@ -619,26 +615,6 @@ int64_t CanvasContext::getFrameNumber() { 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) { if (frame.width() != mLastFrameWidth || frame.height() != mLastFrameHeight) { // can't rely on prior content of window if viewport size changes |