| Index: third_party/WebKit/Source/platform/graphics/ColorSpaceFilterCache.h
|
| diff --git a/third_party/WebKit/Source/platform/graphics/ColorSpaceFilterCache.h b/third_party/WebKit/Source/platform/graphics/ColorSpaceFilterCache.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c68880b3895c03c0cabdfacf3bb11773fb5600b5
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/platform/graphics/ColorSpaceFilterCache.h
|
| @@ -0,0 +1,60 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef ColorSpaceFilterCache_h
|
| +#define ColorSpaceFilterCache_h
|
| +
|
| +#include "platform/PlatformExport.h"
|
| +#include "wtf/PassRefPtr.h"
|
| +
|
| +class SkColorFilter;
|
| +
|
| +namespace blink {
|
| +
|
| +class ColorSpaceProfile;
|
| +
|
| +PLATFORM_EXPORT PassRefPtr<SkColorFilter> findColorTransform(ColorSpaceProfile* source, ColorSpaceProfile* target);
|
| +PLATFORM_EXPORT void cacheColorTransform(ColorSpaceProfile* source, ColorSpaceProfile* target, SkColorFilter*);
|
| +PLATFORM_EXPORT void pruneColorTransform(ColorSpaceProfile* target);
|
| +
|
| +struct ScreenDevice {
|
| +
|
| + enum SystemColorProfiles {
|
| + sRGB = 0, // sRGB: default (source).
|
| + sRGBCanvas = 1, // sRGB: HTML <canvas> (target).
|
| + sRGBPlugin = 2, // sRGB: PPAPI web font rendering access (target).
|
| + sRGBPrint = 3, // sRGB: Printing (target).
|
| + sRGBTest = 4, // sRGB: Unit testing (target).
|
| + };
|
| +
|
| + enum VideoColorProfiles {
|
| + BT709 = 5, // Rec BT.709 HDTV-UTI (source).
|
| + BT601SMPTEC = 6, // Rec BT.601 SMPTE-C (source).
|
| + BT601EBUPAL = 7, // Rec BT.601 EBU PAL/SECAM (source).
|
| + };
|
| +
|
| + static bool isDefaultDeviceId(uintptr_t deviceId)
|
| + {
|
| + return deviceId <= static_cast<uintptr_t>(BT601EBUPAL);
|
| + }
|
| +
|
| + static bool isSRGBDeviceId(uintptr_t deviceId)
|
| + {
|
| + return deviceId <= static_cast<uintptr_t>(sRGBPrint);
|
| + }
|
| +
|
| + static bool isSRGBCanvasDeviceId(uintptr_t deviceId)
|
| + {
|
| + return deviceId == static_cast<uintptr_t>(sRGBCanvas);
|
| + }
|
| +
|
| + static bool shouldIgnoreDeviceId(uintptr_t deviceId)
|
| + {
|
| + return deviceId == static_cast<uintptr_t>(sRGBPlugin);
|
| + }
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // ColorSpaceFilterCache_h
|
|
|