Index: src/gpu/SkGrPixelRef.cpp |
diff --git a/src/gpu/SkGrPixelRef.cpp b/src/gpu/SkGrPixelRef.cpp |
index df2300369d3359a8311a6f86c55422f7704ec795..df720da55119d656521765eaaf8ab0667bb078b0 100644 |
--- a/src/gpu/SkGrPixelRef.cpp |
+++ b/src/gpu/SkGrPixelRef.cpp |
@@ -50,7 +50,7 @@ |
/////////////////////////////////////////////////////////////////////////////// |
static SkGrPixelRef* copy_to_new_texture_pixelref(GrTexture* texture, SkColorType dstCT, |
- SkColorSpace* dstCS, const SkIRect* subset) { |
+ SkColorProfileType dstPT, const SkIRect* subset) { |
if (nullptr == texture || kUnknown_SkColorType == dstCT) { |
return nullptr; |
} |
@@ -74,7 +74,7 @@ |
srcRect = *subset; |
} |
desc.fFlags = kRenderTarget_GrSurfaceFlag; |
- desc.fConfig = SkImageInfo2GrPixelConfig(dstCT, kPremul_SkAlphaType, dstCS, *context->caps()); |
+ desc.fConfig = SkImageInfo2GrPixelConfig(dstCT, kPremul_SkAlphaType, dstPT, *context->caps()); |
desc.fIsMipMapped = false; |
GrTexture* dst = context->textureProvider()->createTexture(desc, SkBudgeted::kNo, nullptr, 0); |
@@ -89,7 +89,7 @@ |
context->flushSurfaceWrites(dst); |
SkImageInfo info = SkImageInfo::Make(desc.fWidth, desc.fHeight, dstCT, kPremul_SkAlphaType, |
- sk_ref_sp(dstCS)); |
+ dstPT); |
SkGrPixelRef* pixelRef = new SkGrPixelRef(info, dst); |
SkSafeUnref(dst); |
return pixelRef; |
@@ -130,7 +130,8 @@ |
} |
} |
-SkPixelRef* SkGrPixelRef::deepCopy(SkColorType dstCT, SkColorSpace* dstCS, const SkIRect* subset) { |
+SkPixelRef* SkGrPixelRef::deepCopy(SkColorType dstCT, SkColorProfileType dstPT, |
+ const SkIRect* subset) { |
if (nullptr == fSurface) { |
return nullptr; |
} |
@@ -141,7 +142,7 @@ |
// a GrTexture owned elsewhere (e.g., SkGpuDevice), and cannot live |
// independently of that texture. Texture-backed pixel refs, on the other |
// hand, own their GrTextures, and are thus self-contained. |
- return copy_to_new_texture_pixelref(fSurface->asTexture(), dstCT, dstCS, subset); |
+ return copy_to_new_texture_pixelref(fSurface->asTexture(), dstCT, dstPT, subset); |
} |
static bool tryAllocBitmapPixels(SkBitmap* bitmap) { |
@@ -182,7 +183,7 @@ |
SkBitmap cachedBitmap; |
cachedBitmap.setInfo(SkImageInfo::Make(bounds.width(), bounds.height(), colorType, |
this->info().alphaType(), |
- sk_ref_sp(this->info().colorSpace()))); |
+ this->info().profileType())); |
// If we can't alloc the pixels, then fail |
if (!tryAllocBitmapPixels(&cachedBitmap)) { |