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

Side by Side Diff: src/codec/SkCodecPriv.h

Issue 2294993002: Add color xform support to SkWebpCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Try v6 Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « infra/bots/assets/skimage/VERSION ('k') | src/codec/SkPngCodec.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The Android Open Source Project 2 * Copyright 2015 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkCodecPriv_DEFINED 8 #ifndef SkCodecPriv_DEFINED
9 #define SkCodecPriv_DEFINED 9 #define SkCodecPriv_DEFINED
10 10
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 324
325 // Need a color xform when dst space does not match the src. 325 // Need a color xform when dst space does not match the src.
326 bool srcDstNotEqual = !SkColorSpace::Equals(srcInfo.colorSpace(), dstInfo.co lorSpace()); 326 bool srcDstNotEqual = !SkColorSpace::Equals(srcInfo.colorSpace(), dstInfo.co lorSpace());
327 327
328 // We never perform a color xform in legacy mode. 328 // We never perform a color xform in legacy mode.
329 bool isLegacy = nullptr == dstInfo.colorSpace(); 329 bool isLegacy = nullptr == dstInfo.colorSpace();
330 330
331 return !isLegacy && (needsPremul || isF16 || srcDstNotEqual); 331 return !isLegacy && (needsPremul || isF16 || srcDstNotEqual);
332 } 332 }
333 333
334 static inline SkAlphaType select_alpha_xform(SkAlphaType dstAlphaType, SkAlphaTy pe srcAlphaType) {
335 return (kOpaque_SkAlphaType == srcAlphaType) ? kOpaque_SkAlphaType : dstAlph aType;
336 }
337
334 #endif // SkCodecPriv_DEFINED 338 #endif // SkCodecPriv_DEFINED
OLDNEW
« no previous file with comments | « infra/bots/assets/skimage/VERSION ('k') | src/codec/SkPngCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698