Skip to content

Commit

Permalink
Remove GrContext variant of SkImage::isValid
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Brian Salomon <[email protected]>
Commit-Queue: Adlai Holler <[email protected]>
  • Loading branch information
Adlai-Holler authored and Skia Commit-Bot committed Jul 22, 2020
1 parent 6e1eb16 commit 0137355
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
4 changes: 0 additions & 4 deletions include/core/SkImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -860,10 +860,6 @@ class SK_API SkImage : public SkRefCnt {
*/
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.
Expand Down
21 changes: 5 additions & 16 deletions src/image/SkImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down

0 comments on commit 0137355

Please sign in to comment.