本文整理汇总了C++中TBS_LOG函数的典型用法代码示例。如果您正苦于以下问题:C++ TBS_LOG函数的具体用法?C++ TBS_LOG怎么用?C++ TBS_LOG使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TBS_LOG函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TBS_LOG
bool
TouchBlockState::UpdateSlopState(const MultiTouchInput& aInput,
bool aApzcCanConsumeEvents)
{
if (aInput.mType == MultiTouchInput::MULTITOUCH_START) {
// this is by definition the first event in this block. If it's the first
// touch, then we enter a slop state.
mInSlop = (aInput.mTouches.Length() == 1);
if (mInSlop) {
mSlopOrigin = aInput.mTouches[0].mScreenPoint;
TBS_LOG("%p entering slop with origin %s\n", this, Stringify(mSlopOrigin).c_str());
}
return false;
}
if (mInSlop) {
ScreenCoord threshold = aApzcCanConsumeEvents
? AsyncPanZoomController::GetTouchStartTolerance()
: ScreenCoord(gfxPrefs::APZTouchMoveTolerance() * APZCTreeManager::GetDPI());
bool stayInSlop = (aInput.mType == MultiTouchInput::MULTITOUCH_MOVE) &&
(aInput.mTouches.Length() == 1) &&
((aInput.mTouches[0].mScreenPoint - mSlopOrigin).Length() < threshold);
if (!stayInSlop) {
// we're out of the slop zone, and will stay out for the remainder of
// this block
TBS_LOG("%p exiting slop\n", this);
mInSlop = false;
}
}
return mInSlop;
}
示例2: TBS_LOG
bool
TouchBlockState::CopyAllowedTouchBehaviorsFrom(const TouchBlockState& aOther)
{
TBS_LOG("%p copying allowed touch behaviours from %p\n", this, &aOther);
MOZ_ASSERT(aOther.mAllowedTouchBehaviorSet);
return SetAllowedTouchBehaviors(aOther.mAllowedTouchBehaviors);
}
示例3: CancelableBlockState
TouchBlockState::TouchBlockState(const nsRefPtr<AsyncPanZoomController>& aTargetApzc,
bool aTargetConfirmed)
: CancelableBlockState(aTargetApzc, aTargetConfirmed)
, mAllowedTouchBehaviorSet(false)
, mDuringFastMotion(false)
, mSingleTapOccurred(false)
{
TBS_LOG("Creating %p\n", this);
}
示例4: MOZ_ASSERT
MultiTouchInput
TouchBlockState::RemoveFirstEvent()
{
MOZ_ASSERT(!mEvents.IsEmpty());
TBS_LOG("%p returning first of %d events\n", this, mEvents.Length());
MultiTouchInput event = mEvents[0];
mEvents.RemoveElementAt(0);
return event;
}
示例5: while
void
TouchBlockState::HandleEvents()
{
while (HasEvents()) {
TBS_LOG("%p returning first of %" PRIuSIZE " events\n", this, mEvents.Length());
MultiTouchInput event = mEvents[0];
mEvents.RemoveElementAt(0);
GetTargetApzc()->HandleInputEvent(event, mTransformToApzc);
}
}
示例6: while
void
WheelBlockState::HandleEvents()
{
while (HasEvents()) {
TBS_LOG("%p returning first of %lu events\n", this, mEvents.Length());
ScrollWheelInput event = mEvents[0];
mEvents.RemoveElementAt(0);
GetTargetApzc()->HandleInputEvent(event, mTransformToApzc);
}
}
示例7: while
void
TouchBlockState::HandleEvents()
{
while (HasEvents()) {
TBS_LOG("%p returning first of %" PRIuSIZE " events\n", this, mEvents.Length());
MultiTouchInput event = mEvents[0];
mEvents.RemoveElementAt(0);
DispatchEvent(event);
}
}
示例8: mAllowedTouchBehaviorSet
TouchBlockState::TouchBlockState()
: mAllowedTouchBehaviorSet(false)
, mPreventDefault(false)
, mContentResponded(false)
, mContentResponseTimerExpired(false)
, mSingleTapDisallowed(false)
, mSingleTapOccurred(false)
{
TBS_LOG("Creating %p\n", this);
}
示例9: CancelableBlockState
TouchBlockState::TouchBlockState(const RefPtr<AsyncPanZoomController>& aTargetApzc,
bool aTargetConfirmed, TouchCounter& aCounter)
: CancelableBlockState(aTargetApzc, aTargetConfirmed)
, mAllowedTouchBehaviorSet(false)
, mDuringFastFling(false)
, mSingleTapOccurred(false)
, mInSlop(false)
, mTouchCounter(aCounter)
{
TBS_LOG("Creating %p\n", this);
}
示例10: MOZ_ASSERT
bool
WheelBlockState::MaybeTimeout(const ScrollWheelInput& aEvent)
{
MOZ_ASSERT(InTransaction());
if (MaybeTimeout(aEvent.mTimeStamp)) {
return true;
}
if (!mLastMouseMove.IsNull()) {
// If there's a recent mouse movement, we can time out the transaction early.
TimeDuration duration = TimeStamp::Now() - mLastMouseMove;
if (duration.ToMilliseconds() >= gfxPrefs::MouseWheelIgnoreMoveDelayMs()) {
TBS_LOG("%p wheel transaction timed out after mouse move\n", this);
EndTransaction();
return true;
}
}
return false;
}
示例11: TBS_LOG
bool
InputBlockState::SetConfirmedTargetApzc(const nsRefPtr<AsyncPanZoomController>& aTargetApzc)
{
if (mTargetConfirmed) {
return false;
}
mTargetConfirmed = true;
TBS_LOG("%p got confirmed target APZC %p\n", this, mTargetApzc.get());
if (mTargetApzc == aTargetApzc) {
// The confirmed target is the same as the tentative one, so we're done.
return true;
}
// Log enabled by default for now, we will put it in a TBS_LOG eventually
// once this code is more baked
printf_stderr("%p replacing unconfirmed target %p with real target %p\n",
this, mTargetApzc.get(), aTargetApzc.get());
UpdateTargetApzc(aTargetApzc);
return true;
}
示例12: TBS_LOG
void
WheelBlockState::DropEvents()
{
TBS_LOG("%p dropping %lu events\n", this, mEvents.Length());
mEvents.Clear();
}