Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6921 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
9c56a8dea6
commit
2859eb74f9
@ -485,7 +485,7 @@ public:
|
|||||||
* Initialize the cache ID to a domain and key.
|
* Initialize the cache ID to a domain and key.
|
||||||
*/
|
*/
|
||||||
GrCacheID(Domain domain, const Key& key) {
|
GrCacheID(Domain domain, const Key& key) {
|
||||||
GrAssert(kInvalid_Domain != domain);
|
GrAssert(kInvalid_Domain != domain);
|
||||||
this->reset(domain, key);
|
this->reset(domain, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -499,7 +499,7 @@ public:
|
|||||||
|
|
||||||
const Key& getKey() const { GrAssert(this->isValid()); return fKey; }
|
const Key& getKey() const { GrAssert(this->isValid()); return fKey; }
|
||||||
Domain getDomain() const { GrAssert(this->isValid()); return fDomain; }
|
Domain getDomain() const { GrAssert(this->isValid()); return fDomain; }
|
||||||
|
|
||||||
/** Creates a new unique ID domain. */
|
/** Creates a new unique ID domain. */
|
||||||
static Domain GenerateDomain();
|
static Domain GenerateDomain();
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ private:
|
|||||||
uint8_t fKey8[kKeySize];
|
uint8_t fKey8[kKeySize];
|
||||||
uint32_t fKey32[kKeySize / 4];
|
uint32_t fKey32[kKeySize / 4];
|
||||||
} keyData;
|
} keyData;
|
||||||
|
|
||||||
uint8_t* k = keyData.fKey8;
|
uint8_t* k = keyData.fKey8;
|
||||||
memcpy(k + kCacheIDKeyOffset, key.fData8, sizeof(GrCacheID::Key));
|
memcpy(k + kCacheIDKeyOffset, key.fData8, sizeof(GrCacheID::Key));
|
||||||
memcpy(k + kCacheIDDomainOffset, &domain, sizeof(GrCacheID::Domain));
|
memcpy(k + kCacheIDDomainOffset, &domain, sizeof(GrCacheID::Domain));
|
||||||
@ -134,7 +134,7 @@ private:
|
|||||||
int compare(const HashedKey& hashedKey) const {
|
int compare(const HashedKey& hashedKey) const {
|
||||||
return fHashedKey.compare(fHashedKey);
|
return fHashedKey.compare(fHashedKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
HashedKey fHashedKey;
|
HashedKey fHashedKey;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ enum TextureFlags {
|
|||||||
kStretchToPOT_TextureFlag = 0x1,
|
kStretchToPOT_TextureFlag = 0x1,
|
||||||
/**
|
/**
|
||||||
* The kFilter bit can only be set when the kStretchToPOT flag is set and indicates whether the
|
* The kFilter bit can only be set when the kStretchToPOT flag is set and indicates whether the
|
||||||
* stretched texture should be bilerp filtered or point sampled.
|
* stretched texture should be bilerp filtered or point sampled.
|
||||||
*/
|
*/
|
||||||
kFilter_TextureFlag = 0x2,
|
kFilter_TextureFlag = 0x2,
|
||||||
};
|
};
|
||||||
|
@ -64,7 +64,7 @@ static void generate_bitmap_cache_id(const SkBitmap& bitmap, GrCacheID* id) {
|
|||||||
int16_t width = static_cast<int16_t>(bitmap.width());
|
int16_t width = static_cast<int16_t>(bitmap.width());
|
||||||
int16_t height = static_cast<int16_t>(bitmap.height());
|
int16_t height = static_cast<int16_t>(bitmap.height());
|
||||||
|
|
||||||
GrCacheID::Key key;
|
GrCacheID::Key key;
|
||||||
memcpy(key.fData8, &genID, 4);
|
memcpy(key.fData8, &genID, 4);
|
||||||
memcpy(key.fData8 + 4, &width, 2);
|
memcpy(key.fData8 + 4, &width, 2);
|
||||||
memcpy(key.fData8 + 6, &height, 2);
|
memcpy(key.fData8 + 6, &height, 2);
|
||||||
|
@ -195,7 +195,7 @@ void GrTextureStripAtlas::lockTexture() {
|
|||||||
texDesc.fWidth = fDesc.fWidth;
|
texDesc.fWidth = fDesc.fWidth;
|
||||||
texDesc.fHeight = fDesc.fHeight;
|
texDesc.fHeight = fDesc.fHeight;
|
||||||
texDesc.fConfig = fDesc.fConfig;
|
texDesc.fConfig = fDesc.fConfig;
|
||||||
|
|
||||||
static const GrCacheID::Domain gTextureStripAtlasDomain = GrCacheID::GenerateDomain();
|
static const GrCacheID::Domain gTextureStripAtlasDomain = GrCacheID::GenerateDomain();
|
||||||
GrCacheID::Key key;
|
GrCacheID::Key key;
|
||||||
*key.fData32 = fCacheKey;
|
*key.fData32 = fCacheKey;
|
||||||
|
Loading…
Reference in New Issue
Block a user