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

Unified Diff: src/effects/SkColorCubeFilter.cpp

Issue 1779263003: Make sp variants for SkData (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months 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/SkWriter32.cpp ('k') | src/images/SkImageDecoder_astc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkColorCubeFilter.cpp
diff --git a/src/effects/SkColorCubeFilter.cpp b/src/effects/SkColorCubeFilter.cpp
index 44aaf8b830545c933bbebecae5ebb230eaf89bba..d59f123a80aaf0bfd2c37f6650571873a0f8f6c2 100644
--- a/src/effects/SkColorCubeFilter.cpp
+++ b/src/effects/SkColorCubeFilter.cpp
@@ -138,17 +138,17 @@ void SkColorCubeFilter::filterSpan(const SkPMColor src[], int count, SkPMColor d
SkFlattenable* SkColorCubeFilter::CreateProc(SkReadBuffer& buffer) {
int cubeDimension = buffer.readInt();
- SkAutoDataUnref cubeData(buffer.readByteArrayAsData());
- if (!buffer.validate(is_valid_3D_lut(cubeData, cubeDimension))) {
+ auto cubeData(buffer.readByteArrayAsData());
+ if (!buffer.validate(is_valid_3D_lut(cubeData.get(), cubeDimension))) {
return nullptr;
}
- return Create(cubeData, cubeDimension);
+ return Create(cubeData.get(), cubeDimension);
}
void SkColorCubeFilter::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
buffer.writeInt(fCache.cubeDimension());
- buffer.writeDataAsByteArray(fCubeData);
+ buffer.writeDataAsByteArray(fCubeData.get());
}
#ifndef SK_IGNORE_TO_STRING
« no previous file with comments | « src/core/SkWriter32.cpp ('k') | src/images/SkImageDecoder_astc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698