Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Unified Diff: src/gpu/SkGrPixelRef.cpp

Issue 2072813002: Revert of Lots of progress switching to SkColorSpace rather than SkColorProfileType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/SkGr.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)) {
« no previous file with comments | « src/gpu/SkGr.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698