diff options
Diffstat (limited to 'src/gpu/SkGrPixelRef.cpp')
-rw-r--r-- | src/gpu/SkGrPixelRef.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gpu/SkGrPixelRef.cpp b/src/gpu/SkGrPixelRef.cpp index df2300369d..df720da551 100644 --- a/src/gpu/SkGrPixelRef.cpp +++ b/src/gpu/SkGrPixelRef.cpp @@ -50,7 +50,7 @@ bool SkROLockPixelsPixelRef::onLockPixelsAreWritable() const { /////////////////////////////////////////////////////////////////////////////// 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 @@ static SkGrPixelRef* copy_to_new_texture_pixelref(GrTexture* texture, SkColorTyp 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 @@ static SkGrPixelRef* copy_to_new_texture_pixelref(GrTexture* texture, SkColorTyp 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 @@ void SkGrPixelRef::onNotifyPixelsChanged() { } } -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 @@ SkPixelRef* SkGrPixelRef::deepCopy(SkColorType dstCT, SkColorSpace* dstCS, const // 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 @@ bool SkGrPixelRef::onReadPixels(SkBitmap* dst, SkColorType colorType, const SkIR 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)) { |