mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1240708 - Various trivial coverity warning fixes. r=kats
This commit is contained in:
parent
d963206938
commit
9a2dc00d43
@ -58,6 +58,10 @@ ImageFactory::CreatePlanarYCbCrImage(const gfx::IntSize& aScaleHint, BufferRecyc
|
||||
|
||||
BufferRecycleBin::BufferRecycleBin()
|
||||
: mLock("mozilla.layers.BufferRecycleBin.mLock")
|
||||
// This member is only valid when the bin is not empty and will be properly
|
||||
// initialized in RecycleBuffer, but initializing it here avoids static analysis
|
||||
// noise.
|
||||
, mRecycledBufferSize(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -251,7 +251,6 @@ protected:
|
||||
void* mImplData;
|
||||
int32_t mSerial;
|
||||
ImageFormat mFormat;
|
||||
bool mSent;
|
||||
|
||||
static mozilla::Atomic<int32_t> sSerialCounter;
|
||||
};
|
||||
|
@ -693,15 +693,17 @@ private:
|
||||
// Stores state and data for frame intervals and paint times recording.
|
||||
// see LayerManager::StartFrameTimeRecording() at Layers.cpp for more details.
|
||||
FramesTimingRecording()
|
||||
: mIsPaused(true)
|
||||
, mNextIndex(0)
|
||||
: mNextIndex(0)
|
||||
, mLatestStartIndex(0)
|
||||
, mCurrentRunStartIndex(0)
|
||||
, mIsPaused(true)
|
||||
{}
|
||||
bool mIsPaused;
|
||||
uint32_t mNextIndex;
|
||||
TimeStamp mLastFrameTime;
|
||||
nsTArray<float> mIntervals;
|
||||
TimeStamp mLastFrameTime;
|
||||
uint32_t mNextIndex;
|
||||
uint32_t mLatestStartIndex;
|
||||
uint32_t mCurrentRunStartIndex;
|
||||
bool mIsPaused;
|
||||
};
|
||||
FramesTimingRecording mRecording;
|
||||
|
||||
|
@ -24,9 +24,12 @@ HitTestingTreeNode::HitTestingTreeNode(AsyncPanZoomController* aApzc,
|
||||
: mApzc(aApzc)
|
||||
, mIsPrimaryApzcHolder(aIsPrimaryHolder)
|
||||
, mLayersId(aLayersId)
|
||||
, mScrollViewId(FrameMetrics::NULL_SCROLL_ID)
|
||||
, mScrollDir(Layer::NONE)
|
||||
, mScrollSize(0)
|
||||
, mOverride(EventRegionsOverride::NoOverride)
|
||||
{
|
||||
if (mIsPrimaryApzcHolder) {
|
||||
if (mIsPrimaryApzcHolder) {
|
||||
MOZ_ASSERT(mApzc);
|
||||
}
|
||||
MOZ_ASSERT(!mApzc || mApzc->GetLayersId() == mLayersId);
|
||||
|
@ -652,7 +652,7 @@ ClientLayerManager::ForwardTransaction(bool aScheduleComposite)
|
||||
// PLayer::Send__delete__() and DeallocShmem()
|
||||
mKeepAlive.Clear();
|
||||
|
||||
TabChild* window = mWidget->GetOwningTabChild();
|
||||
TabChild* window = mWidget ? mWidget->GetOwningTabChild() : nullptr;
|
||||
if (window) {
|
||||
TimeStamp end = TimeStamp::Now();
|
||||
window->DidRequestComposite(start, end);
|
||||
|
@ -57,6 +57,7 @@ ClientSingleTiledLayerBuffer::ClientSingleTiledLayerBuffer(ClientTiledPaintedLay
|
||||
ClientLayerManager* aManager)
|
||||
: ClientTiledLayerBuffer(aPaintedLayer, aCompositableClient)
|
||||
, mManager(aManager)
|
||||
, mFormat(gfx::SurfaceFormat::UNKNOWN)
|
||||
{
|
||||
}
|
||||
|
||||
@ -107,6 +108,7 @@ ClientSingleTiledLayerBuffer::GetSurfaceDescriptorTiles()
|
||||
already_AddRefed<TextureClient>
|
||||
ClientSingleTiledLayerBuffer::GetTextureClient()
|
||||
{
|
||||
MOZ_ASSERT(mFormat != gfx::SurfaceFormat::UNKNOWN);
|
||||
return mCompositableClient->CreateTextureClientForDrawing(
|
||||
gfx::ImageFormatToSurfaceFormat(mFormat), mSize, BackendSelector::Content,
|
||||
TextureFlags::DISALLOW_BIGIMAGE | TextureFlags::IMMEDIATE_UPLOAD);
|
||||
|
@ -293,6 +293,8 @@ ClientMultiTiledLayerBuffer::ClientMultiTiledLayerBuffer(ClientTiledPaintedLayer
|
||||
SharedFrameMetricsHelper* aHelper)
|
||||
: ClientTiledLayerBuffer(aPaintedLayer, aCompositableClient)
|
||||
, mManager(aManager)
|
||||
, mCallback(nullptr)
|
||||
, mCallbackData(nullptr)
|
||||
, mSharedFrameMetricsHelper(aHelper)
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user