void FlushBits(void *p_bits, uint32_t p_stride) { void *t_target; if (!LockTarget(kMCStackSurfaceTargetCoreGraphics, t_target)) return; int32_t t_height; t_height = m_stack -> getcurcard() -> getrect() . height; CGRect t_dst_rect; t_dst_rect = CGRectMake(m_locked_area . x, t_height - (m_locked_area . y + m_locked_area . height), m_locked_area . width, m_locked_area . height); MCMacRenderBitsToCG(m_context, t_dst_rect, p_bits, p_stride, false); UnlockTarget(); }
bool LockManager::RemovePendingLockUnsafe(Ptr<TransInfo> owner, const LockTarget& target) { if (!owner->pendingLock.IsValid() || owner->pendingLock != target) { return false; } vint index = pendings.Keys().IndexOf(owner->importance); if (index == -1) { return false; } auto pendingInfo = pendings.Values()[index]; index = pendingInfo->transactions.IndexOf(owner->trans); if (index == -1) { return false; } pendingInfo->transactions.RemoveAt(index); owner->pendingLock = LockTarget(); return true; }