Home
last modified time | relevance | path

Searched refs:fence (Results 1 – 25 of 215) sorted by relevance

123456789

/frameworks/native/libs/ui/
DFenceTime.cpp36 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/
DEGL_ANDROID_native_fence_sync.txt39 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/vr/libbufferhubqueue/tests/
Dbuffer_hub_queue-test.cpp101 LocalHandle fence; in TEST_F() local
105 auto p1_status = producer_queue_->Dequeue(kTimeoutMs, &slot, &mo, &fence); in TEST_F()
115 auto c1_status = consumer_queue_->Dequeue(kTimeoutMs, &slot, &mo, &fence); in TEST_F()
139 LocalHandle fence; in TEST_F() local
146 producer_queue_->Dequeue(kTimeoutMs, &producer_slot, &mo, &fence, true); in TEST_F()
165 consumer_queue_->Dequeue(kTimeoutMs, &consumer_slot, &mo, &fence); in TEST_F()
179 producer_queue_->Dequeue(kTimeoutMs, &producer_slot, &mo, &fence, true); in TEST_F()
194 producer_queue_->Dequeue(kTimeoutMs, &producer_slot, &mo, &fence, true); in TEST_F()
222 LocalHandle fence; in TEST_F() local
227 producer_queue_->Dequeue(kTimeoutMs, &slot, &mo, &fence, true); in TEST_F()
[all …]
Dbuffer_hub_queue_producer-test.cpp72 QueueBufferInputBuilder& setFence(sp<Fence> fence) { in setFence()
73 this->mFence = fence; in setFence()
118 sp<Fence> fence; in DequeueBuffer() local
119 ASSERT_NO_FATAL_FAILURE(DequeueBuffer(outSlot, &fence)); in DequeueBuffer()
367 sp<Fence> fence; in TEST_F() local
370 ASSERT_NO_FATAL_FAILURE(DequeueBuffer(&slot, &fence)); in TEST_F()
373 EXPECT_EQ(OK, mProducer->cancelBuffer(slot, fence)); in TEST_F()
408 sp<Fence> fence; in TEST_F() local
410 ASSERT_NO_FATAL_FAILURE(DequeueBuffer(&slot, &fence)); in TEST_F()
414 ASSERT_EQ(OK, mProducer->cancelBuffer(slot, fence)); in TEST_F()
[all …]
/frameworks/base/core/java/com/android/internal/util/
DGcUtils.java39 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/tests/
DBufferQueue_test.cpp82 sp<Fence> fence; in testBufferItem() local
85 &scalingMode, &transform, &fence, nullptr); in testBufferItem()
92 ASSERT_EQ(fence, item.mFence); in testBufferItem()
144 sp<Fence> fence; in TEST_F() local
147 mProducer->dequeueBuffer(&slot, &fence, 0, 0, 0, GRALLOC_USAGE_SW_WRITE_OFTEN, in TEST_F()
193 sp<Fence> fence; in TEST_F() local
202 mProducer->dequeueBuffer(&slot, &fence, 1, 1, 0, GRALLOC_USAGE_SW_READ_OFTEN, in TEST_F()
210 mProducer->dequeueBuffer(&slot, &fence, 1, 1, 0, GRALLOC_USAGE_SW_READ_OFTEN, in TEST_F()
243 sp<Fence> fence; in TEST_F() local
252 mProducer->dequeueBuffer(&slot, &fence, 1, 1, 0, GRALLOC_USAGE_SW_READ_OFTEN, in TEST_F()
[all …]
DStreamSplitter_test.cpp83 sp<Fence> fence; in TEST_F() local
86 inputProducer->dequeueBuffer(&slot, &fence, 0, 0, 0, GRALLOC_USAGE_SW_WRITE_OFTEN, in TEST_F()
120 inputProducer->dequeueBuffer(&slot, &fence, 0, 0, 0, GRALLOC_USAGE_SW_WRITE_OFTEN, in TEST_F()
155 sp<Fence> fence; in TEST_F() local
158 inputProducer->dequeueBuffer(&slot, &fence, 0, 0, 0, GRALLOC_USAGE_SW_WRITE_OFTEN, in TEST_F()
195 inputProducer->dequeueBuffer(&slot, &fence, 0, 0, 0, GRALLOC_USAGE_SW_WRITE_OFTEN, in TEST_F()
220 sp<Fence> fence; in TEST_F() local
223 inputProducer->dequeueBuffer(&slot, &fence, 0, 0, 0, GRALLOC_USAGE_SW_WRITE_OFTEN, in TEST_F()
237 inputProducer->dequeueBuffer(&slot, &fence, 0, 0, 0, GRALLOC_USAGE_SW_WRITE_OFTEN, in TEST_F()
DIGraphicBufferProducer_test.cpp161 fence = QUEUE_BUFFER_INPUT_FENCE; in QueueBufferInputBuilder()
175 fence, in build()
211 QueueBufferInputBuilder& setFence(sp<Fence> fence) { in setFence()
212 this->fence = fence; in setFence()
238 sp<Fence> fence; member
247 mProducer->dequeueBuffer(&result->slot, &result->fence, w, h, format, usage, in dequeueBuffer()
252 void setupDequeueRequestBuffer(int *slot, sp<Fence> *fence, in setupDequeueRequestBuffer() argument
256 ASSERT_TRUE(fence != nullptr); in setupDequeueRequestBuffer()
264 (mProducer->dequeueBuffer(slot, fence, DEFAULT_WIDTH, DEFAULT_HEIGHT, in setupDequeueRequestBuffer()
776 cancelInput.fence = dequeueOutput.fence; in TEST_P()
[all …]
/frameworks/native/libs/ui/include_vndk/ui/
DFenceTime.h54 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);
165 void push(const std::shared_ptr<FenceTime>& fence);
194 std::shared_ptr<FenceTime> createFenceTimeForTest(const sp<Fence>& fence);
198 void signalAllForTest(const sp<Fence>& fence, nsecs_t signalTime);
/frameworks/native/libs/ui/include/ui/
DFenceTime.h54 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);
165 void push(const std::shared_ptr<FenceTime>& fence);
194 std::shared_ptr<FenceTime> createFenceTimeForTest(const sp<Fence>& fence);
198 void signalAllForTest(const sp<Fence>& fence, nsecs_t signalTime);
/frameworks/native/services/surfaceflinger/CompositionEngine/include/compositionengine/impl/planner/
DTexturePool.h44 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
88 sp<Fence> fence; member
97 const sp<Fence>& fence);
/frameworks/native/services/vr/hardware_composer/tests/
Dvr_composer_test.cpp58 ParcelableUniqueFd* fence) override { in onNewFrame() argument
59 binder::Status status = TestComposerCallback::onNewFrame(frame, fence); in onNewFrame()
63 fence->set_fence(fd); in onNewFrame()
104 base::unique_fd fence = composer_->OnNewFrame(frame); in TEST_F() local
105 ASSERT_EQ(-1, fence.get()); in TEST_F()
116 base::unique_fd fence = composer_->OnNewFrame(frame); in TEST_F() local
117 ASSERT_EQ(-1, fence.get()); in TEST_F()
133 .fence = new Fence(eventfd(0, 0)), in TEST_F()
141 base::unique_fd fence = composer_->OnNewFrame(frame); in TEST_F() local
142 ASSERT_LE(0, fence.get()); in TEST_F()
[all …]
/frameworks/base/libs/hwui/tests/unit/
DCommonPoolTests.cpp61 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/native/services/vr/hardware_composer/aidl/android/dvr/
Dparcelable_unique_fd.h16 explicit ParcelableUniqueFd(const base::unique_fd& fence);
19 void set_fence(const base::unique_fd& fence) { in set_fence() argument
20 fence_.reset(dup(fence.get())); in set_fence()
22 base::unique_fd fence() const { return base::unique_fd(dup(fence_.get())); } in fence() function
/frameworks/av/media/libstagefright/omx/1.0/
DWOmxBufferSource.cpp54 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/
DWOmxBufferSource.cpp54 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/libs/gui/
DScreenCaptureResults.cpp31 if (fence != Fence::NO_FENCE) { in writeToParcel()
33 SAFE_PARCEL(parcel->write, *fence); in writeToParcel()
55 fence = new Fence(); in readFromParcel()
56 SAFE_PARCEL(parcel->read, *fence); in readFromParcel()
DIGraphicBufferProducerFlattenables.cpp36 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 …]
DIGraphicBufferProducer.cpp167 virtual status_t dequeueBuffer(int* buf, sp<Fence>* fence, uint32_t width, uint32_t height, in dequeueBuffer() argument
186 *fence = new Fence(); in dequeueBuffer()
187 result = reply.read(**fence); in dequeueBuffer()
189 fence->clear(); in dequeueBuffer()
401 virtual status_t cancelBuffer(int buf, const sp<Fence>& fence) { in cancelBuffer() argument
405 data.write(*fence.get()); in cancelBuffer()
639 sp<Fence> fence(new Fence); in getLastQueuedBuffer() local
640 result = reply.read(*fence); in getLastQueuedBuffer()
646 *outFence = fence; in getLastQueuedBuffer()
689 sp<Fence> fence(new Fence); in getLastQueuedBuffer() local
[all …]
/frameworks/native/services/surfaceflinger/FrameTracer/
DFrameTracer.cpp80 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/vr/hardware_composer/
Dvr_composer.cpp70 ParcelableUniqueFd fence; in OnNewFrame() local
71 binder::Status ret = callback_->onNewFrame(parcelable_frame, &fence); in OnNewFrame()
75 return fence.fence(); in OnNewFrame()
/frameworks/native/libs/vr/libbufferhub/
Dbuffer_hub-test.cpp86 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/
DH2BGraphicBufferProducer.cpp216 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 …]
/frameworks/base/libs/hwui/renderthread/
DEglManager.cpp522 fence(); in swapBuffers()
546 void EglManager::fence() { in fence() function in android::uirenderer::renderthread::EglManager
547 EGLSyncKHR fence = eglCreateSyncKHR(mEglDisplay, EGL_SYNC_FENCE_KHR, NULL); in fence() local
548 eglClientWaitSyncKHR(mEglDisplay, fence, EGL_SYNC_FLUSH_COMMANDS_BIT_KHR, EGL_FOREVER_KHR); in fence()
549 eglDestroySyncKHR(mEglDisplay, fence); in fence()
573 static status_t waitForeverOnFence(int fence, const char* logname) { in waitForeverOnFence() argument
575 if (fence == -1) { in waitForeverOnFence()
579 int err = sync_wait(fence, warningTimeout); in waitForeverOnFence()
581 ALOGE("%s: fence %d didn't signal in %d ms", logname, fence, warningTimeout); in waitForeverOnFence()
582 err = sync_wait(fence, -1); in waitForeverOnFence()
[all …]
/frameworks/native/libs/nativewindow/include/android/
Dhardware_buffer.h442 int AHardwareBuffer_lock(AHardwareBuffer* _Nonnull buffer, uint64_t usage, int32_t fence,
464 int AHardwareBuffer_unlock(AHardwareBuffer* _Nonnull buffer, int32_t* _Nullable fence)
517 int AHardwareBuffer_lockPlanes(AHardwareBuffer* _Nonnull buffer, uint64_t usage, int32_t fence,
553 int AHardwareBuffer_lockAndGetInfo(AHardwareBuffer* _Nonnull buffer, uint64_t usage, int32_t fence,

123456789