Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 826484f

Browse files
egdanielSkia Commit-Bot
authored andcommitted
Always report SkImage_Gpu subclasses as being texture backed.
Change-Id: I1af002df1b07f04543b32add94bfdc0a016a338b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259284 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
1 parent f410794 commit 826484f

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/image/SkImage_Gpu.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ class SkImage_Gpu : public SkImage_GpuBase {
3535
return fProxy;
3636
}
3737

38-
bool onIsTextureBacked() const override { return SkToBool(fProxy.get()); }
38+
bool onIsTextureBacked() const override {
39+
SkASSERT(fProxy);
40+
return true;
41+
}
3942

4043
sk_sp<SkImage> onMakeColorTypeAndColorSpace(GrRecordingContext*,
4144
SkColorType, sk_sp<SkColorSpace>) const final;

src/image/SkImage_GpuYUVA.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ class SkImage_GpuYUVA : public SkImage_GpuBase {
3535
GrTextureProxy* peekProxy() const override;
3636
sk_sp<GrTextureProxy> asTextureProxyRef(GrRecordingContext*) const override;
3737

38-
virtual bool onIsTextureBacked() const override { return fProxies[0] || fRGBProxy; }
38+
bool onIsTextureBacked() const override {
39+
SkASSERT(fProxies[0] || fRGBProxy);
40+
return true;
41+
}
3942

4043
sk_sp<SkImage> onMakeColorTypeAndColorSpace(GrRecordingContext*,
4144
SkColorType, sk_sp<SkColorSpace>) const final;

0 commit comments

Comments
 (0)