| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkTableColorFilter.h" |
| 9 |
| 8 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
| 9 #include "SkTableColorFilter.h" | |
| 10 #include "SkColorPriv.h" | 11 #include "SkColorPriv.h" |
| 11 #include "SkReadBuffer.h" | 12 #include "SkReadBuffer.h" |
| 13 #include "SkString.h" |
| 14 #include "SkUnPreMultiply.h" |
| 12 #include "SkWriteBuffer.h" | 15 #include "SkWriteBuffer.h" |
| 13 #include "SkUnPreMultiply.h" | |
| 14 #include "SkString.h" | |
| 15 | 16 |
| 16 class SkTable_ColorFilter : public SkColorFilter { | 17 class SkTable_ColorFilter : public SkColorFilter { |
| 17 public: | 18 public: |
| 18 SkTable_ColorFilter(const uint8_t tableA[], const uint8_t tableR[], | 19 SkTable_ColorFilter(const uint8_t tableA[], const uint8_t tableR[], |
| 19 const uint8_t tableG[], const uint8_t tableB[]) { | 20 const uint8_t tableG[], const uint8_t tableB[]) { |
| 20 fBitmap = nullptr; | 21 fBitmap = nullptr; |
| 21 fFlags = 0; | 22 fFlags = 0; |
| 22 | 23 |
| 23 uint8_t* dst = fStorage; | 24 uint8_t* dst = fStorage; |
| 24 if (tableA) { | 25 if (tableA) { |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 SkColorFilter* SkTableColorFilter::CreateARGB(const uint8_t tableA[256], | 597 SkColorFilter* SkTableColorFilter::CreateARGB(const uint8_t tableA[256], |
| 597 const uint8_t tableR[256], | 598 const uint8_t tableR[256], |
| 598 const uint8_t tableG[256], | 599 const uint8_t tableG[256], |
| 599 const uint8_t tableB[256]) { | 600 const uint8_t tableB[256]) { |
| 600 return new SkTable_ColorFilter(tableA, tableR, tableG, tableB); | 601 return new SkTable_ColorFilter(tableA, tableR, tableG, tableB); |
| 601 } | 602 } |
| 602 | 603 |
| 603 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkTableColorFilter) | 604 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkTableColorFilter) |
| 604 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkTable_ColorFilter) | 605 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkTable_ColorFilter) |
| 605 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 606 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
| OLD | NEW |