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

Unified Diff: src/core/SkColorSpace_Base.h

Issue 2449243003: Initial implementation of a SkColorSpace_A2B xform (Closed)
Patch Set: fixed compile error on certain trybots related to RVO move-elision Created 4 years, 1 month 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
« no previous file with comments | « src/core/SkColorSpace_A2B.h ('k') | src/core/SkRasterPipeline.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkColorSpace_Base.h
diff --git a/src/core/SkColorSpace_Base.h b/src/core/SkColorSpace_Base.h
index 3dbf351c72092c97e4e0a17cd385525af9695af3..480febd7ff999120d18b84f59df1335b5664dd28 100644
--- a/src/core/SkColorSpace_Base.h
+++ b/src/core/SkColorSpace_Base.h
@@ -8,6 +8,7 @@
#ifndef SkColorSpace_Base_DEFINED
#define SkColorSpace_Base_DEFINED
+#include "SkColorLookUpTable.h"
#include "SkColorSpace.h"
#include "SkData.h"
#include "SkOnce.h"
@@ -143,30 +144,6 @@ struct SkGammas : SkRefCnt {
void operator delete(void* p) { sk_free(p); }
};
-struct SkColorLookUpTable : public SkRefCnt {
- static constexpr uint8_t kOutputChannels = 3;
-
- uint8_t fInputChannels;
- uint8_t fGridPoints[3];
-
- const float* table() const {
- return SkTAddOffset<const float>(this, sizeof(SkColorLookUpTable));
- }
-
- SkColorLookUpTable(uint8_t inputChannels, uint8_t gridPoints[3])
- : fInputChannels(inputChannels)
- {
- SkASSERT(3 == inputChannels);
- memcpy(fGridPoints, gridPoints, 3 * sizeof(uint8_t));
- }
-
- // Objects of this type are created in a custom fashion using sk_malloc_throw
- // and therefore must be sk_freed.
- void* operator new(size_t size) = delete;
- void* operator new(size_t, void* p) { return p; }
- void operator delete(void* p) { sk_free(p); }
-};
-
class SkColorSpace_Base : public SkColorSpace {
public:
« no previous file with comments | « src/core/SkColorSpace_A2B.h ('k') | src/core/SkRasterPipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698