Remove sampler state param from lockKeylessTexture. It didn't serve any function and gave the false impression that tiling modes were handled on APIs with npot limitations.
http://codereview.appspot.com/4444061/ git-svn-id: http://skia.googlecode.com/svn/trunk@1181 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
ea4ac97dec
commit
a39f404c87
@ -99,9 +99,14 @@ public:
|
||||
* requests with the same descriptor are not guaranteed to return the same
|
||||
* texture. The same texture is guaranteed not be returned again until it is
|
||||
* unlocked.
|
||||
*
|
||||
* Textures created by createAndLockTexture() hide the complications of
|
||||
* tiling non-power-of-two textures on APIs that don't support this (e.g.
|
||||
* unextended GLES2). Tiling a npot texture created by lockKeylessTexture on
|
||||
* such an API will create gaps in the tiling pattern. This includes clamp
|
||||
* mode. (This may be addressed in a future update.)
|
||||
*/
|
||||
GrTextureEntry* lockKeylessTexture(const GrTextureDesc& desc,
|
||||
const GrSamplerState& state);
|
||||
GrTextureEntry* lockKeylessTexture(const GrTextureDesc& desc);
|
||||
|
||||
/**
|
||||
* When done with an entry, call unlockTexture(entry) on it, which returns
|
||||
|
@ -281,12 +281,12 @@ GrTextureEntry* GrContext::createAndLockTexture(GrTextureKey* key,
|
||||
return entry;
|
||||
}
|
||||
|
||||
GrTextureEntry* GrContext::lockKeylessTexture(const GrTextureDesc& desc,
|
||||
const GrSamplerState& state) {
|
||||
GrTextureEntry* GrContext::lockKeylessTexture(const GrTextureDesc& desc) {
|
||||
uint32_t p0 = desc.fFormat;
|
||||
uint32_t p1 = (desc.fAALevel << 16) | desc.fFlags;
|
||||
GrTextureKey key(p0, p1, desc.fWidth, desc.fHeight);
|
||||
this->finalizeTextureKey(&key, state, true);
|
||||
this->finalizeTextureKey(&key, GrSamplerState::ClampNoFilter(), true);
|
||||
|
||||
GrTextureEntry* entry = fTextureCache->findAndLock(key);
|
||||
if (NULL == entry) {
|
||||
GrTexture* texture = fGpu->createTexture(desc, NULL, 0);
|
||||
|
@ -1261,7 +1261,7 @@ SkGpuDevice::TexCache* SkGpuDevice::lockCachedTexture(const SkBitmap& bitmap,
|
||||
bitmap.height(),
|
||||
SkGr::Bitmap2PixelConfig(bitmap)
|
||||
};
|
||||
entry = ctx->lockKeylessTexture(desc, sampler);
|
||||
entry = ctx->lockKeylessTexture(desc);
|
||||
} else {
|
||||
uint32_t p0, p1;
|
||||
p0 = bitmap.getGenerationID();
|
||||
|
Loading…
Reference in New Issue
Block a user