mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 23:13:18 +00:00
c99a51f5f4
- Bug 1182963 - Use nsTHashTable::Iterator in FrameLayerBuilder. r=roc,njn Get rid of EnumerateEntries by inlining those enumerate functions. Also move gPaintedDisplayItemLayerUserData, gColorLayerUserData, etc. to the front of the file since LayerManagerData::Dump() references to one of them. (4215d86e0) - Bug 1182744 - Make MaskLayerImageKey::mLayerCount and its mutators private. r=dholbert (ae7381aee) - Bug 1182963 - Use nsTHashTable::Iterator in MaskLayerImageCache. r=njn (60770935a) - Bug 1182963 - Use nsTHashTable::Iterator in nsRefreshDriver. r=njn (311c72284) - Bug 1182963 - Use nsTHashTable::Iterator in nsPresShell. r=njn (ef8af9c5b) - Bug 1182963 - Use nsTHashTable::Iterator in nsPresContext. r=njn (e248de8c8) - Bug 1182973 - Use nsTHashtable::Iterator in dom/bindings/. r=bz. Changing the return type of Enumerator from PLDHashOperator to void -- possible because the only such functions always return PL_DHASH_NEXT -- is a double-win here. (68ad67b8c) - Bug 1182961 (part 1, attempt 2) - Use nsTHashtable::Iterator in CacheIndex. r=michal. (e84f52fdf) - Bug 1182961 (part 3, attempt 2) - Use nsTHashtable::Iterator in CacheIndex. r=michal. (b099c48a5) - Bug 1182961 (part 2, attempt 2) - Use nsTHashtable::Iterator in CacheIndex. r=michal. (ffccf9c18) - Bug 1182975 - Part 1: Use early return consistently when iterating over mBoundContentSet. r=wchen (8f7d57782) - Bug 1182975 - Part 2: Convert EnumRuleProcessors to use an iterator. r=wchen (7f36b3706) - Bug 1182975 - Part 3: Convert the rest of the uses of EnumerateEntries in nsBindingManager to Iterator(). r=wchen (c3caecad2) - Bug 1183158 - Part 1: Get rid of RegistrationEnumerator; r=baku (bdadc7d7b) - Bug 1183158 - Part 2: Get rid of SoftUpdateEnumerator; r=baku (d0133d02e) - Bug 1183158 - Part 3: Get rid of UnregisterEnumerator; r=baku (48e1e3396) - Bug 1183158 - Part 4: Get rid of RemoveEnumerator; r=baku (4ce903c6a) - Bug 1183158 - Part 5: Get rid of RemoveAllEnumerator; r=baku (9df9eea73)
71 lines
1.7 KiB
C++
71 lines
1.7 KiB
C++
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "MaskLayerImageCache.h"
|
|
#include "ImageContainer.h"
|
|
|
|
using namespace mozilla::layers;
|
|
|
|
namespace mozilla {
|
|
|
|
MaskLayerImageCache::MaskLayerImageCache()
|
|
{
|
|
MOZ_COUNT_CTOR(MaskLayerImageCache);
|
|
}
|
|
MaskLayerImageCache::~MaskLayerImageCache()
|
|
{
|
|
MOZ_COUNT_DTOR(MaskLayerImageCache);
|
|
}
|
|
|
|
void
|
|
MaskLayerImageCache::Sweep()
|
|
{
|
|
for (auto iter = mMaskImageContainers.Iter(); !iter.Done(); iter.Next()) {
|
|
const MaskLayerImageCache::MaskLayerImageKey* key = iter.Get()->mKey;
|
|
if (key->HasZeroLayerCount()) {
|
|
iter.Remove();
|
|
}
|
|
}
|
|
}
|
|
|
|
ImageContainer*
|
|
MaskLayerImageCache::FindImageFor(const MaskLayerImageKey** aKey)
|
|
{
|
|
if (MaskLayerImageEntry* entry = mMaskImageContainers.GetEntry(**aKey)) {
|
|
*aKey = entry->mKey.get();
|
|
return entry->mContainer;
|
|
}
|
|
|
|
return nullptr;
|
|
}
|
|
|
|
void
|
|
MaskLayerImageCache::PutImage(const MaskLayerImageKey* aKey, ImageContainer* aContainer)
|
|
{
|
|
MaskLayerImageEntry* entry = mMaskImageContainers.PutEntry(*aKey);
|
|
entry->mContainer = aContainer;
|
|
}
|
|
|
|
MaskLayerImageCache::MaskLayerImageKey::MaskLayerImageKey()
|
|
: mRoundedClipRects()
|
|
, mLayerCount(0)
|
|
{
|
|
MOZ_COUNT_CTOR(MaskLayerImageKey);
|
|
}
|
|
|
|
MaskLayerImageCache::MaskLayerImageKey::MaskLayerImageKey(const MaskLayerImageKey& aKey)
|
|
: mRoundedClipRects(aKey.mRoundedClipRects)
|
|
, mLayerCount(aKey.mLayerCount)
|
|
{
|
|
MOZ_COUNT_CTOR(MaskLayerImageKey);
|
|
}
|
|
|
|
MaskLayerImageCache::MaskLayerImageKey::~MaskLayerImageKey()
|
|
{
|
|
MOZ_COUNT_DTOR(MaskLayerImageKey);
|
|
}
|
|
|
|
} // namespace mozilla
|