1 /* 2 * Copyright 2016 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #include "SkColorLookUpTable.h" 9 #include "SkColorSpaceXformPriv.h" 10 #include "SkFloatingPoint.h" 11 12 SkColorLookUpTable::SkColorLookUpTable(uint8_t inputChannels, const uint8_t limits[]) { 13 fInputChannels = inputChannels; 14 SkASSERT(inputChannels >= 1 && inputChannels <= kMaxColorChannels); 15 memcpy(fLimits, limits, fInputChannels * sizeof(uint8_t)); 16 17 for (int i = 0; i < inputChannels; i++) { 18 SkASSERT(fLimits[i] > 1); 19 } 20 } 21