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

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

Issue 1331533002: [poc] curve-filter Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix CanvasRenderingContext2D::createPattern crash for #40 Created 4 years, 11 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: 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

Powered by Google App Engine
This is Rietveld 408576698