| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 #ifndef SkColorCubeFilter_DEFINED | 8 #ifndef SkColorCubeFilter_DEFINED |
| 9 #define SkColorCubeFilter_DEFINED | 9 #define SkColorCubeFilter_DEFINED |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 #if SK_SUPPORT_GPU | 26 #if SK_SUPPORT_GPU |
| 27 virtual GrFragmentProcessor* asFragmentProcessor(GrContext*) const SK_OVERRID
E; | 27 virtual GrFragmentProcessor* asFragmentProcessor(GrContext*) const SK_OVERRID
E; |
| 28 #endif | 28 #endif |
| 29 | 29 |
| 30 SK_TO_STRING_OVERRIDE() | 30 SK_TO_STRING_OVERRIDE() |
| 31 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorCubeFilter) | 31 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorCubeFilter) |
| 32 | 32 |
| 33 protected: | 33 protected: |
| 34 SkColorCubeFilter(SkData* cubeData, int cubeDimension); | 34 SkColorCubeFilter(SkData* cubeData, int cubeDimension); |
| 35 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING |
| 36 SkColorCubeFilter(SkReadBuffer& buffer); |
| 37 #endif |
| 35 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 38 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
| 36 | 39 |
| 37 private: | 40 private: |
| 38 /** The cache is initialized on-demand when getProcessingLuts is called. | 41 /** The cache is initialized on-demand when getProcessingLuts is called. |
| 39 */ | 42 */ |
| 40 class ColorCubeProcesingCache { | 43 class ColorCubeProcesingCache { |
| 41 public: | 44 public: |
| 42 ColorCubeProcesingCache(int cubeDimension); | 45 ColorCubeProcesingCache(int cubeDimension); |
| 43 | 46 |
| 44 void getProcessingLuts(const int* (*colorToIndex)[2], | 47 void getProcessingLuts(const int* (*colorToIndex)[2], |
| (...skipping 22 matching lines...) Expand all Loading... |
| 67 | 70 |
| 68 SkAutoDataUnref fCubeData; | 71 SkAutoDataUnref fCubeData; |
| 69 int32_t fUniqueID; | 72 int32_t fUniqueID; |
| 70 | 73 |
| 71 mutable ColorCubeProcesingCache fCache; | 74 mutable ColorCubeProcesingCache fCache; |
| 72 | 75 |
| 73 typedef SkColorFilter INHERITED; | 76 typedef SkColorFilter INHERITED; |
| 74 }; | 77 }; |
| 75 | 78 |
| 76 #endif | 79 #endif |
| OLD | NEW |