Remove GrContext variant of SkImageGenerator::isValid

This method isn't used by anyone, and I needed to land SOMETHING
in the middle of banging my head against CL 310656 :-)

Bug: skia:104662
Change-Id: Iaf529ac7551b22213891eb4be78d7904938aa989
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/311816
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This commit is contained in:
Adlai Holler 2020-08-19 13:51:10 -04:00 committed by Skia Commit-Bot
parent 9d944236e8
commit ed1bf120d9
2 changed files with 1 additions and 20 deletions

View File

@ -60,10 +60,6 @@ public:
return this->onIsValid(context);
}
/** Deprecated.
*/
bool isValid(GrContext* context) const;
/**
* Decode into the given pixels, a block of memory of size at
* least (info.fHeight - 1) * rowBytes + (info.fWidth *
@ -138,7 +134,7 @@ public:
* return false;
* }
*
* Regarding the GrContext parameter:
* Regarding the GrRecordingContext parameter:
*
* It must be non-NULL. The generator should only succeed if:
* - its internal context is the same

View File

@ -10,26 +10,11 @@
#include "include/core/SkYUVAIndex.h"
#include "src/core/SkNextID.h"
#if SK_SUPPORT_GPU
#include "include/gpu/GrDirectContext.h"
#endif
SkImageGenerator::SkImageGenerator(const SkImageInfo& info, uint32_t uniqueID)
: fInfo(info)
, fUniqueID(kNeedNewImageUniqueID == uniqueID ? SkNextID::ImageID() : uniqueID)
{}
bool SkImageGenerator::isValid(GrContext* context) const {
#if SK_SUPPORT_GPU
return this->isValid(static_cast<GrRecordingContext*>(context));
#else
if (context) {
return false;
}
return this->isValid(static_cast<GrRecordingContext*>(nullptr));
#endif
}
bool SkImageGenerator::getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes) {
if (kUnknown_SkColorType == info.colorType()) {
return false;