Let region decoders query the type and color space
b/36905374, b/32984164 Test: CtsGraphicsTestCases Written by: romainguy@ Change-Id: Ief4bba6ec3cd3446224199d05f06ffcffaaa72b5 Reviewed-on: https://skia-review.googlesource.com/13472 Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
This commit is contained in:
parent
7a34dca6c8
commit
479366cd14
@ -71,6 +71,12 @@ public:
|
||||
|
||||
virtual SkEncodedImageFormat getEncodedFormat() = 0;
|
||||
|
||||
virtual SkColorType computeOutputColorType(SkColorType requestedColorType) = 0;
|
||||
|
||||
virtual sk_sp<SkColorSpace> computeOutputColorSpace(SkColorType outputColorType,
|
||||
sk_sp<SkColorSpace> prefColorSpace = nullptr) = 0;
|
||||
|
||||
|
||||
int width() const { return fWidth; }
|
||||
int height() const { return fHeight; }
|
||||
|
||||
|
@ -32,6 +32,15 @@ public:
|
||||
|
||||
SkEncodedImageFormat getEncodedFormat() override { return fCodec->getEncodedFormat(); }
|
||||
|
||||
SkColorType computeOutputColorType(SkColorType requestedColorType) override {
|
||||
return fCodec->computeOutputColorType(requestedColorType);
|
||||
}
|
||||
|
||||
sk_sp<SkColorSpace> computeOutputColorSpace(SkColorType outputColorType,
|
||||
sk_sp<SkColorSpace> prefColorSpace = nullptr) override {
|
||||
return fCodec->computeOutputColorSpace(outputColorType, prefColorSpace);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
std::unique_ptr<SkAndroidCodec> fCodec;
|
||||
|
Loading…
Reference in New Issue
Block a user