Commit 776841af authored by msarett's avatar msarett Committed by Commit bot

Switch Canvas2DLayerBridge to new SkColorSpace gamma APIs

This is an incremental step in the clean-up of
SkColorSpace enums.  Shouldn't change any behavior.

BUG=

Review-Url: https://codereview.chromium.org/2316123002
Cr-Commit-Position: refs/heads/master@{#417000}
parent 68218733
......@@ -773,14 +773,11 @@ static gfx::ColorSpace SkColorSpaceToColorSpace(const SkColorSpace* skColorSpace
return gfx::ColorSpace();
gfx::ColorSpace::TransferID transferID = gfx::ColorSpace::TransferID::UNSPECIFIED;
switch (skColorSpace->gammaNamed()) {
case SkColorSpace::kSRGB_GammaNamed:
if (skColorSpace->gammaCloseToSRGB()) {
transferID = gfx::ColorSpace::TransferID::IEC61966_2_1;
break;
case SkColorSpace::kLinear_GammaNamed:
} else if (skColorSpace->gammaIsLinear()) {
transferID = gfx::ColorSpace::TransferID::LINEAR;
break;
default:
} else {
// TODO(crbug.com/634102): Not all curve type are supported
DCHECK(false);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment