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

Unified Diff: src/core/SkSpecialImage.cpp

Issue 2165703003: Adding an SkColorSpace to SkImage_Gpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: s/NULL/nullptr/ Created 4 years, 5 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 | « include/gpu/SkGr.h ('k') | src/gpu/GrTextureParamsAdjuster.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkSpecialImage.cpp
diff --git a/src/core/SkSpecialImage.cpp b/src/core/SkSpecialImage.cpp
index e3a14e57abde5ff8016d98ebbeb41b08d2082f8a..23334991885d17c85a512e0dab931cf3c0ae994f 100644
--- a/src/core/SkSpecialImage.cpp
+++ b/src/core/SkSpecialImage.cpp
@@ -467,9 +467,10 @@ public:
SkRect dst = SkRect::MakeXYWH(x, y,
this->subset().width(), this->subset().height());
+ // TODO: Supply correct color space after we're storing it here
auto img = sk_sp<SkImage>(new SkImage_Gpu(fTexture->width(), fTexture->height(),
this->uniqueID(), fAlphaType, fTexture.get(),
- SkBudgeted::kNo));
+ nullptr, SkBudgeted::kNo));
canvas->drawImageRect(img, this->subset(),
dst, paint, SkCanvas::kStrict_SrcRectConstraint);
@@ -546,9 +547,10 @@ public:
fTexture->width() == subset.width() &&
fTexture->height() == subset.height()) {
// The existing GrTexture is already tight so reuse it in the SkImage
+ // TODO: Supply correct color space after we're storing it here
return sk_make_sp<SkImage_Gpu>(fTexture->width(), fTexture->height(),
kNeedNewImageUniqueID,
- fAlphaType, fTexture.get(), SkBudgeted::kYes);
+ fAlphaType, fTexture.get(), nullptr, SkBudgeted::kYes);
}
GrContext* ctx = fTexture->getContext();
@@ -561,8 +563,9 @@ public:
return nullptr;
}
ctx->copySurface(subTx.get(), fTexture.get(), subset, SkIPoint::Make(0, 0));
+ // TODO: Supply correct color space after we're storing it here
return sk_make_sp<SkImage_Gpu>(desc.fWidth, desc.fHeight, kNeedNewImageUniqueID,
- fAlphaType, subTx.get(), SkBudgeted::kYes);
+ fAlphaType, subTx.get(), nullptr, SkBudgeted::kYes);
}
sk_sp<SkSurface> onMakeTightSurface(const SkImageInfo& info) const override {
« no previous file with comments | « include/gpu/SkGr.h ('k') | src/gpu/GrTextureParamsAdjuster.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698