SkDefaultColorProfile: Hide gDefaultProfileIsSRGB

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1917443002

Review URL: https://codereview.chromium.org/1917443002
This commit is contained in:
halcanary 2016-04-25 10:32:23 -07:00 committed by Commit bot
parent 1e9030472e
commit 484b3d0b83
2 changed files with 9 additions and 7 deletions

View File

@ -9,11 +9,6 @@
#include "SkImageInfo.h"
// Indicate how images and gradients should interpret colors by default.
extern bool gDefaultProfileIsSRGB;
static SkColorProfileType SkDefaultColorProfile() {
return gDefaultProfileIsSRGB ? kSRGB_SkColorProfileType : kLinear_SkColorProfileType;
}
SK_API SkColorProfileType SkDefaultColorProfile();
#endif // SkImageInfoPriv_DEFINED

View File

@ -6,10 +6,17 @@
*/
#include "SkImageInfo.h"
#include "SkImageInfoPriv.h"
#include "SkReadBuffer.h"
#include "SkWriteBuffer.h"
SK_API bool gDefaultProfileIsSRGB;
// Indicate how images and gradients should interpret colors by default.
bool gDefaultProfileIsSRGB;
SkColorProfileType SkDefaultColorProfile() {
return gDefaultProfileIsSRGB ? kSRGB_SkColorProfileType
: kLinear_SkColorProfileType;
}
static bool profile_type_is_valid(SkColorProfileType profileType) {
return (profileType >= 0) && (profileType <= kLastEnum_SkColorProfileType);