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

Unified Diff: ui/gfx/color_space.cc

Issue 2752523006: cc: Use SkCreateColorSpaceXformCanvas for color transforms (Closed)
Patch Set: Rebase Created 3 years, 9 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 | « ui/gfx/color_space.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/color_space.cc
diff --git a/ui/gfx/color_space.cc b/ui/gfx/color_space.cc
index b90b8c9adb32f561a4d59ab041c28a1a041e901d..38f8bff962acc904559291d335f093b8da928ba0 100644
--- a/ui/gfx/color_space.cc
+++ b/ui/gfx/color_space.cc
@@ -424,31 +424,6 @@ sk_sp<SkColorSpace> ColorSpace::ToSkColorSpace() const {
return SkColorSpace::MakeRGB(fn, to_xyz_d50);
}
-sk_sp<SkColorSpace> ColorSpace::ToNonlinearBlendedSkColorSpace() const {
- if (!IsValid()) {
- DLOG(ERROR) << "Cannot create SkColorSpace for invalid space.";
- return nullptr;
- }
- if (matrix_ != MatrixID::RGB) {
- DLOG(ERROR) << "Not creating non-RGB SkColorSpace";
- return nullptr;
- }
- if (range_ != RangeID::FULL) {
- DLOG(ERROR) << "Not creating non-full-range SkColorSpace";
- return nullptr;
- }
-
- SkMatrix44 primaries;
- GetPrimaryMatrix(&primaries);
- SkColorSpaceTransferFn tr_fn;
- if (!GetTransferFunction(&tr_fn)) {
- DLOG(ERROR) << "Not creating non-parametric nonlinear-blended SkColorSpace";
- return nullptr;
- }
- return SkColorSpace::MakeRGB(tr_fn, primaries,
- SkColorSpace::kNonLinearBlending_ColorSpaceFlag);
-}
-
bool ColorSpace::GetICCProfile(ICCProfile* icc_profile) const {
if (!IsValid()) {
DLOG(ERROR) << "Cannot fetch ICCProfile for invalid space.";
« no previous file with comments | « ui/gfx/color_space.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698