Return correct GrBackendFormat when ycbcr conversion is valid.
Bug: skia: Change-Id: Ieb24c0169a150c153a468fbbe9a8f60766516860 Reviewed-on: https://skia-review.googlesource.com/c/193698 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
This commit is contained in:
parent
651446cc5d
commit
89df78400a
@ -55,6 +55,11 @@ public:
|
||||
}
|
||||
VkFormat imageFormat() const { return fInfo.fFormat; }
|
||||
GrBackendFormat getBackendFormat() const {
|
||||
if (fResource && this->ycbcrConversionInfo().isValid()) {
|
||||
SkASSERT(this->imageFormat() == VK_FORMAT_UNDEFINED);
|
||||
return GrBackendFormat::MakeVk(this->ycbcrConversionInfo());
|
||||
}
|
||||
SkASSERT(this->imageFormat() != VK_FORMAT_UNDEFINED);
|
||||
return GrBackendFormat::MakeVk(this->imageFormat());
|
||||
}
|
||||
uint32_t mipLevels() const { return fInfo.fLevelCount; }
|
||||
|
Loading…
Reference in New Issue
Block a user