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

Unified Diff: src/gpu/GrSurface.cpp

Issue 791823003: Add sRGB texture support. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add in changes for copy_to_new_texture_pixelref Created 6 years 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
Index: src/gpu/GrSurface.cpp
diff --git a/src/gpu/GrSurface.cpp b/src/gpu/GrSurface.cpp
index 1ca305b5a11080ea446db9b006e6424eb8b64e45..678755a58f17c1a4b36b563f9b58aa2275e8c668 100644
--- a/src/gpu/GrSurface.cpp
+++ b/src/gpu/GrSurface.cpp
@@ -43,10 +43,12 @@ bool GrSurface::readPixels(int left, int top, int width, int height,
SkImageInfo GrSurface::info() const {
SkColorType colorType;
- if (!GrPixelConfig2ColorType(this->config(), &colorType)) {
+ SkColorProfileType profileType;
+ if (!GrPixelConfig2ColorAndProfileType(this->config(), &colorType, &profileType)) {
sk_throw();
}
- return SkImageInfo::Make(this->width(), this->height(), colorType, kPremul_SkAlphaType);
+ return SkImageInfo::Make(this->width(), this->height(), colorType, kPremul_SkAlphaType,
+ profileType);
}
// TODO: This should probably be a non-member helper function. It might only be needed in
« include/core/SkPixelRef.h ('K') | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698