Remove GrDirectContext::ComputeImageSize. Use SkImage::textureSize.

Bug: skia:11208
Change-Id: Ie5f56b6d168ab43189be75bb2be60b315e724569
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/371958
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Brian Salomon 2021-02-18 09:02:14 -05:00 committed by Skia Commit-Bot
parent d2a3912e88
commit bde1eb681c
3 changed files with 3 additions and 21 deletions

View File

@ -6,8 +6,10 @@ This file includes a list of high level updates for each milestone release.
Milestone 90
------------
* GrDirectContext::ComputeImageSize() no longer takes nextPow2 argument.
* GrDirectContext::ComputeImageSize() is removed. Use SkImage::textureSize() instead.
https://review.skia.org/368621
https://review.skia.org/369317
https://review.skia.org/371958
* Remove SkImageFilter::MakeMatrixFilter as it was unused and replaced with
SkImageFilters::MatrixTransform.

View File

@ -400,11 +400,6 @@ public:
void storeVkPipelineCacheData();
// Returns the gpu memory size of the the texture that backs the passed in SkImage. Returns 0 if
// the SkImage is not texture backed. For external format textures this will also return 0 as we
// cannot determine the correct size.
static size_t ComputeImageSize(sk_sp<SkImage> image, GrMipmapped);
/**
* Retrieve the default GrBackendFormat for a given SkColorType and renderability.
* It is guaranteed that this backend format will be the one used by the following

View File

@ -434,21 +434,6 @@ void GrDirectContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) c
this->getTextBlobCache()->usedBytes());
}
size_t GrDirectContext::ComputeImageSize(sk_sp<SkImage> image, GrMipmapped mipmapped) {
if (!image->isTextureBacked()) {
return 0;
}
SkImage_GpuBase* gpuImage = static_cast<SkImage_GpuBase*>(as_IB(image.get()));
GrTextureProxy* proxy = gpuImage->peekProxy();
if (!proxy) {
return 0;
}
int colorSamplesPerPixel = 1;
return GrSurface::ComputeSize(proxy->backendFormat(), image->dimensions(),
colorSamplesPerPixel, mipmapped);
}
GrBackendTexture GrDirectContext::createBackendTexture(int width, int height,
const GrBackendFormat& backendFormat,
GrMipmapped mipMapped,