| Index: third_party/WebKit/Source/platform/graphics/ColorSpaceTransform.h
|
| diff --git a/third_party/WebKit/Source/platform/graphics/ColorSpaceTransform.h b/third_party/WebKit/Source/platform/graphics/ColorSpaceTransform.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..512b19afc23f89fadcf471abcdcbebeccb8407a4
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/platform/graphics/ColorSpaceTransform.h
|
| @@ -0,0 +1,63 @@
|
| +// 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 ColorSpaceTransform_h
|
| +#define ColorSpaceTransform_h
|
| +
|
| +#include "wtf/PassRefPtr.h"
|
| +#include "wtf/RefCounted.h"
|
| +#include "wtf/ThreadSafeRefCounted.h"
|
| +
|
| +#if USE(QCMSLIB)
|
| +#include "qcms.h"
|
| +#endif
|
| +
|
| +namespace blink {
|
| +
|
| +#if USE(QCMSLIB)
|
| +
|
| +class ColorSpaceTransform : public ThreadSafeRefCounted<ColorSpaceTransform> {
|
| +public:
|
| + static PassRefPtr<ColorSpaceTransform> create(qcms_transform* transform)
|
| + {
|
| + return adoptRef(new ColorSpaceTransform(transform));
|
| + }
|
| +
|
| + qcms_transform* transform() { return m_transform; }
|
| +
|
| + ~ColorSpaceTransform()
|
| + {
|
| + if (m_transform)
|
| + qcms_transform_release(m_transform);
|
| + }
|
| +
|
| +private:
|
| + explicit ColorSpaceTransform(qcms_transform* transform)
|
| + : m_transform(transform)
|
| + {
|
| + }
|
| +
|
| + qcms_transform* m_transform;
|
| +};
|
| +
|
| +#else
|
| +
|
| +class ColorSpaceTransform : public RefCounted<ColorSpaceTransform> {
|
| +public:
|
| + static PassRefPtr<ColorSpaceTransform> create(void*)
|
| + {
|
| + return nullptr;
|
| + }
|
| +
|
| +private:
|
| + ColorSpaceTransform()
|
| + {
|
| + }
|
| +};
|
| +
|
| +#endif
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // ColorSpaceTransform_h
|
|
|