/frameworks/native/libs/ui/ |
D | FenceTime.cpp | 36 FenceTime::FenceTime(const sp<Fence>& fence) in FenceTime() argument 37 : mState(((fence.get() != nullptr) && fence->isValid()) ? in FenceTime() 39 mFence(fence), in FenceTime() 44 FenceTime::FenceTime(sp<Fence>&& fence) in FenceTime() argument 45 : mState(((fence.get() != nullptr) && fence->isValid()) ? in FenceTime() 47 mFence(std::move(fence)), in FenceTime() 111 sp<Fence> fence; in wait() local 121 fence = mFence; in wait() 125 return fence->wait(timeout); in wait() 139 sp<Fence> fence; in getSignalTime() local [all …]
|
/frameworks/native/opengl/specs/ |
D | EGL_ANDROID_native_fence_sync.txt | 39 This extension enables the creation of EGL fence sync objects that are 40 associated with a native synchronization fence object that is referenced 41 using a file descriptor. These EGL fence sync objects have nearly 44 referring to the native fence object. 46 This extension assumes the existence of a native fence synchronization 47 object that behaves similarly to an EGL fence sync object. These native 49 indicates whether the fence has ever been signaled. Once signaled the 89 "If <type> is EGL_SYNC_NATIVE_FENCE_ANDROID, an EGL native fence sync 92 must be set to either a file descriptor that refers to a native fence 95 The default values for the EGL native fence sync object attributes are as [all …]
|
/frameworks/native/libs/ui/tests/ |
D | MockFence_test.cpp | 36 sp<Fence> fence = getFenceForTesting(); in TEST_F() local 39 EXPECT_EQ(Fence::SIGNAL_TIME_PENDING, fence->getSignalTime()); in TEST_F() 42 EXPECT_EQ(1234, fence->getSignalTime()); in TEST_F() 46 sp<Fence> fence = getFenceForTesting(); in TEST_F() local 49 EXPECT_EQ(Fence::Status::Unsignaled, fence->getStatus()); in TEST_F() 52 EXPECT_EQ(Fence::Status::Signaled, fence->getStatus()); in TEST_F() 55 EXPECT_EQ(Fence::Status::Invalid, fence->getStatus()); in TEST_F()
|
/frameworks/base/core/jni/ |
D | android_hardware_SyncFence.cpp | 37 static void destroyFence(Fence* fence) { in destroyFence() argument 38 fence->decStrong(0); in destroyFence() 46 Fence* fence = new Fence(fd); in SyncFence_create() local 47 fence->incStrong(0); in SyncFence_create() 48 return toJlong(fence); in SyncFence_create() 60 Fence* fence = fromJlong<Fence>(jPtr); in SyncFence_wait() local 61 int err = fence->wait(timeoutNanos); in SyncFence_wait()
|
/frameworks/native/libs/ui/include_vndk/ui/ |
D | FenceTime.h | 54 explicit Snapshot(const sp<Fence>& fence); 73 sp<Fence> fence{Fence::NO_FENCE}; 79 explicit FenceTime(const sp<Fence>& fence); 80 explicit FenceTime(sp<Fence>&& fence); 127 FenceTime(const sp<Fence>& fence, bool forceValidForTest); 167 void push(const std::shared_ptr<FenceTime>& fence); 198 const auto fence = sp<Fence>::make(); in makePendingFenceForTest() local 199 return {fence, createFenceTimeForTest(fence)}; in makePendingFenceForTest() 207 void signalAllForTest(const sp<Fence>& fence, nsecs_t signalTime);
|
/frameworks/native/libs/ui/include/ui/ |
D | FenceTime.h | 54 explicit Snapshot(const sp<Fence>& fence); 73 sp<Fence> fence{Fence::NO_FENCE}; 79 explicit FenceTime(const sp<Fence>& fence); 80 explicit FenceTime(sp<Fence>&& fence); 127 FenceTime(const sp<Fence>& fence, bool forceValidForTest); 167 void push(const std::shared_ptr<FenceTime>& fence); 198 const auto fence = sp<Fence>::make(); in makePendingFenceForTest() local 199 return {fence, createFenceTimeForTest(fence)}; in makePendingFenceForTest() 207 void signalAllForTest(const sp<Fence>& fence, nsecs_t signalTime);
|
/frameworks/native/services/surfaceflinger/tests/unittests/ |
D | TransactionApplicationTest.cpp | 323 static sp<Fence> fence(Fence::Status status) { in fence() function in android::LatchUnsignaledTest 324 const auto fence = sp<mock::MockFence>::make(); in fence() local 325 EXPECT_CALL(*fence, getStatus()).WillRepeatedly(Return(status)); in fence() 326 return fence; in fence() 329 ComposerState createComposerState(int layerId, sp<Fence> fence, uint64_t what, in createComposerState() argument 336 state.state.bufferData->acquireFence = std::move(fence); in createComposerState() 421 {createComposerState(kLayerId, fence(Fence::Status::Signaled), in TEST_F() 436 fence(Fence::Status::Unsignaled), in TEST_F() 452 fence(Fence::Status::Unsignaled), in TEST_F() 470 fence(Fence::Status::Unsignaled), in TEST_F() [all …]
|
/frameworks/base/core/java/com/android/internal/util/ |
D | GcUtils.java | 39 final CountDownLatch fence = new CountDownLatch(1); in runGcAndFinalizersSync() local 40 createFinalizationObserver(fence); in runGcAndFinalizersSync() 45 } while (!fence.await(100, TimeUnit.MILLISECONDS)); in runGcAndFinalizersSync() 57 private static void createFinalizationObserver(CountDownLatch fence) { in createFinalizationObserver() argument 62 fence.countDown(); in createFinalizationObserver()
|
/frameworks/native/libs/gui/ |
D | FenceMonitor.cpp | 33 void FenceMonitor::queueFence(const sp<Fence>& fence) { in queueFence() argument 37 if (fence->getSignalTime() != Fence::SIGNAL_TIME_PENDING) { in queueFence() 48 mQueue.push_back(fence); in queueFence() 61 sp<Fence> fence; in threadLoop() local 68 fence = mQueue[0]; in threadLoop() 76 status_t result = fence->waitForever(message); in threadLoop()
|
D | IGraphicBufferProducerFlattenables.cpp | 36 fence->getFlattenedSize() + in getFlattenedSize() 42 return fence->getFdCount(); in getFdCount() 61 status_t result = fence->flatten(buffer, size, fds, count); in flatten() 95 fence = new Fence(); in unflatten() 96 status_t result = fence->unflatten(buffer, size, fds, count); in unflatten() 271 fence->getFlattenedSize() + in getFlattenedSize() 276 return fence->getFdCount() + in getFdCount() 289 status_t status = fence->flatten(buffer, size, fds, count); in flatten() 311 fence = new Fence(); in unflatten() 312 status_t status = fence->unflatten(buffer, size, fds, count); in unflatten() [all …]
|
D | IGraphicBufferProducer.cpp | 163 virtual status_t dequeueBuffer(int* buf, sp<Fence>* fence, uint32_t width, uint32_t height, in dequeueBuffer() argument 182 *fence = new Fence(); in dequeueBuffer() 183 result = reply.read(**fence); in dequeueBuffer() 185 fence->clear(); in dequeueBuffer() 397 virtual status_t cancelBuffer(int buf, const sp<Fence>& fence) { in cancelBuffer() argument 401 data.write(*fence.get()); in cancelBuffer() 635 sp<Fence> fence(new Fence); in getLastQueuedBuffer() local 636 result = reply.read(*fence); in getLastQueuedBuffer() 642 *outFence = fence; in getLastQueuedBuffer() 685 sp<Fence> fence(new Fence); in getLastQueuedBuffer() local [all …]
|
/frameworks/native/libs/gui/tests/ |
D | BufferQueue_test.cpp | 69 sp<Fence> fence; in testBufferItem() local 72 &scalingMode, &transform, &fence, nullptr); in testBufferItem() 79 ASSERT_EQ(fence, item.mFence); in testBufferItem() 131 sp<Fence> fence; in TEST_F() local 134 mProducer->dequeueBuffer(&slot, &fence, 0, 0, 0, GRALLOC_USAGE_SW_WRITE_OFTEN, in TEST_F() 180 sp<Fence> fence; in TEST_F() local 189 mProducer->dequeueBuffer(&slot, &fence, 1, 1, 0, GRALLOC_USAGE_SW_READ_OFTEN, in TEST_F() 197 mProducer->dequeueBuffer(&slot, &fence, 1, 1, 0, GRALLOC_USAGE_SW_READ_OFTEN, in TEST_F() 230 sp<Fence> fence; in TEST_F() local 239 mProducer->dequeueBuffer(&slot, &fence, 1, 1, 0, GRALLOC_USAGE_SW_READ_OFTEN, in TEST_F() [all …]
|
D | StreamSplitter_test.cpp | 67 sp<Fence> fence; in TEST_F() local 70 inputProducer->dequeueBuffer(&slot, &fence, 0, 0, 0, GRALLOC_USAGE_SW_WRITE_OFTEN, in TEST_F() 104 inputProducer->dequeueBuffer(&slot, &fence, 0, 0, 0, GRALLOC_USAGE_SW_WRITE_OFTEN, in TEST_F() 139 sp<Fence> fence; in TEST_F() local 142 inputProducer->dequeueBuffer(&slot, &fence, 0, 0, 0, GRALLOC_USAGE_SW_WRITE_OFTEN, in TEST_F() 179 inputProducer->dequeueBuffer(&slot, &fence, 0, 0, 0, GRALLOC_USAGE_SW_WRITE_OFTEN, in TEST_F() 204 sp<Fence> fence; in TEST_F() local 207 inputProducer->dequeueBuffer(&slot, &fence, 0, 0, 0, GRALLOC_USAGE_SW_WRITE_OFTEN, in TEST_F() 221 inputProducer->dequeueBuffer(&slot, &fence, 0, 0, 0, GRALLOC_USAGE_SW_WRITE_OFTEN, in TEST_F()
|
D | IGraphicBufferProducer_test.cpp | 140 fence = QUEUE_BUFFER_INPUT_FENCE; in QueueBufferInputBuilder() 154 fence, in build() 190 QueueBufferInputBuilder& setFence(sp<Fence> fence) { in setFence() 191 this->fence = fence; in setFence() 217 sp<Fence> fence; member 226 mProducer->dequeueBuffer(&result->slot, &result->fence, w, h, format, usage, in dequeueBuffer() 231 void setupDequeueRequestBuffer(int *slot, sp<Fence> *fence, in setupDequeueRequestBuffer() argument 235 ASSERT_TRUE(fence != nullptr); in setupDequeueRequestBuffer() 243 (mProducer->dequeueBuffer(slot, fence, DEFAULT_WIDTH, DEFAULT_HEIGHT, in setupDequeueRequestBuffer() 755 cancelInput.fence = dequeueOutput.fence; in TEST_P() [all …]
|
/frameworks/native/services/surfaceflinger/CompositionEngine/include/compositionengine/impl/planner/ |
D | TexturePool.h | 44 std::shared_ptr<renderengine::ExternalTexture> texture, const sp<Fence>& fence) in AutoTexture() argument 45 : mTexturePool(texturePool), mTexture(texture), mFence(fence) {} in AutoTexture() 51 void setReadyFence(const sp<Fence>& fence) { mFence = fence; } in setReadyFence() argument 95 sp<Fence> fence; member 104 const sp<Fence>& fence);
|
/frameworks/base/libs/hwui/tests/unit/ |
D | CommonPoolTests.cpp | 61 std::condition_variable fence; in TEST() local 69 fence.notify_all(); in TEST() 71 fence.wait(lock); in TEST() 80 fence.wait(lock); in TEST() 91 fence.notify_all(); in TEST() 104 std::condition_variable fence; in TEST() local 115 fence.wait(_lock); in TEST() 134 fence.notify_all(); in TEST()
|
/frameworks/base/apct-tests/perftests/surfaceflinger/src/android/surfaceflinger/ |
D | BufferFlinger.java | 62 (SyncFence fence) -> { in addBuffer() 63 releaseCallback(fence, buffer); in addBuffer() 69 public void releaseCallback(SyncFence fence, GraphicBuffer buffer) { in releaseCallback() argument 70 if (fence != null) { in releaseCallback() 71 fence.awaitForever(); in releaseCallback()
|
/frameworks/native/services/surfaceflinger/Scheduler/tests/ |
D | FrameTargeterTest.cpp | 72 auto [fence, fenceTime] = testPtr->mFenceMap.makePendingFenceForTest(); in end() 73 testPtr->mTargeter.setPresentFence(std::move(fence), fenceTime); in end() 146 const auto fence = frame.end(); in TEST_F() local 149 EXPECT_EQ(target().presentFenceForPastVsync(kPeriod), fence); in TEST_F() 164 const auto fence = frame.end(); in TEST_F() local 169 previousFence = fence; in TEST_F() 193 const auto fence = frame.end(); in TEST_F() local 194 fence->signalForTest(frameBeginTime.ns()); in TEST_F() 212 const auto fence = frame.end(); in TEST_F() local 213 fence->signalForTest(frameBeginTime.ns()); in TEST_F() [all …]
|
D | PresentLatencyTrackerTest.cpp | 36 const auto [fence, fenceTime] = fenceMap.makePendingFenceForTest(); in TEST() 55 for (const auto& [fence, fenceTime] : fences) { in TEST() 65 const auto fence = fenceMap.makePendingFenceForTest(); in TEST() local 69 EXPECT_EQ(tracker.trackPendingFrame(kCompositeTime, fence.second), kPresentLatency); in TEST()
|
/frameworks/av/media/libstagefright/omx/1.0/ |
D | WOmxBufferSource.cpp | 54 hidl_handle fence; in onInputBufferEmptied() local 56 if (!wrapAs(&fence, &fenceNh, fenceParcel)) { in onInputBufferEmptied() 63 static_cast<uint32_t>(bufferId), fence)); in onInputBufferEmptied() 95 uint32_t buffer, hidl_handle const& fence) { in onInputBufferEmptied() argument 97 if (!convertTo(&fenceParcelable, fence)) { in onInputBufferEmptied()
|
/frameworks/av/media/libmedia/omx/1.0/ |
D | WOmxBufferSource.cpp | 54 hidl_handle fence; in onInputBufferEmptied() local 56 if (!wrapAs(&fence, &fenceNh, fenceParcel)) { in onInputBufferEmptied() 63 static_cast<uint32_t>(bufferId), fence)); in onInputBufferEmptied() 95 uint32_t buffer, hidl_handle const& fence) { in onInputBufferEmptied() argument 97 if (!convertTo(&fenceParcelable, fence)) { in onInputBufferEmptied()
|
/frameworks/native/services/surfaceflinger/FrameTracer/ |
D | FrameTracer.cpp | 80 const std::shared_ptr<FenceTime>& fence, in traceFence() argument 82 FrameTracerDataSource::Trace([this, layerId, bufferID, frameNumber, &fence, type, in traceFence() 84 const nsecs_t signalTime = fence->getSignalTime(); in traceFence() 100 .fence = fence, in traceFence() 115 if (pendingFence.fence && pendingFence.fence->isValid()) { in tracePendingFencesLocked() 116 signalTime = pendingFence.fence->getSignalTime(); in tracePendingFencesLocked()
|
/frameworks/native/services/surfaceflinger/Scheduler/src/ |
D | FrameTargeter.cpp | 51 const auto fence = presentFenceForPastVsync(vsyncPeriod); in wouldPresentEarly() local 52 return fence->isValid() && fence->getSignalTime() != Fence::SIGNAL_TIME_PENDING; in wouldPresentEarly() 145 bool FrameTargeter::isFencePending(const FenceTimePtr& fence, int graceTimeMs) { in isFencePending() argument 147 const status_t status = fence->wait(graceTimeMs); in isFencePending()
|
/frameworks/native/libs/vr/libbufferhub/ |
D | buffer_hub-test.cpp | 86 LocalHandle fence; in TEST_F() local 87 EXPECT_EQ(0, c1->Acquire(&fence)); in TEST_F() 91 EXPECT_EQ(0, c2->Acquire(&fence)); in TEST_F() 100 EXPECT_EQ(0, p->Gain(&fence)); in TEST_F() 215 LocalHandle fence; in TEST_F() local 219 EXPECT_EQ(-EBUSY, c->Acquire(&fence)); in TEST_F() 226 EXPECT_EQ(-EBUSY, p->Gain(&fence)); in TEST_F() 229 EXPECT_EQ(0, c->Acquire(&fence)); in TEST_F() 232 EXPECT_EQ(-EBUSY, c->Acquire(&fence)); in TEST_F() 234 EXPECT_EQ(-EBUSY, p->Gain(&fence)); in TEST_F() [all …]
|
/frameworks/native/libs/gui/bufferqueue/1.0/ |
D | H2BGraphicBufferProducer.cpp | 216 inline size_t getFenceFdCount(hidl_handle const& fence) { in getFenceFdCount() argument 217 return native_handle_read_fd(fence) == -1 ? 0 : 1; in getFenceFdCount() 235 inline status_t unflattenFence(hidl_handle* fence, native_handle_t** nh, in unflattenFence() argument 257 *fence = *nh; in unflattenFence() 262 *fence = hidl_handle(); in unflattenFence() 278 inline status_t flattenFence(hidl_handle const& fence, in flattenFence() argument 280 if (size < getFenceFlattenedSize(fence) || in flattenFence() 281 numFds < getFenceFdCount(fence)) { in flattenFence() 287 static_cast<uint32_t>(getFenceFdCount(fence))); in flattenFence() 288 int fd = native_handle_read_fd(fence); in flattenFence() [all …]
|