Index: src/effects/SkColorCubeFilter.cpp |
diff --git a/src/effects/SkColorCubeFilter.cpp b/src/effects/SkColorCubeFilter.cpp |
index d80a02fef2424bb801407aaacdf95c35e75e6687..d59f123a80aaf0bfd2c37f6650571873a0f8f6c2 100644 |
--- a/src/effects/SkColorCubeFilter.cpp |
+++ b/src/effects/SkColorCubeFilter.cpp |
@@ -48,19 +48,19 @@ |
(nullptr != cubeData) && (cubeData->size() >= minMemorySize); |
} |
-sk_sp<SkColorFilter> SkColorCubeFilter::Make(sk_sp<SkData> cubeData, int cubeDimension) { |
- if (!is_valid_3D_lut(cubeData.get(), cubeDimension)) { |
+SkColorFilter* SkColorCubeFilter::Create(SkData* cubeData, int cubeDimension) { |
+ if (!is_valid_3D_lut(cubeData, cubeDimension)) { |
return nullptr; |
} |
- return sk_sp<SkColorFilter>(new SkColorCubeFilter(std::move(cubeData), cubeDimension)); |
-} |
- |
-SkColorCubeFilter::SkColorCubeFilter(sk_sp<SkData> cubeData, int cubeDimension) |
- : fCubeData(std::move(cubeData)) |
- , fUniqueID(SkNextColorCubeUniqueID()) |
- , fCache(cubeDimension) |
-{} |
+ return new SkColorCubeFilter(cubeData, cubeDimension); |
+} |
+ |
+SkColorCubeFilter::SkColorCubeFilter(SkData* cubeData, int cubeDimension) |
+ : fCubeData(SkRef(cubeData)) |
+ , fUniqueID(SkNextColorCubeUniqueID()) |
+ , fCache(cubeDimension) { |
+} |
uint32_t SkColorCubeFilter::getFlags() const { |
return this->INHERITED::getFlags() | kAlphaUnchanged_Flag; |
@@ -142,7 +142,7 @@ |
if (!buffer.validate(is_valid_3D_lut(cubeData.get(), cubeDimension))) { |
return nullptr; |
} |
- return Make(std::move(cubeData), cubeDimension).release(); |
+ return Create(cubeData.get(), cubeDimension); |
} |
void SkColorCubeFilter::flatten(SkWriteBuffer& buffer) const { |