GrInstallBitmapUniqueKeyInvalidator(copyKey, fBmp->pixelRef());
}
+SkColorSpace* GrBitmapTextureAdjuster::getColorSpace() {
+ return fBmp->colorSpace();
+}
+
//////////////////////////////////////////////////////////////////////////////
// SkImage's don't have a way of communicating whether they're alpha-only. So we fallback to
// We don't currently have a mechanism for notifications on Images!
}
+SkColorSpace* GrImageTextureAdjuster::getColorSpace() {
+ return fImageBase->onImageInfo().colorSpace();
+}
+
//////////////////////////////////////////////////////////////////////////////
GrBitmapTextureMaker::GrBitmapTextureMaker(GrContext* context, const SkBitmap& bitmap)
GrInstallBitmapUniqueKeyInvalidator(copyKey, fBitmap.pixelRef());
}
+SkColorSpace* GrBitmapTextureMaker::getColorSpace() {
+ return fBitmap.colorSpace();
+}
+
//////////////////////////////////////////////////////////////////////////////
static bool cacher_is_alpha_only(const SkImageCacherator& cacher) {
return kAlpha_8_SkColorType == cacher.info().colorType();
as_IB(fClient)->notifyAddedToCache();
}
}
+
+SkColorSpace* GrImageTextureMaker::getColorSpace() {
+ return fCacher->info().colorSpace();
+}
public:
explicit GrBitmapTextureAdjuster(const SkBitmap* bmp);
+protected:
+ SkColorSpace* getColorSpace() override;
+
private:
void makeCopyKey(const CopyParams& params, GrUniqueKey* copyKey) override;
public:
explicit GrImageTextureAdjuster(const SkImage_Base* img);
+protected:
+ SkColorSpace* getColorSpace() override;
+
private:
void makeCopyKey(const CopyParams& params, GrUniqueKey* copyKey) override;
void didCacheCopy(const GrUniqueKey& copyKey) override;
+ SkColorSpace* getColorSpace() override;
+
private:
const SkBitmap fBitmap;
GrUniqueKey fOriginalKey;
void makeCopyKey(const CopyParams& stretch, GrUniqueKey* paramsCopyKey) override;
void didCacheCopy(const GrUniqueKey& copyKey) override;
+ SkColorSpace* getColorSpace() override;
+
private:
SkImageCacherator* fCacher;
const SkImage* fClient;