• Home
  • Raw
  • Download

Lines Matching refs:bitmap

100 bool TextureCache::canMakeTextureFromBitmap(const SkBitmap* bitmap) {  in canMakeTextureFromBitmap()  argument
101 if (bitmap->width() > mMaxTextureSize || bitmap->height() > mMaxTextureSize) { in canMakeTextureFromBitmap()
103 bitmap->width(), bitmap->height(), mMaxTextureSize, mMaxTextureSize); in canMakeTextureFromBitmap()
111 Texture* TextureCache::getCachedTexture(const SkBitmap* bitmap, AtlasUsageType atlasUsageType) { in getCachedTexture() argument
113 AssetAtlas::Entry* entry = mAssetAtlas->getEntry(bitmap->pixelRef()); in getCachedTexture()
119 Texture* texture = mCache.get(bitmap->pixelRef()->getStableID()); in getCachedTexture()
122 if (!canMakeTextureFromBitmap(bitmap)) { in getCachedTexture()
126 const uint32_t size = bitmap->rowBytes() * bitmap->height(); in getCachedTexture()
141 texture->generation = bitmap->getGenerationID(); in getCachedTexture()
142 texture->upload(*bitmap); in getCachedTexture()
146 bitmap, texture->id, size, mSize); in getCachedTexture()
150 mCache.put(bitmap->pixelRef()->getStableID(), texture); in getCachedTexture()
152 } else if (!texture->isInUse && bitmap->getGenerationID() != texture->generation) { in getCachedTexture()
155 texture->upload(*bitmap); in getCachedTexture()
156 texture->generation = bitmap->getGenerationID(); in getCachedTexture()
162 bool TextureCache::prefetchAndMarkInUse(void* ownerToken, const SkBitmap* bitmap) { in prefetchAndMarkInUse() argument
163 Texture* texture = getCachedTexture(bitmap, AtlasUsageType::Use); in prefetchAndMarkInUse()
170 Texture* TextureCache::get(const SkBitmap* bitmap, AtlasUsageType atlasUsageType) { in get() argument
171 Texture* texture = getCachedTexture(bitmap, atlasUsageType); in get()
174 if (!canMakeTextureFromBitmap(bitmap)) { in get()
178 const uint32_t size = bitmap->rowBytes() * bitmap->height(); in get()
181 texture->upload(*bitmap); in get()
182 texture->generation = bitmap->getGenerationID(); in get()