| Index: src/gpu/SkGpuDevice.h
|
| diff --git a/src/gpu/SkGpuDevice.h b/src/gpu/SkGpuDevice.h
|
| index 811175937c8dddd7d2ace4596e3aaf6fc0522b83..7e646a13f162e72777e56fa38f130e4466ccc0fe 100644
|
| --- a/src/gpu/SkGpuDevice.h
|
| +++ b/src/gpu/SkGpuDevice.h
|
| @@ -9,6 +9,7 @@
|
| #define SkGpuDevice_DEFINED
|
|
|
| #include "SkGr.h"
|
| +#include "SkGrPriv.h"
|
| #include "SkBitmap.h"
|
| #include "SkDevice.h"
|
| #include "SkPicture.h"
|
| @@ -82,10 +83,13 @@ public:
|
| GrDrawContext* accessDrawContext() override;
|
|
|
| SkImageInfo imageInfo() const override {
|
| - SkAlphaType at = fOpaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType;
|
| - SkImageInfo info = fRenderTarget->surfacePriv().info(at).makeWH(fSize.fWidth,
|
| - fSize.fHeight);
|
| - return info;
|
| + SkColorType colorType;
|
| + if (!GrPixelConfigToColorType(fRenderTarget->config(), &colorType)) {
|
| + colorType = kUnknown_SkColorType;
|
| + }
|
| + return SkImageInfo::Make(fSize.fWidth, fSize.fHeight, colorType,
|
| + fOpaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType,
|
| + sk_ref_sp(fDrawContext->getColorSpace()));
|
| }
|
|
|
| void drawPaint(const SkDraw&, const SkPaint& paint) override;
|
|
|