/frameworks/native/libs/input/tests/ |
D | BlockingQueue_test.cpp | 33 BlockingQueue<int> queue(capacity); in TEST() local 35 ASSERT_TRUE(queue.push(1)); in TEST() 36 ASSERT_EQ(queue.pop(), 1); in TEST() 38 ASSERT_TRUE(queue.emplace(2)); in TEST() 39 ASSERT_EQ(queue.popWithTimeout(0ns), 2); in TEST() 41 ASSERT_TRUE(queue.push(3)); in TEST() 42 ASSERT_EQ(queue.popWithTimeout(100ns), 3); in TEST() 44 ASSERT_EQ(std::nullopt, queue.popWithTimeout(0ns)); in TEST() 52 BlockingQueue<int> queue(capacity); in TEST() local 55 ASSERT_TRUE(queue.push(1)); in TEST() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/textclassifier/ |
D | FixedSizeQueueTest.java | 30 FixedSizeQueue<Integer> queue = new FixedSizeQueue<>(1, /* onEntryEvictedListener= */ null); in add_belowMaxCapacity() local 31 assertThat(queue.size()).isEqualTo(0); in add_belowMaxCapacity() 33 queue.add(1); in add_belowMaxCapacity() 35 assertThat(queue.size()).isEqualTo(1); in add_belowMaxCapacity() 36 assertThat(queue.poll()).isEqualTo(1); in add_belowMaxCapacity() 41 FixedSizeQueue<Integer> queue = new FixedSizeQueue<>(2, /* onEntryEvictedListener= */ null); in add_exceedMaxCapacity() local 43 queue.add(1); in add_exceedMaxCapacity() 44 queue.add(2); in add_exceedMaxCapacity() 45 queue.add(3); in add_exceedMaxCapacity() 47 assertThat(queue.size()).isEqualTo(2); in add_exceedMaxCapacity() [all …]
|
/frameworks/base/libs/hwui/tests/unit/ |
D | LayerUpdateQueueTests.cpp | 28 LayerUpdateQueue queue; in TEST() local 29 EXPECT_TRUE(queue.entries().empty()); in TEST() 44 LayerUpdateQueue queue; in TEST() local 45 queue.enqueueLayerWithDamage(a.get(), Rect(25, 25, 75, 75)); in TEST() 46 queue.enqueueLayerWithDamage(b.get(), Rect(100, 100, 300, 300)); in TEST() 47 queue.enqueueLayerWithDamage(c.get(), Rect(.5, .5, .5, .5)); in TEST() 49 EXPECT_EQ(3u, queue.entries().size()); in TEST() 51 EXPECT_EQ(a.get(), queue.entries()[0].renderNode.get()); in TEST() 52 EXPECT_EQ(Rect(25, 25, 75, 75), queue.entries()[0].damage); in TEST() 53 EXPECT_EQ(b.get(), queue.entries()[1].renderNode.get()); in TEST() [all …]
|
D | ThreadBaseTests.cpp | 39 static WorkQueue& queue() { in queue() function 40 return thread().queue(); in queue() 45 queue().post([&ran]() { ran = true; }); in TEST() 57 queue().postDelayed(100_us, [&]() { ranAtPromise.set_value(clock::now()); }); in TEST() 67 auto result = queue().runSync([&otherTid]() -> auto { in TEST() 80 auto otherTid = queue().async([]() -> auto { return gettid(); }); in TEST() 81 auto otherPid = queue().async([]() -> auto { return getpid(); }); in TEST() 82 auto result = queue().async([]() -> auto { return 42; }); in TEST() 132 queue().runSync([c = std::move(counter)](){}); in TEST() 141 return queue().runSync([t = test]()->int { return t->getStrongCount(); }); in lifecycleTestHelper() [all …]
|
/frameworks/native/services/inputflinger/tests/ |
D | SyncQueue_test.cpp | 28 SyncQueue<int> queue; in TEST() local 30 queue.push(1); in TEST() 31 ASSERT_EQ(queue.pop(), 1); in TEST() 33 queue.push(3); in TEST() 34 ASSERT_EQ(queue.pop(), 3); in TEST() 36 ASSERT_EQ(std::nullopt, queue.pop()); in TEST() 42 SyncQueue<int> queue; in TEST() local 46 queue.push(static_cast<int>(i)); in TEST() 49 ASSERT_EQ(queue.pop(), static_cast<int>(i)); in TEST() 56 SyncQueue<int> queue(capacity); in TEST() local [all …]
|
D | TestInputListener.cpp | 149 std::vector<NotifyArgsType>& queue = std::get<std::vector<NotifyArgsType>>(mQueues); in assertCalled() local 150 if (queue.empty()) { in assertCalled() 153 const bool eventReceived = mCondition.wait_until(lock, time, [&queue]() REQUIRES(mLock) { in assertCalled() 154 return !queue.empty(); in assertCalled() 161 *outEventArgs = *queue.begin(); in assertCalled() 163 queue.erase(queue.begin()); in assertCalled() 171 std::vector<NotifyArgsType>& queue = std::get<std::vector<NotifyArgsType>>(mQueues); in assertNotCalled() local 174 const bool eventReceived = mCondition.wait_until(lock, time, [&queue]() REQUIRES(mLock) { in assertNotCalled() 175 return !queue.empty(); in assertNotCalled() 186 std::vector<NotifyArgsType>& queue = std::get<std::vector<NotifyArgsType>>(mQueues); in addToQueue() local [all …]
|
/frameworks/base/services/core/java/com/android/server/am/ |
D | BroadcastQueueModernImpl.java | 405 private void updateRunnableList(@NonNull BroadcastProcessQueue queue) { in updateRunnableList() argument 406 if (getRunningIndexOf(queue) >= 0) { in updateRunnableList() 415 queue.updateDeferredStates(mBroadcastConsumerDeferApply, mBroadcastConsumerDeferClear); in updateRunnableList() 416 queue.updateRunnableAt(); in updateRunnableList() 418 final boolean wantQueue = queue.isRunnable(); in updateRunnableList() 419 final boolean inQueue = (queue == mRunnableHead) || (queue.runnableAtPrev != null) in updateRunnableList() 420 || (queue.runnableAtNext != null); in updateRunnableList() 425 final boolean prevLower = (queue.runnableAtPrev != null) in updateRunnableList() 426 ? queue.runnableAtPrev.getRunnableAt() <= queue.getRunnableAt() : true; in updateRunnableList() 427 final boolean nextHigher = (queue.runnableAtNext != null) in updateRunnableList() [all …]
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/am/ |
D | BroadcastQueueModernImplTest.java | 156 private static void assertOrphan(BroadcastProcessQueue queue) { in assertOrphan() argument 157 assertNull(queue.runnableAtNext); in assertOrphan() 158 assertNull(queue.runnableAtPrev); in assertOrphan() 220 private void enqueueOrReplaceBroadcast(BroadcastProcessQueue queue, in enqueueOrReplaceBroadcast() argument 222 enqueueOrReplaceBroadcast(queue, record, recordIndex, 42_000_000L); in enqueueOrReplaceBroadcast() 225 private void enqueueOrReplaceBroadcast(BroadcastProcessQueue queue, in enqueueOrReplaceBroadcast() argument 230 queue.enqueueOrReplaceBroadcast(record, recordIndex, (r, i) -> { in enqueueOrReplaceBroadcast() 356 final BroadcastProcessQueue queue = new BroadcastProcessQueue(mConstants, in testRunnableAt_Empty() local 358 assertFalse(queue.isRunnable()); in testRunnableAt_Empty() 359 assertEquals(Long.MAX_VALUE, queue.getRunnableAt()); in testRunnableAt_Empty() [all …]
|
/frameworks/base/libs/hwui/renderthread/ |
D | RenderProxy.cpp | 51 mContext = mRenderThread.queue().runSync([=, this]() -> CanvasContext* { in RenderProxy() 55 mRenderThread.queue().post([=] { context->startHintSession(); }); in RenderProxy() 71 mRenderThread.queue().runSync([this]() { delete mContext; }); in destroyContext() 77 mRenderThread.queue().post([this, swapBehavior]() { mContext->setSwapBehavior(swapBehavior); }); in setSwapBehavior() 81 return mRenderThread.queue().runSync([this]() -> bool { in loadSystemProperties() 93 mRenderThread.queue().runSync([this, name]() { mContext->setName(std::string(name)); }); in setName() 101 mRenderThread.queue().post([this, hardwareBuffer = buffer]() mutable { in setHardwareBuffer() 112 mRenderThread.queue().post([this, win = window, enableTimeout]() mutable { in setSurface() 123 mRenderThread.queue().post([this, control = surfaceControl, funcs]() mutable { in setSurfaceControl() 132 mRenderThread.queue().post([this]() { mContext->allocateBuffers(); }); in allocateBuffers() [all …]
|
/frameworks/av/media/libstagefright/rtsp/ |
D | AAVCAssembler.cpp | 58 List<sp<ABuffer>> *queue = source->queue(); in addNack() local 61 List<sp<ABuffer> >::iterator it = queue->begin(); in addNack() 63 if (it == queue->end()) { in addNack() 70 for (; it != queue->end(); ++it) { in addNack() 79 while (it != queue->end()) { in addNack() 82 if ((++it) == queue->end()) { in addNack() 117 List<sp<ABuffer> > *queue = source->queue(); in addNALUnit() local 120 if (queue->empty()) { in addNALUnit() 124 sp<ABuffer> buffer = *queue->begin(); in addNALUnit() 179 showCurrentQueue(queue); in addNALUnit() [all …]
|
D | AHEVCAssembler.cpp | 67 List<sp<ABuffer>> *queue = source->queue(); in addNack() local 70 List<sp<ABuffer> >::iterator it = queue->begin(); in addNack() 72 if (it == queue->end()) { in addNack() 79 for (; it != queue->end(); ++it) { in addNack() 88 while (it != queue->end()) { in addNack() 91 if ((++it) == queue->end()) { in addNack() 127 List<sp<ABuffer> > *queue = source->queue(); in addNALUnit() local 130 if (queue->empty()) { in addNALUnit() 134 sp<ABuffer> buffer = *queue->begin(); in addNALUnit() 189 showCurrentQueue(queue); in addNALUnit() [all …]
|
D | AMPEG2TSAssembler.cpp | 55 List<sp<ABuffer> > *queue = source->queue(); in addPacket() local 57 if (queue->empty()) { in addPacket() 62 List<sp<ABuffer> >::iterator it = queue->begin(); in addPacket() 63 while (it != queue->end()) { in addPacket() 68 it = queue->erase(it); in addPacket() 71 if (queue->empty()) { in addPacket() 76 sp<ABuffer> buffer = *queue->begin(); in addPacket() 90 queue->erase(queue->begin()); in addPacket() 102 queue->erase(queue->begin()); in addPacket()
|
D | AH263Assembler.cpp | 54 List<sp<ABuffer> > *queue = source->queue(); in addPacket() local 56 if (queue->empty()) { in addPacket() 61 List<sp<ABuffer> >::iterator it = queue->begin(); in addPacket() 62 while (it != queue->end()) { in addPacket() 67 it = queue->erase(it); in addPacket() 70 if (queue->empty()) { in addPacket() 75 sp<ABuffer> buffer = *queue->begin(); in addPacket() 99 queue->erase(queue->begin()); in addPacket() 113 queue->erase(queue->begin()); in addPacket() 121 queue->erase(queue->begin()); in addPacket() [all …]
|
D | ARawAudioAssembler.cpp | 55 List<sp<ABuffer> > *queue = source->queue(); in addPacket() local 57 if (queue->empty()) { in addPacket() 62 List<sp<ABuffer> >::iterator it = queue->begin(); in addPacket() 63 while (it != queue->end()) { in addPacket() 68 it = queue->erase(it); in addPacket() 71 if (queue->empty()) { in addPacket() 76 sp<ABuffer> buffer = *queue->begin(); in addPacket() 90 queue->erase(queue->begin()); in addPacket() 102 queue->erase(queue->begin()); in addPacket()
|
D | AAMRAssembler.cpp | 102 List<sp<ABuffer> > *queue = source->queue(); in addPacket() local 104 if (queue->empty()) { in addPacket() 109 List<sp<ABuffer> >::iterator it = queue->begin(); in addPacket() 110 while (it != queue->end()) { in addPacket() 115 it = queue->erase(it); in addPacket() 118 if (queue->empty()) { in addPacket() 123 sp<ABuffer> buffer = *queue->begin(); in addPacket() 137 queue->erase(queue->begin()); in addPacket() 154 queue->erase(queue->begin()); in addPacket() 168 queue->erase(queue->begin()); in addPacket() [all …]
|
D | AMPEG4ElementaryAssembler.cpp | 216 List<sp<ABuffer> > *queue = source->queue(); in addPacket() local 218 if (queue->empty()) { in addPacket() 223 List<sp<ABuffer> >::iterator it = queue->begin(); in addPacket() 224 while (it != queue->end()) { in addPacket() 229 it = queue->erase(it); in addPacket() 232 if (queue->empty()) { in addPacket() 237 sp<ABuffer> buffer = *queue->begin(); in addPacket() 262 queue->erase(queue->begin()); in addPacket() 270 queue->erase(queue->begin()); in addPacket() 356 queue->erase(queue->begin()); in addPacket() [all …]
|
/frameworks/base/core/jni/ |
D | android_graphics_BLASTBufferQueue.cpp | 93 sp<BLASTBufferQueue> queue = new BLASTBufferQueue(name.c_str(), updateDestinationFrame); in nativeCreate() local 94 queue->incStrong((void*)nativeCreate); in nativeCreate() 95 return reinterpret_cast<jlong>(queue.get()); in nativeCreate() 99 sp<BLASTBufferQueue> queue = reinterpret_cast<BLASTBufferQueue*>(ptr); in nativeDestroy() local 100 queue->decStrong((void*)nativeCreate); in nativeDestroy() 105 sp<BLASTBufferQueue> queue = reinterpret_cast<BLASTBufferQueue*>(ptr); in nativeGetSurface() local 107 queue->getSurface(includeSurfaceControlHandle)); in nativeGetSurface() 134 sp<BLASTBufferQueue> queue = reinterpret_cast<BLASTBufferQueue*>(ptr); in nativeSyncNextTransaction() local 139 return queue->syncNextTransaction( in nativeSyncNextTransaction() 154 sp<BLASTBufferQueue> queue = reinterpret_cast<BLASTBufferQueue*>(ptr); in nativeStopContinuousSyncTransaction() local [all …]
|
D | android_view_InputQueue.cpp | 205 sp<InputQueue> queue = InputQueue::createQueue(queueWeak, messageQueue->getLooper()); in nativeInit() local 206 if (!queue.get()) { in nativeInit() 210 queue->incStrong(&gInputQueueClassInfo); in nativeInit() 211 return reinterpret_cast<jlong>(queue.get()); in nativeInit() 215 sp<InputQueue> queue = reinterpret_cast<InputQueue*>(ptr); in nativeDispose() local 216 queue->detachLooper(); in nativeDispose() 217 queue->decStrong(&gInputQueueClassInfo); in nativeDispose() 222 InputQueue* queue = reinterpret_cast<InputQueue*>(ptr); in nativeSendKeyEvent() local 223 KeyEvent* event = queue->createKeyEvent(); in nativeSendKeyEvent() 230 queue->enqueueEvent(event); in nativeSendKeyEvent() [all …]
|
/frameworks/hardware/interfaces/sensorservice/libsensorndkbridge/ |
D | ASensorManager.cpp | 160 std::shared_ptr<ASensorEventQueue> queue = in createEventQueue() local 163 AIBinder_setMinSchedulerPolicy(queue->asBinder().get(), SCHED_FIFO, 98); in createEventQueue() 165 ndk::ScopedAStatus ret = mManager->createEventQueue(queue, &eventQueue); in createEventQueue() 171 queue->setImpl(eventQueue); in createEventQueue() 175 mQueues.push_back(queue); in createEventQueue() 178 LOG(VERBOSE) << "Returning event queue " << queue.get(); in createEventQueue() 179 return queue.get(); in createEventQueue() 182 void ASensorManager::destroyEventQueue(ASensorEventQueue *queue) { in destroyEventQueue() argument 183 LOG(VERBOSE) << "ASensorManager::destroyEventQueue(" << queue << ")"; in destroyEventQueue() 185 queue->invalidate(); in destroyEventQueue() [all …]
|
/frameworks/base/native/android/ |
D | sensor.cpp | 58 if (queue == nullptr) { \ 123 sp<SensorEventQueue> queue = in ASensorManager_createEventQueue() local 125 if (queue != 0) { in ASensorManager_createEventQueue() 126 ALooper_addFd(looper, queue->getFd(), ident, ALOOPER_EVENT_INPUT, callback, data); in ASensorManager_createEventQueue() 127 queue->looper = looper; in ASensorManager_createEventQueue() 128 queue->requestAdditionalInfo = false; in ASensorManager_createEventQueue() 129 queue->incStrong(manager); in ASensorManager_createEventQueue() 131 return static_cast<ASensorEventQueue*>(queue.get()); in ASensorManager_createEventQueue() 134 int ASensorManager_destroyEventQueue(ASensorManager* manager, ASensorEventQueue* queue) { in ASensorManager_destroyEventQueue() argument 138 sp<SensorEventQueue> q = static_cast<SensorEventQueue*>(queue); in ASensorManager_destroyEventQueue() [all …]
|
/frameworks/base/core/java/android/app/admin/ |
D | PolicySizeVerifier.java | 67 Queue<PersistableBundle> queue = new ArrayDeque<>(); in enforceMaxStringLength() local 68 queue.add(bundle); in enforceMaxStringLength() 69 while (!queue.isEmpty()) { in enforceMaxStringLength() 70 PersistableBundle current = queue.remove(); in enforceMaxStringLength() 81 queue.add(persistableBundle); in enforceMaxStringLength() 92 Queue<Bundle> queue = new ArrayDeque<>(); in enforceMaxBundleFieldsLength() local 93 queue.add(bundle); in enforceMaxBundleFieldsLength() 94 while (!queue.isEmpty()) { in enforceMaxBundleFieldsLength() 95 Bundle current = queue.remove(); in enforceMaxBundleFieldsLength() 108 queue.add(b); in enforceMaxBundleFieldsLength() [all …]
|
/frameworks/base/apct-tests/perftests/core/src/android/libcore/ |
D | ReferencePerfTest.java | 44 ReferenceQueue<Object> queue = new ReferenceQueue<Object>(); in timeAlloc() local 47 new PhantomReference(mObject, queue); in timeAlloc() 54 ReferenceQueue<Object> queue = new ReferenceQueue<Object>(); in timeAllocAndEnqueue() local 57 (new PhantomReference<Object>(mObject, queue)).enqueue(); in timeAllocAndEnqueue() 64 ReferenceQueue<Object> queue = new ReferenceQueue<Object>(); in timeAllocEnqueueAndPoll() local 67 (new PhantomReference<Object>(mObject, queue)).enqueue(); in timeAllocEnqueueAndPoll() 68 queue.poll(); in timeAllocEnqueueAndPoll() 75 ReferenceQueue<Object> queue = new ReferenceQueue<Object>(); in timeAllocEnqueueAndRemove() local 78 (new PhantomReference<Object>(mObject, queue)).enqueue(); in timeAllocEnqueueAndRemove() 80 queue.remove(); in timeAllocEnqueueAndRemove()
|
/frameworks/native/services/surfaceflinger/FrontEnd/ |
D | TransactionHandler.cpp | 94 auto& queue = it->second; in applyUnsignaledBufferTransaction() local 95 popTransactionFromPending(transactions, flushState, queue); in applyUnsignaledBufferTransaction() 96 if (queue.empty()) { in applyUnsignaledBufferTransaction() 103 std::queue<TransactionState>& queue) { in popTransactionFromPending() argument 104 auto& transaction = queue.front(); in popTransactionFromPending() 109 queue.pop(); in popTransactionFromPending() 154 auto& [applyToken, queue] = *it; in flushPendingTransactionQueues() 155 while (!queue.empty()) { in flushPendingTransactionQueues() 156 auto& transaction = queue.front(); in flushPendingTransactionQueues() 171 popTransactionFromPending(transactions, flushState, queue); in flushPendingTransactionQueues() [all …]
|
/frameworks/native/services/inputflinger/tests/fuzzers/ |
D | BlockingQueueFuzzer.cpp | 30 BlockingQueue<int32_t> queue(capacity); in LLVMFuzzerTestOneInput() local 37 queue.push(fdp.ConsumeIntegral<int32_t>()); in LLVMFuzzerTestOneInput() 45 queue.pop(); in LLVMFuzzerTestOneInput() 54 queue.popWithTimeout(std::chrono::nanoseconds( in LLVMFuzzerTestOneInput() 60 queue.clear(); in LLVMFuzzerTestOneInput() 65 queue.erase_if([&](int32_t element) { in LLVMFuzzerTestOneInput()
|
/frameworks/av/media/module/bufferpool/2.0/ |
D | BufferStatus.cpp | 62 std::unique_ptr<BufferStatusQueue> queue = in open() local 64 if (!queue || queue->isValid() == false) { in open() 68 *fmqDescPtr = queue->getDesc(); in open() 71 std::make_pair(id, std::move(queue))); in open() 108 std::unique_ptr<BufferStatusQueue> queue = in BufferStatusChannel() local 110 if (!queue || queue->isValid() == false) { in BufferStatusChannel() 115 mBufferStatusQueue = std::move(queue); in BufferStatusChannel() 223 std::unique_ptr<BufferInvalidationQueue> queue = in BufferInvalidationListener() local 225 if (!queue || queue->isValid() == false) { in BufferInvalidationListener() 230 mBufferInvalidationQueue = std::move(queue); in BufferInvalidationListener()
|