Rename WorseCaseSize to WorstCasSize
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2259863002 Review-Url: https://codereview.chromium.org/2259863002
This commit is contained in:
parent
5814b8a1dd
commit
f1c6cd7603
@ -126,7 +126,7 @@ public:
|
|||||||
fReleaseCtx = ctx;
|
fReleaseCtx = ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
static size_t WorseCaseSize(const GrSurfaceDesc& desc);
|
static size_t WorstCaseSize(const GrSurfaceDesc& desc);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Methods made available via GrSurfacePriv
|
// Methods made available via GrSurfacePriv
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include "SkImageEncoder.h"
|
#include "SkImageEncoder.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
size_t GrSurface::WorseCaseSize(const GrSurfaceDesc& desc) {
|
size_t GrSurface::WorstCaseSize(const GrSurfaceDesc& desc) {
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|
||||||
bool isRenderTarget = SkToBool(desc.fFlags & kRenderTarget_GrSurfaceFlag);
|
bool isRenderTarget = SkToBool(desc.fFlags & kRenderTarget_GrSurfaceFlag);
|
||||||
|
@ -51,7 +51,7 @@ size_t GrTexture::onGpuMemorySize() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SkASSERT(!SkToBool(fDesc.fFlags & kRenderTarget_GrSurfaceFlag));
|
SkASSERT(!SkToBool(fDesc.fFlags & kRenderTarget_GrSurfaceFlag));
|
||||||
SkASSERT(textureSize <= WorseCaseSize(fDesc));
|
SkASSERT(textureSize <= WorstCaseSize(fDesc));
|
||||||
|
|
||||||
return textureSize;
|
return textureSize;
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ GrTexture* GrTextureProvider::refScratchTexture(const GrSurfaceDesc& inDesc,
|
|||||||
scratchFlags = GrResourceCache::kPreferNoPendingIO_ScratchFlag;
|
scratchFlags = GrResourceCache::kPreferNoPendingIO_ScratchFlag;
|
||||||
}
|
}
|
||||||
GrGpuResource* resource = fCache->findAndRefScratchResource(key,
|
GrGpuResource* resource = fCache->findAndRefScratchResource(key,
|
||||||
GrSurface::WorseCaseSize(*desc),
|
GrSurface::WorstCaseSize(*desc),
|
||||||
scratchFlags);
|
scratchFlags);
|
||||||
if (resource) {
|
if (resource) {
|
||||||
GrSurface* surface = static_cast<GrSurface*>(resource);
|
GrSurface* surface = static_cast<GrSurface*>(resource);
|
||||||
|
@ -61,7 +61,7 @@ void GrGLRenderTarget::init(const GrSurfaceDesc& desc, const IDDesc& idDesc) {
|
|||||||
|
|
||||||
fGpuMemorySize = this->totalSamples() * this->totalBytesPerSample();
|
fGpuMemorySize = this->totalSamples() * this->totalBytesPerSample();
|
||||||
|
|
||||||
SkASSERT(fGpuMemorySize <= WorseCaseSize(desc));
|
SkASSERT(fGpuMemorySize <= WorstCaseSize(desc));
|
||||||
}
|
}
|
||||||
|
|
||||||
GrGLRenderTarget* GrGLRenderTarget::CreateWrapped(GrGLGpu* gpu,
|
GrGLRenderTarget* GrGLRenderTarget::CreateWrapped(GrGLGpu* gpu,
|
||||||
|
Loading…
Reference in New Issue
Block a user