/frameworks/native/services/inputflinger/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() 44 BlockingQueue<int> queue(capacity); in TEST() local 47 ASSERT_TRUE(queue.push(1)); in TEST() 48 ASSERT_TRUE(queue.push(2)); in TEST() 49 ASSERT_TRUE(queue.push(3)); in TEST() 50 ASSERT_FALSE(queue.push(4)) << "Queue should reach capacity at size " << capacity; in TEST() 59 BlockingQueue<int> queue(capacity); in TEST() local 62 ASSERT_TRUE(queue.push(static_cast<int>(i))); in TEST() [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/base/libs/hwui/renderthread/ |
D | RenderProxy.cpp | 45 mContext = mRenderThread.queue().runSync([&]() -> CanvasContext* { in RenderProxy() 60 mRenderThread.queue().runSync([this]() { delete mContext; }); in destroyContext() 66 mRenderThread.queue().post([this, swapBehavior]() { mContext->setSwapBehavior(swapBehavior); }); in setSwapBehavior() 70 return mRenderThread.queue().runSync([this]() -> bool { in loadSystemProperties() 82 mRenderThread.queue().runSync([this, name]() { mContext->setName(std::string(name)); }); in setName() 86 mRenderThread.queue().post( in setSurface() 91 mRenderThread.queue().post([=]() { mContext->allocateBuffers(); }); in allocateBuffers() 95 return mRenderThread.queue().runSync([this]() -> bool { return mContext->pauseSurface(); }); in pause() 99 mRenderThread.queue().runSync([this, stopped]() { mContext->setStopped(stopped); }); in setStopped() 103 mRenderThread.queue().post( in setLightAlpha() [all …]
|
/frameworks/av/media/libstagefright/rtsp/ |
D | AAVCAssembler.cpp | 48 List<sp<ABuffer> > *queue = source->queue(); in addNALUnit() local 50 if (queue->empty()) { in addNALUnit() 55 List<sp<ABuffer> >::iterator it = queue->begin(); in addNALUnit() 56 while (it != queue->end()) { in addNALUnit() 61 it = queue->erase(it); in addNALUnit() 64 if (queue->empty()) { in addNALUnit() 69 sp<ABuffer> buffer = *queue->begin(); in addNALUnit() 87 queue->erase(queue->begin()); in addNALUnit() 96 queue->erase(queue->begin()); in addNALUnit() 101 return addFragmentedNALUnit(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 | 103 List<sp<ABuffer> > *queue = source->queue(); in addPacket() local 105 if (queue->empty()) { in addPacket() 110 List<sp<ABuffer> >::iterator it = queue->begin(); in addPacket() 111 while (it != queue->end()) { in addPacket() 116 it = queue->erase(it); in addPacket() 119 if (queue->empty()) { in addPacket() 124 sp<ABuffer> buffer = *queue->begin(); in addPacket() 138 queue->erase(queue->begin()); in addPacket() 155 queue->erase(queue->begin()); in addPacket() 169 queue->erase(queue->begin()); in addPacket() [all …]
|
D | AMPEG4ElementaryAssembler.cpp | 208 List<sp<ABuffer> > *queue = source->queue(); in addPacket() local 210 if (queue->empty()) { in addPacket() 215 List<sp<ABuffer> >::iterator it = queue->begin(); in addPacket() 216 while (it != queue->end()) { in addPacket() 221 it = queue->erase(it); in addPacket() 224 if (queue->empty()) { in addPacket() 229 sp<ABuffer> buffer = *queue->begin(); in addPacket() 368 queue->erase(queue->begin()); in addPacket()
|
/frameworks/hardware/interfaces/sensorservice/libsensorndkbridge/ |
D | ASensorManager.cpp | 161 sp<ASensorEventQueue> queue = in createEventQueue() local 164 ::android::hardware::setMinSchedulerPolicy(queue, SCHED_FIFO, 98); in createEventQueue() 168 queue, [&](const sp<IEventQueue> &queueImpl, auto tmpResult) { in createEventQueue() 174 queue->setImpl(queueImpl); in createEventQueue() 182 queue->incStrong(NULL /* id */); in createEventQueue() 184 LOG(VERBOSE) << "Returning event queue " << queue.get(); in createEventQueue() 185 return queue.get(); in createEventQueue() 188 void ASensorManager::destroyEventQueue(ASensorEventQueue *queue) { in destroyEventQueue() argument 189 LOG(VERBOSE) << "ASensorManager::destroyEventQueue(" << queue << ")"; in destroyEventQueue() 191 queue->invalidate(); in destroyEventQueue() [all …]
|
D | ALooper.cpp | 31 void ALooper::signalSensorEvents(ASensorEventQueue *queue) { in signalSensorEvents() argument 33 mReadyQueues.insert(queue); in signalSensorEvents() 74 for (auto queue : mReadyQueues) { in pollOnce() local 75 queue->dispatchCallback(); in pollOnce() 89 void ALooper::invalidateSensorQueue(ASensorEventQueue *queue) { in invalidateSensorQueue() argument 91 mReadyQueues.erase(queue); in invalidateSensorQueue()
|
/frameworks/base/cmds/statsd/tests/log_event/ |
D | LogEventQueue_test.cpp | 34 LogEventQueue queue(50); in TEST() local 36 std::thread writer([&queue, timeBaseNs] { in TEST() 39 bool success = queue.push(std::make_unique<LogEvent>(10, timeBaseNs + i * 1000), in TEST() 46 std::thread reader([&queue, timeBaseNs] { in TEST() 48 auto event = queue.waitPop(); in TEST() 60 LogEventQueue queue(50); in TEST() local 62 std::thread writer([&queue, timeBaseNs] { in TEST() 66 bool success = queue.push(std::make_unique<LogEvent>(10, timeBaseNs + i * 1000), in TEST() 80 std::thread reader([&queue, timeBaseNs] { in TEST() 83 auto event = queue.waitPop(); in TEST()
|
/frameworks/base/native/android/ |
D | sensor.cpp | 58 if (queue == nullptr) { \ 113 sp<SensorEventQueue> queue = in ASensorManager_createEventQueue() local 115 if (queue != 0) { in ASensorManager_createEventQueue() 116 ALooper_addFd(looper, queue->getFd(), ident, ALOOPER_EVENT_INPUT, callback, data); in ASensorManager_createEventQueue() 117 queue->looper = looper; in ASensorManager_createEventQueue() 118 queue->requestAdditionalInfo = false; in ASensorManager_createEventQueue() 119 queue->incStrong(manager); in ASensorManager_createEventQueue() 121 return static_cast<ASensorEventQueue*>(queue.get()); in ASensorManager_createEventQueue() 124 int ASensorManager_destroyEventQueue(ASensorManager* manager, ASensorEventQueue* queue) { in ASensorManager_destroyEventQueue() argument 128 sp<SensorEventQueue> q = static_cast<SensorEventQueue*>(queue); in ASensorManager_destroyEventQueue() [all …]
|
D | input.cpp | 273 void AInputQueue_attachLooper(AInputQueue* queue, ALooper* looper, in AInputQueue_attachLooper() argument 275 InputQueue* iq = static_cast<InputQueue*>(queue); in AInputQueue_attachLooper() 280 void AInputQueue_detachLooper(AInputQueue* queue) { in AInputQueue_detachLooper() argument 281 InputQueue* iq = static_cast<InputQueue*>(queue); in AInputQueue_detachLooper() 285 int32_t AInputQueue_hasEvents(AInputQueue* queue) { in AInputQueue_hasEvents() argument 286 InputQueue* iq = static_cast<InputQueue*>(queue); in AInputQueue_hasEvents() 290 int32_t AInputQueue_getEvent(AInputQueue* queue, AInputEvent** outEvent) { in AInputQueue_getEvent() argument 291 InputQueue* iq = static_cast<InputQueue*>(queue); in AInputQueue_getEvent() 298 int32_t AInputQueue_preDispatchEvent(AInputQueue* queue, AInputEvent* event) { in AInputQueue_preDispatchEvent() argument 299 InputQueue* iq = static_cast<InputQueue*>(queue); in AInputQueue_preDispatchEvent() [all …]
|
/frameworks/av/media/codec2/components/base/ |
D | SimpleC2Component.cpp | 238 Mutexed<WorkQueue>::Locked queue(mWorkQueue); in queue_nb() local 239 queueWasEmpty = queue->empty(); in queue_nb() 241 queue->push_back(std::move(items->front())); in queue_nb() 266 Mutexed<WorkQueue>::Locked queue(mWorkQueue); in flush_sm() local 267 queue->incGeneration(); in flush_sm() 269 while (!queue->empty()) { in flush_sm() 270 std::unique_ptr<C2Work> work = queue->pop_front(); in flush_sm() 275 while (!queue->pending().empty()) { in flush_sm() 276 flushedWork->push_back(std::move(queue->pending().begin()->second)); in flush_sm() 277 queue->pending().erase(queue->pending().begin()); in flush_sm() [all …]
|
/frameworks/opt/gamesdk/src/swappyVk/ |
D | SwappyVk.cpp | 170 virtual VkResult doQueuePresent(VkQueue queue, 398 virtual VkResult doQueuePresent(VkQueue queue, 407 VkResult SwappyVkGoogleDisplayTiming::doQueuePresent(VkQueue queue, in doQueuePresent() argument 434 ret = mpfnQueuePresentKHR(queue, &replacementPresentInfo); in doQueuePresent() 533 virtual VkResult doQueuePresent(VkQueue queue, 538 VkResult initializeVkSyncObjects(VkQueue queue, uint32_t queueFamilyIndex); 541 void waitForFenceChoreographer(VkQueue queue); 557 VkResult SwappyVkGoogleDisplayTimingAndroid::initializeVkSyncObjects(VkQueue queue, in initializeVkSyncObjects() argument 560 if (mCommandPool.find(queue) != mCommandPool.end()) { in initializeVkSyncObjects() 573 VkResult res = vkCreateCommandPool(mDevice, &cmd_pool_info, NULL, &mCommandPool[queue]); in initializeVkSyncObjects() [all …]
|
/frameworks/base/core/jni/ |
D | android_view_InputQueue.cpp | 204 sp<InputQueue> queue = InputQueue::createQueue(queueWeak, messageQueue->getLooper()); in nativeInit() local 205 if (!queue.get()) { in nativeInit() 209 queue->incStrong(&gInputQueueClassInfo); in nativeInit() 210 return reinterpret_cast<jlong>(queue.get()); in nativeInit() 214 sp<InputQueue> queue = reinterpret_cast<InputQueue*>(ptr); in nativeDispose() local 215 queue->detachLooper(); in nativeDispose() 216 queue->decStrong(&gInputQueueClassInfo); in nativeDispose() 221 InputQueue* queue = reinterpret_cast<InputQueue*>(ptr); in nativeSendKeyEvent() local 222 KeyEvent* event = queue->createKeyEvent(); in nativeSendKeyEvent() 225 queue->recycleInputEvent(event); in nativeSendKeyEvent() [all …]
|
/frameworks/av/media/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()
|
/frameworks/av/media/bufferpool/1.0/ |
D | BufferStatus.cpp | 49 std::unique_ptr<BufferStatusQueue> queue = in open() local 51 if (!queue || queue->isValid() == false) { in open() 55 *fmqDescPtr = queue->getDesc(); in open() 58 std::make_pair(id, std::move(queue))); in open() 95 std::unique_ptr<BufferStatusQueue> queue = in BufferStatusChannel() local 97 if (!queue || queue->isValid() == false) { in BufferStatusChannel() 102 mBufferStatusQueue = std::move(queue); in BufferStatusChannel()
|
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/ |
D | FrameQueue.java | 38 public void attachQueue(FrameQueue queue) { in attachQueue() argument 39 mAttachedQueues.add(queue); in attachQueue() 51 private void buildQueueImpl(FrameQueue queue) { in buildQueueImpl() argument 52 QueueImpl queueImpl = queue.new SingleFrameQueueImpl(); in buildQueueImpl() 53 queue.mQueueImpl = queueImpl; in buildQueueImpl() 58 for (FrameQueue queue : mAttachedQueues) { in buildType() 59 result = FrameType.merge(result, queue.mType); in buildType()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/ |
D | UserManagerServiceIdRecyclingTest.java | 93 LinkedHashSet<Integer> queue = new LinkedHashSet<>(); in testUserCreateRecycleIdsOverflow() local 97 assertTrue("Returned id should not be recent. Id=" + userId + ". Recents=" + queue, in testUserCreateRecycleIdsOverflow() 98 queue.add(userId)); in testUserCreateRecycleIdsOverflow() 99 if (queue.size() > UserManagerService.MAX_RECENTLY_REMOVED_IDS_SIZE) { in testUserCreateRecycleIdsOverflow() 100 queue.remove(queue.iterator().next()); in testUserCreateRecycleIdsOverflow()
|
/frameworks/base/core/java/android/hardware/ |
D | SystemSensorManager.java | 171 SensorEventQueue queue = mSensorListeners.get(listener); in registerListenerImpl() local 172 if (queue == null) { in registerListenerImpl() 178 queue = new SensorEventQueue(listener, looper, this, fullClassName); in registerListenerImpl() 179 if (!queue.addSensor(sensor, delayUs, maxBatchReportLatencyUs)) { in registerListenerImpl() 180 queue.dispose(); in registerListenerImpl() 183 mSensorListeners.put(listener, queue); in registerListenerImpl() 186 return queue.addSensor(sensor, delayUs, maxBatchReportLatencyUs); in registerListenerImpl() 200 SensorEventQueue queue = mSensorListeners.get(listener); in unregisterListenerImpl() local 201 if (queue != null) { in unregisterListenerImpl() 204 result = queue.removeAllSensors(); in unregisterListenerImpl() [all …]
|
/frameworks/native/include_sensor/android/ |
D | sensor.h | 603 int ASensorManager_destroyEventQueue(ASensorManager* manager, ASensorEventQueue* queue); 711 int ASensorEventQueue_registerSensor(ASensorEventQueue* queue, ASensor const* sensor, 724 int ASensorEventQueue_enableSensor(ASensorEventQueue* queue, ASensor const* sensor); 735 int ASensorEventQueue_disableSensor(ASensorEventQueue* queue, ASensor const* sensor); 750 int ASensorEventQueue_setEventRate(ASensorEventQueue* queue, ASensor const* sensor, int32_t usec); 759 int ASensorEventQueue_hasEvents(ASensorEventQueue* queue); 781 ssize_t ASensorEventQueue_getEvents(ASensorEventQueue* queue, ASensorEvent* events, size_t count); 804 int ASensorEventQueue_requestAdditionalInfoEvents(ASensorEventQueue* queue, bool enable);
|
/frameworks/native/include/android/ |
D | sensor.h | 603 int ASensorManager_destroyEventQueue(ASensorManager* manager, ASensorEventQueue* queue); 711 int ASensorEventQueue_registerSensor(ASensorEventQueue* queue, ASensor const* sensor, 724 int ASensorEventQueue_enableSensor(ASensorEventQueue* queue, ASensor const* sensor); 735 int ASensorEventQueue_disableSensor(ASensorEventQueue* queue, ASensor const* sensor); 750 int ASensorEventQueue_setEventRate(ASensorEventQueue* queue, ASensor const* sensor, int32_t usec); 759 int ASensorEventQueue_hasEvents(ASensorEventQueue* queue); 781 ssize_t ASensorEventQueue_getEvents(ASensorEventQueue* queue, ASensorEvent* events, size_t count); 804 int ASensorEventQueue_requestAdditionalInfoEvents(ASensorEventQueue* queue, bool enable);
|