summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/BufferQueueLayer.cpp
diff options
context:
space:
mode:
author Lloyd Pique <lpique@google.com> 2018-06-21 13:11:48 -0700
committer Lloyd Pique <lpique@google.com> 2018-08-02 13:03:22 -0700
commit41be5d28ba2364f3454494c3ae915f21ccd5ffe9 (patch)
tree56fc685d0dbf5d77d796cc3cb83714b8467b9960 /services/surfaceflinger/BufferQueueLayer.cpp
parent63f9dbf997bc3dbf5319cc7d7e436470cb303911 (diff)
[SurfaceFlinger] Allow DispSync to be GMock'd
Move the DispSync implementation into an 'impl' namespace to match the other GMock related changes I've done. The DispSync in the previous namespace is now the abstract interface. SurfaceFlinger is adjusted slightly to create an instance of the impl::DispSync, but store it in a std::unique_ptr<DispSync> for the abstract class, with small adjustments to the code to deference the now pointer. The existing display transaction unit test is updated to define the GMock, inject one, and to set the call expectations for a few tests are added to match how it was called. Test: atest libsurfaceflinger_unittest Bug: None Change-Id: I91b38c5194dbf86a6f0b658f3ab9f227b54d5354
Diffstat (limited to 'services/surfaceflinger/BufferQueueLayer.cpp')
-rw-r--r--services/surfaceflinger/BufferQueueLayer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/surfaceflinger/BufferQueueLayer.cpp b/services/surfaceflinger/BufferQueueLayer.cpp
index 0913de419e..9c35825e62 100644
--- a/services/surfaceflinger/BufferQueueLayer.cpp
+++ b/services/surfaceflinger/BufferQueueLayer.cpp
@@ -245,8 +245,9 @@ status_t BufferQueueLayer::updateTexImage(bool& recomputeVisibleRegions, nsecs_t
LayerRejecter r(mDrawingState, getCurrentState(), recomputeVisibleRegions,
getProducerStickyTransform() != 0, mName.string(), mOverrideScalingMode,
getTransformToDisplayInverse(), mFreezeGeometryUpdates);
- status_t updateResult = mConsumer->updateTexImage(&r, mFlinger->mPrimaryDispSync, &mAutoRefresh,
- &queuedBuffer, mLastFrameNumberReceived);
+ status_t updateResult =
+ mConsumer->updateTexImage(&r, *mFlinger->mPrimaryDispSync, &mAutoRefresh, &queuedBuffer,
+ mLastFrameNumberReceived);
if (updateResult == BufferQueue::PRESENT_LATER) {
// Producer doesn't want buffer to be displayed yet. Signal a
// layer update so we check again at the next opportunity.