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

Unified Diff: Source/platform/graphics/ColorSpaceTransform.h

Issue 352873002: [wip] image color correction (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/platform/graphics/ColorSpaceTransform.h
diff --git a/Source/modules/crypto/AesKeyAlgorithm.h b/Source/platform/graphics/ColorSpaceTransform.h
similarity index 62%
copy from Source/modules/crypto/AesKeyAlgorithm.h
copy to Source/platform/graphics/ColorSpaceTransform.h
index be51a8d22e3d9a969aebf1b23ce5effcdec2d750..3ea15871a5f84887897422a08234897fba9e8691 100644
--- a/Source/modules/crypto/AesKeyAlgorithm.h
+++ b/Source/platform/graphics/ColorSpaceTransform.h
@@ -28,31 +28,64 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef AesKeyAlgorithm_h
-#define AesKeyAlgorithm_h
+#ifndef ColorSpaceTransform_h
+#define ColorSpaceTransform_h
-#include "bindings/v8/ScriptWrappable.h"
-#include "modules/crypto/KeyAlgorithm.h"
-#include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
+#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
+#if USE(QCMSLIB)
+#include "qcms.h"
+#include "wtf/ThreadSafeRefCounted.h"
+#endif
+
namespace WebCore {
-class AesKeyAlgorithm : public KeyAlgorithm {
+#if USE(QCMSLIB)
+
+class ColorSpaceTransform : public ThreadSafeRefCounted<ColorSpaceTransform> {
public:
- static AesKeyAlgorithm* create(const blink::WebCryptoKeyAlgorithm&);
+ static PassRefPtr<ColorSpaceTransform> create(qcms_transform* transform)
+ {
+ return adoptRef(new ColorSpaceTransform(transform));
+ }
+
+ qcms_transform* transform() { return m_transform; }
- unsigned short length();
+ ~ColorSpaceTransform()
+ {
+ if (m_transform)
+ qcms_transform_release(m_transform);
- virtual void trace(Visitor*) OVERRIDE;
+ m_transform = 0;
+ }
private:
- explicit AesKeyAlgorithm(const blink::WebCryptoKeyAlgorithm&);
+ explicit ColorSpaceTransform(qcms_transform* transform)
+ : m_transform(transform)
+ {
+ }
+
+ qcms_transform* m_transform;
};
-DEFINE_KEY_ALGORITHM_TYPE_CASTS(AesKeyAlgorithm);
+#else
-} // namespace WebCore
+class ColorSpaceTransform : public RefCounted<ColorSpaceTransform> {
+public:
+ static PassRefPtr<ColorSpaceTransform> create(void*)
+ {
+ return nullptr;
+ }
+
+private:
+ ColorSpaceTransform()
+ {
+ }
+};
#endif
+
+} // namespace WebCore
+
+#endif // ColorSpaceTransform_h

Powered by Google App Engine
This is Rietveld 408576698