Remove GrContext variant of SkImage::isValid

Chrome was migrated in CL 2310974.

Bug: skia:104662
Change-Id: I0a49a7a6787fcce4c2a934c09140a3e4dad95869
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304776
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
This commit is contained in:
Adlai Holler 2020-07-21 13:52:41 -04:00 committed by Skia Commit-Bot
parent 6e1eb168a5
commit 01373555fe
2 changed files with 5 additions and 20 deletions

View File

@ -860,10 +860,6 @@ public:
*/
bool isValid(GrRecordingContext* context) const;
/** Deprecated.
*/
bool isValid(GrContext* context) const;
/** Flushes any pending uses of texture-backed images in the GPU backend. If the image is not
texture-backed (including promise texture images) or if the the GrContext does not
have the same context ID as the context backing the image then this is a no-op.

View File

@ -207,15 +207,11 @@ GrBackendTexture SkImage::getBackendTexture(bool flushPendingGrContextIO,
return as_IB(this)->onGetBackendTexture(flushPendingGrContextIO, origin);
}
bool SkImage::isValid(GrRecordingContext* context) const {
if (context && context->abandoned()) {
bool SkImage::isValid(GrRecordingContext* rContext) const {
if (rContext && rContext->abandoned()) {
return false;
}
return as_IB(this)->onIsValid(context);
}
bool SkImage::isValid(GrContext* context) const {
return this->isValid(static_cast<GrRecordingContext*>(context));
return as_IB(this)->onIsValid(rContext);
}
GrSemaphoresSubmitted SkImage::flush(GrContext* context, const GrFlushInfo& flushInfo) {
@ -236,15 +232,8 @@ GrBackendTexture SkImage::getBackendTexture(bool flushPendingGrContextIO,
return GrBackendTexture(); // invalid
}
bool SkImage::isValid(GrRecordingContext* context) const {
if (context) {
return false;
}
return as_IB(this)->onIsValid(nullptr);
}
bool SkImage::isValid(GrContext* context) const {
if (context) {
bool SkImage::isValid(GrRecordingContext* rContext) const {
if (rContext) {
return false;
}
return as_IB(this)->onIsValid(nullptr);