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>
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; }
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;